raise self._reap_last_connection_workflow_error(error) pika.exceptions.AMQPConnectionError

712 views
Skip to first unread message

Мария Лавровская

unread,
Apr 14, 2020, 5:09:52 AM4/14/20
to rabbitmq-users
Good morning, 

Currently facing this issue. Could anyone help me to troubleshoot it?

/Users/maria/.virtualenvs/dockerseleniumtest/bin/python /Users/maria/Desktop/dockerselenium/main/working.py
Traceback (most recent call last):
  File "/Users/maria/Desktop/dockerselenium/main/working.py", line 8, in <module>
    sendmes.new_task()
  File "/Users/maria/Desktop/dockerselenium/main/sendmes/testing.py", line 12, in new_task
    connection = pika.BlockingConnection(pika.ConnectionParameters('localhost'))
  File "/Users/maria/.virtualenvs/dockerseleniumtest/lib/python3.8/site-packages/pika/adapters/blocking_connection.py", line 359, in __init__
    self._impl = self._create_connection(parameters, _impl_class)
  File "/Users/maria/.virtualenvs/dockerseleniumtest/lib/python3.8/site-packages/pika/adapters/blocking_connection.py", line 450, in _create_connection
    raise self._reap_last_connection_workflow_error(error)
pika.exceptions.AMQPConnectionError


The /etc/hosts file content is as follows: 

##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1	localhost
255.255.255.255	broadcasthost
::1             localhost
# Added by Docker Desktop
# To allow the same kube context to work on the host and the container:
127.0.0.1 kubernetes.docker.internal
# End of section

Elton Williams

unread,
Aug 14, 2020, 6:00:30 PM8/14/20
to rabbitmq-users
If you are trying to access rabbitMQ on a docker container, then you need to remember to map the port. The following mounts both the management port ( 15672  ) and rabbitMQ default port (5672)  to the host system:

e.g:
docker run -d --hostname my-rabbit --name this-rabbit -p 15672:15672 -p 5672:5672 rabbitmq:3-management

Reply all
Reply to author
Forward
0 new messages