title: Celery worker (on remote ec2) cannot communicate with rabbitmq(on another ec2)
body: <p>I wrote an asynchronous email service that uses Celery and RabbitMQ for our Flask application. So I have rabbitmq running on one server - I created a user, vhost and set the permissions. I created an inbound TCP rule for port 5672. It's outbound rules are open to all. I have the celery application on another ec2 instance. The security for this one is pretty similar as well. Before I set up celeryd/supervisord - I tried to start the celery worker. BUt unfortunately it is giving me errors. </p>
  
  <p>This is the celery config: </p>
  
  <pre><code>celery = Celery('myapp.celery', 
              broker = 'amqp://user:password@rabbit:5672/cel_host',
              backend = 'amqp:/cel_host',
              include = 'myapp.tasks')
  </code></pre>
  
  <p>This is the relevant traceback: </p>
  
  <pre><code>File "/usr/local/lib/python2.7/dist-packages/celery/backends/__init__.py", line 56, in get_backend_by_url
  return get_backend_cls(backend, loader), url
  File "/usr/local/lib/python2.7/dist-packages/celery/utils/functional.py", line 133, in _M
  value = fun(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/celery/backends/__init__.py", line 45, in get_backend_cls
  return symbol_by_name(backend, aliases)
  File "/usr/local/lib/python2.7/dist-packages/kombu/utils/__init__.py", line 84, in symbol_by_name
  return getattr(module, cls_name) if cls_name else module
  AttributeError
  :
  'module' object has no attribute '/cel_host'
  </code></pre>
  
  <p>*cel_host is vhost for RabbitMQ. </p>
  
  <p>Everything was working fine when I was working on my local machine. Any help will be highly appreciated. </p>
  
  <p>**Both instances are on a private subnet in our VPC</p>
  
  <p><strong>EDIT:</strong>
  When I changed the broker_url to amqp://guest:guest@rabbit:5672//?ssl=1 - I get the error</p>
  
  <pre><code>consumer: Cannot connect to amqp://guest@rabbit:5672//: [Errno -2] Name or service not known.
  </code></pre>
  
  <p>So it's definitely connection issue that I am not sure how to fix</p>