title: Django ConnectionError (urllib3.connection.HTTPConnection) while posting from Django admin
body: <p>Error info:</p>
  
  <pre><code>Exception Type: ConnectionError at /admin/items/country/add/
  Exception Value: ConnectionError (&lt;urllib3.connection.HTTPConnection 
  object at 0x111377110&gt;: Failed to establish a new connection: [Errno 
  61] Connection refused) caused by: 
  NewConnectionError(&lt;urllib3.connection.HTTPConnection object at 
  0x111377110&gt;: Failed to establish a new connection: [Errno 61] 
  Connection refused)
  </code></pre>
  
  <p>I am getting this connection error while saving the post from Django admin. I have a MYSQL database with settings </p>
  
  <pre><code>DATABASES = {
      'default': {
          'ENGINE': 'django.db.backends.mysql',
          'NAME': 'mystic_db',
          'USER': 'root',
          'PASSWORD': '*****',
          'HOST': '',
          'PORT': '',
  </code></pre>
  
  <p>I am a newbie to Django Python. kindly request a solution to this issue ?</p>
  
  <p>Traceback:</p>
  
  <blockquote>
    <p>File "/Users/MacbookAir/myproject/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
      132.                     response = wrapped_callback(request, *callback_args, **callback_kwargs)
    File "/Users/MacbookAir/myproject/lib/python2.7/site-packages/django/contrib/admin/options.py" in wrapper
      616.                 return self.admin_site.admin_view(view)(*args, **kwargs)
    File "/Users/MacbookAir/myproject/lib/python2.7/site-packages/django/utils/decorators.py" in _wrapped_view
      110.                     response = view_func(request, *args, **kwargs)
    File "/Users/MacbookAir/myproject/lib/python2.7/site-packages/django/views/decorators/cache.py" in _wrapped_view_func
      57.         response = view_func(request, *args, **kwargs)
    File "/Users/MacbookAir/myproject/lib/python2.7/site-packages/django/contrib/admin/sites.py" in inner
      233.             return view(request, *args, **kwargs)
    File "/Users/MacbookAir/myproject/lib/python2.7/site-packages/django/contrib/admin/options.py" in add_view
      1516.         return self.changeform_view(request, None, form_url, extra_context)
    File "/Users/MacbookAir/myproject/lib/python2.7/site-packages/django/utils/decorators.py" in _wrapper
      34.             return bound_func(*args, **kwargs)
    File "/Users/MacbookAir/myproject/lib/python2.7/site-packages/django/utils/decorators.py" in _wrapped_view
      110.                     response = view_func(request, *args, **kwargs)
    File "/Users/MacbookAir/myproject/lib/python2.7/site-packages/django/utils/decorators.py" in bound_func
      30.                 return func.<strong>get</strong>(self, type(self))(*args2, **kwargs2)
    File "/Users/MacbookAir/myproject/lib/python2.7/site-packages/django/utils/decorators.py" in inner
      145.                     return func(*args, **kwargs)
    File "/Users/MacbookAir/myproject/lib/python2.7/site-packages/django/contrib/admin/options.py" in changeform_view
      1467.                 self.save_model(request, new_object, form, not add)
    File "/Users/MacbookAir/myproject/lib/python2.7/site-packages/django/contrib/admin/options.py" in save_model
      1078.         obj.save()
    File "/Users/MacbookAir/myproject/lib/python2.7/site-packages/django/db/models/base.py" in save
      710.                        force_update=force_update, update_fields=update_fields)
    File "/Users/MacbookAir/myproject/lib/python2.7/site-packages/django/db/models/base.py" in save_base
      747.                                    update_fields=update_fields, raw=raw, using=using)
    File "/Users/MacbookAir/myproject/lib/python2.7/site-packages/django/dispatch/dispatcher.py" in send
      201.             response = receiver(signal=self, sender=sender, **named)
    File "/Users/MacbookAir/myproject/lib/python2.7/site-packages/haystack/signals.py" in handle_save
      52.                 index.update_object(instance, using=using)
    File "/Users/MacbookAir/myproject/lib/python2.7/site-packages/haystack/indexes.py" in update_object
      284.                 backend.update(self, [instance])
    File "/Users/MacbookAir/myproject/lib/python2.7/site-packages/haystack/backends/elasticsearch_backend.py" in update
      190.         bulk(self.conn, prepped_docs, index=self.index_name, doc_type='modelresult')
    File "/Users/MacbookAir/myproject/lib/python2.7/site-packages/elasticsearch/helpers/<strong>init</strong>.py" in bulk
      188.     for ok, item in streaming_bulk(client, actions, **kwargs):
    File "/Users/MacbookAir/myproject/lib/python2.7/site-packages/elasticsearch/helpers/<strong>init</strong>.py" in streaming_bulk
      160.         for result in _process_bulk_chunk(client, bulk_actions, raise_on_exception, raise_on_error, **kwargs):
    File "/Users/MacbookAir/myproject/lib/python2.7/site-packages/elasticsearch/helpers/<strong>init</strong>.py" in _process_bulk_chunk
      89.             raise e</p>
  </blockquote>
  
  <pre><code>Exception Type: ConnectionError at /admin/items/country/add/
  Exception Value: ConnectionError (&lt;urllib3.connection.HTTPConnection 
  object at 0x111377110&gt;: Failed to establish a new connection: [Errno 
  61] Connection refused) caused by: 
  NewConnectionError(&lt;urllib3.connection.HTTPConnection object at 
  0x111377110&gt;: Failed to establish a new connection: [Errno 61] 
  Connection refused)
  </code></pre>