title: RabbitMQ gives a "access refused, login refused for user" error when attempting to follow the celery tutorial
body: <p>I'm attempting to follow the <a href="http://ask.github.com/celery/introduction.html#usage" rel="nofollow noreferrer">celery tutorial</a>, but I run into a problem when I run <code>python manage.py celeryd</code>: my RabbitMQ server (installed on a virtual machine on my dev box) won't let my user login.</p>
  
  <p>I get the following on my Django management console:</p>
  
  <pre><code>[ERROR/MainProcess] AMQP Listener: Connection Error: Socket closed. Trying again in 2 seconds...
  </code></pre>
  
  <p>and this shows up in my <code>rabbit.log</code> file on my RabbitMQ server:</p>
  
  <pre><code>exception on TCP connection &lt;0.5814.0&gt; from $DJANGO_BOX_IP
  {channel0_error,starting,{amqp,access_refused,"login refused for user '$CONFIGURED_USER'",'connection.start_ok'}}
  </code></pre>
  
  <p>I've double-checked my user, permissions, and vhost info, and they all seem to match up. Any help troubleshooting is greatly appreciated.</p>
  
  <p>UPDATE: Following the advice of @asksol I get the following traceback:</p>
  
  <pre><code>$MY_VIRTUAL_ENV/lib/python2.6/site-packages/carrot/connection.pyc in connection(self)
      118             return
      119         if not self._connection:
  --&gt; 120             self._connection = self._establish_connection()
      121             self._closed = False
      122         return self._connection
  
  $MY_VIRTUAL_ENV/lib/python2.6/site-packages/carrot/connection.pyc in _establish_connection(self)
      131 
      132     def _establish_connection(self):
  --&gt; 133         return self.create_backend().establish_connection()
      134 
      135     def get_backend_cls(self):
  
  $MY_VIRTUAL_ENV/lib/python2.6/site-packages/carrot/backends/pyamqplib.pyc in establish_connection(self)
      110                                insist=conninfo.insist,
      111                                ssl=conninfo.ssl,
  --&gt; 112                                connect_timeout=conninfo.connect_timeout)
      113 
      114     def close_connection(self, connection):
  
  $MY_VIRTUAL_ENV/lib/python2.6/site-packages/amqplib/client_0_8/connection.pyc in __init__(self, host, userid, password, login_method, login_response, virtual_host, locale, client_properties, ssl, insist, connect_timeout, **kwargs)
      138                 self.wait(allowed_methods=[
      139                     (10, 20), # secure
  --&gt; 140                     (10, 30), # tune
      141                     ])
      142 
  
  $MY_VIRTUAL_ENV/lib/python2.6/site-packages/amqplib/client_0_8/abstract_channel.pyc in wait(self, allowed_methods)
       88         method_sig, args, content = self.connection._wait_method(
  ---&gt; 89             self.channel_id, allowed_methods)
       90 
       91         if content \
  
  $MY_VIRTUAL_ENV/lib/python2.6/site-packages/amqplib/client_0_8/connection.pyc in _wait_method(self, channel_id, allowed_methods)
      196         while True:
      197             channel, method_sig, args, content = \
  --&gt; 198                 self.method_reader.read_method()
      199 
      200             if (channel == channel_id) \
  
  $MY_VIRTUAL_ENV/lib/python2.6/site-packages/amqplib/client_0_8/method_framing.pyc in read_method(self)
      213         m = self.queue.get()
      214         if isinstance(m, Exception):
  --&gt; 215             raise m
      216         return m
      217 
  
  IOError: Socket closed
  </code></pre>