title: Connection refused when try convert html to pdf in AWS ubuntu, But works File in Local env
body: <p>I am trying to convert HTML to pdf in a Django project it works fine on my local computer but when I uploaded it on my AWS ec2 instance it's giving me  <strong>[Errno 111] Connection refused</strong></p>
  <p><strong>html_to_pdf function</strong></p>
  <pre><code>def render_to_pdf(template_src, context_dict={}):
  template = get_template(template_src)
  html  = template.render(context_dict)
  
  result = BytesIO()
  pdf = pisa.pisaDocument(BytesIO(html.encode(&quot;ISO-8859-1&quot;)), result)
  if not pdf.err:
      return HttpResponse(result.getvalue(), content_type='application/pdf')
  return None
  </code></pre>
  <p>Error in Django
  <a href="https://i.stack.imgur.com/ixy5V.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ixy5V.png" alt="enter image description here" /></a></p>
  <p><a href="https://i.stack.imgur.com/7UfFI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7UfFI.png" alt="enter image description here" /></a></p>