title: Python Celery socket.error: [Errno 61] Connection refused
body: <p>I am using Celery 3.0 and have the configuration file like below.</p>
  
  <p>celeryconfig.py</p>
  
  <pre><code>BROKER_URL = 'redis://localhost:6379/0'
  CELERY_RESULT_BACKEND = 'redis://localhost:6379/0'
  CELERY_TASK_SERIALIZER = 'json'
  CELERY_RESULT_SERIALIZER = 'json'
  
  CELERY_IMPORTS = ("tasks", )
  CELERY_TASK_RESULT_EXPIRES = 300
  </code></pre>
  
  <p>tasks.py</p>
  
  <pre><code>import celery
  
  @celery.task
  def function(x,y):
      return x + y
  </code></pre>
  
  <p>and function.py</p>
  
  <pre><code>from tasks import function
  
  print function.delay(4,4).get()
  </code></pre>
  
  <p>I run the application with following command</p>
  
  <pre><code>celeryd --loglevel=INFO --config=celeryconfig
  </code></pre>
  
  <p>Everything is working great till now. I have redis and celery running and getting answers.</p>
  
  <p>But when I run the function command from another file called parallelizer,</p>
  
  <p>I get the socket error,</p>
  
  <pre><code> socket.error: [Errno 61] Connection refused
  </code></pre>
  
  <p>My file is like below,</p>
  
  <pre><code>from examples.dummy.tasks import function
  print function.delay(4,4).get()
  </code></pre>
  
  <p>Any ideas ? </p>