pika.exceptions.AMQPConnectionError
See original GitHub issuewhen I want to connect to rabbitmq by Pika in django project, I get this error:
File "/code/auth-service/utils/consumers.py", line 15, in <module>
connection = pika.BlockingConnection(parameters)
File "/usr/local/lib/python3.8/site-packages/pika/adapters/blocking_connection.py", line 360, in __init__
self._impl = self._create_connection(parameters, _impl_class)
File "/usr/local/lib/python3.8/site-packages/pika/adapters/blocking_connection.py", line 451, in _create_connection
raise self._reap_last_connection_workflow_error(error)
pika.exceptions.AMQPConnectionError
my code is:
connection = pika.BlockingConnection(pika.ConnectionParameters(host='rabbitmq'))
all my projects run by docker-compose.yml file I appreciate for any help to solving this problem
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
Program Running Pika Throwing AMQPConnectionError
_reap_last_connection_workflow_error(error) pika.exceptions.AMQPConnectionError. Here's the code I'm attempting to run:
Read more >How to use the pika.exceptions.AMQPConnectionError ... - Snyk
To help you get started, we've selected a few pika.exceptions.AMQPConnectionError examples, based on popular ways it is used in public projects.
Read more >Exceptions — pika 1.2.1 documentation - Read the Docs
Close from broker; may be passed as reason to channel's on-closed callback of non-blocking connection adapters or raised by BlockingConnection . NEW in...
Read more >pika.exceptions.AMQPConnectionError - Error while running ...
I have a python docker container that is dependent on rabbitmq. I tried to link these two containers using docker-compose file:
Read more >python - Why am I receiving this "pika.exceptions ... - Ask Ubuntu
Whenever I try to run this file I receive a "pika.exceptions.AMQPConnectionError". I do not have RabbitMQ installed and cannot use it for ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
On MAC, providing
localhost
leads to this error; instead explicitly providing127.0.0.1
works asI had this problem, and in my case, the problem was that there is a time gap between RabbitMQ start and when it’s ready to accept connections. So my problem was simply solved by waiting 30 seconds before trying to connect (I was connecting from a container that would start right after RabbitMQ’s container).