title: Django: Celery Worker not getting started (without any error)
body: <p>I am trying to configure <code>djcelery</code> in my Django Application backed by <code>rabbitmq</code> server on <code>Ubuntu 14.04</code> machine hosted on <code>Google Compute Engine</code>.</p>
  <p>On attempt to start celery in debug mode using: <code>python manage.py celery worker -B -E  --loglevel=debug</code>, command is getting terminated with below output:</p>
  <pre><code>[2016-03-24 12:16:09,568: DEBUG/MainProcess] | Worker: Preparing bootsteps.
  [2016-03-24 12:16:09,571: DEBUG/MainProcess] | Worker: Building graph...
  [2016-03-24 12:16:09,572: DEBUG/MainProcess] | Worker: New boot order: {Timer, Hub, Queues (intra), Pool, Autoscaler, StateDB, Autoreloader, Beat, Consumer}
  [2016-03-24 12:16:09,575: DEBUG/MainProcess] | Consumer: Preparing bootsteps.
  [2016-03-24 12:16:09,576: DEBUG/MainProcess] | Consumer: Building graph...
  [2016-03-24 12:16:09,577: DEBUG/MainProcess] | Consumer: New boot order: {Connection, Events, Mingle, Tasks, Control, Agent, Heart, Gossip, event loop}
  &lt;user&gt;@&lt;gce.host&gt;:~/path/to/my/project$
  </code></pre>
  <p><strong>What can possibly be the cause of this issue?</strong>
  The same setup is running on my local ubuntu machine and as far as I remember, I have followed all the steps on my cloud server.</p>
  <hr />
  <p><strong>Additional Info</strong>: Things I verified</p>
  <ol>
  <li>RabbitMQ server is running fine. Output from log file:</li>
  </ol>
  <blockquote>
  <p>=INFO REPORT==== 24-Mar-2016::17:02:14 === accepting AMQP connection &lt;0.209.0&gt; (127.0.0.1:42326 -&gt; 127.0.0.1:5672)</p>
  <p>=INFO REPORT==== 24-Mar-2016::17:02:14 === accepting AMQP connection &lt;0.219.0&gt; (127.0.0.1:42327 -&gt; 127.0.0.1:5672)</p>
  <p>=INFO REPORT==== 24-Mar-2016::17:02:17 === accepting AMQP connection &lt;0.229.0&gt; (127.0.0.1:42328 -&gt; 127.0.0.1:5672)</p>
  </blockquote>
  <ol start="2">
  <li>Port <code>5672</code> is open on my machine. I have also opened port: <code>tcp:5555</code>, <code>tcp:4369</code>, <code>tcp:15672</code>, <code>tcp:5671</code> as is mentioned <a href="https://www.rabbitmq.com/install-debian.html" rel="nofollow noreferrer">here</a> (to be on the safer side).</li>
  </ol>
  <p><strong>Celery's Configuration in my project</strong>:</p>
  <p>Installed <code>celery</code> and <code>django-celery</code> package. Created <code>rabbitMQ</code> user and set its permissions with commands:</p>
  <pre><code>sudo rabbitmqctl add_user &lt;user&gt; &lt;password&gt;
  sudo rabbitmqctl set_permissions -p / &lt;user&gt; &quot;.*&quot; &quot;.*&quot; &quot;.*&quot;
  </code></pre>
  <p>In <strong>settings.py</strong> file, I have added:</p>
  <pre><code>import djcelery
  djcelery.setup_loader()
  
  MIDDLEWARE_CLASSES = [ 'django.middleware.transaction.TransactionMiddleware',
                         ..]
  
  INSTALLED_APPS = ['djcelery',
                    ..]
  </code></pre>
  <p>Content of <strong>celery.py</strong> is as:</p>
  <pre><code>from __future__ import absolute_import
  
  import os
  
  from datetime import timedelta
  from celery import Celery
  from celery.schedules import crontab
  
  from django.conf import settings
  
  
  # set the default Django settings module for the 'celery' program.
  os.environ.setdefault('DJANGO_SETTINGS_MODULE', '&lt;my_project&gt;.settings')
  
  app = Celery('&lt;my_project&gt;')
  
  # Using a string here means the worker will not have to
  # pickle the object when using Windows.
  app.config_from_object('&lt;my_project&gt;.settings')
  # app.autodiscover_tasks(lambda: settings.INSTALLED_APPS)
  
  app.conf.update(
      CELERY_ACCEPT_CONTENT = ['json'],
      CELERY_TASK_SERIALIZER = 'json',
      CELERY_RESULT_SERIALIZER = 'json',
      BROKER_URL = 'amqp://&lt;user&gt;:&lt;password&gt;@localhost:5672//',
      # BROKER_URL = 'django://',
      CELERY_RESULT_BACKEND = &quot;amqp&quot;,
      CELERY_IMPORTS = (&quot;&lt;module1&gt;.tasks&quot;, &quot;&lt;module2&gt;.tasks.tasks&quot;, &quot;&lt;module3&gt;.tasks.tasks&quot;),
      CELERY_ALWAYS_EAGER = False,
      # CELERY_RESULT_BACKEND='djcelery.backends.database:DatabaseBackend',
      # CELERY_TIMEZONE = 'Europe/London'
      CELERY_TIMEZONE = 'UTC',
      CELERYBEAT_SCHEDULE = {
          'debug-test': {
              'task': '&lt;module1&gt;.tasks.test_celery',
              'schedule': timedelta(seconds=5),
              # 'args': (1, 2)
          },
      }
  )
  </code></pre>