Amqp: Connection issue: Exception (501) Reason: "EOF" exit status 1

Created on 16 May 2017  路  11Comments  路  Source: streadway/amqp

I am running RabbitMQ 3.6.9, Erlang 19.3 in a docker container and trying to open the connection using conn, err := amqp.Dial("amqp://guest:guest@localhost:5672/").

I am able to connect to RabbitMQ directly using http://localhost:5672. Am I missing something?

Thanks
Arul

mailing list material

Most helpful comment

Hi All,

I has the same issue and I found my mistake ( I used the docker Rabbit: https://hub.docker.com/_/rabbitmq/)

  • Firstly, you need 2 port 15672 and 5672

==> you can connect to 15672 (Rabbit Manager)
image

==> and your code you need to use another port to send request (ex: 5672)
image

It will work fine to me. Hope it will helps a beginner

All 11 comments

You are missing a glance at the server logs. What you will likely find there is a message saying that the user guest can only connect from localhost by default.

Please post questions to rabbitmq-users in the future.

Thanks and sorry for the inconvenience.

I'm having the same problem with RabbitMQ 3.7.8, on the latest commit 70e15.

Two weird things:

  1. It connects fine to the Heroku hosted CloudAMQP service on RabbitMQ 3.7.7.
  2. I can connect via the Ruby client just fine.

Please post questions to rabbitmq-users in the future.

I don't follow. This is the issues list for the project. What is rabbitmq-users?

@ClayShentrup - the maintainers of this project also assist users via the rabbitmq-users mailing list.

The reason that the previous user was directed to the mailing list is that the issue they reported is not actually an issue with this library. Your comment doesn't give any indication that there is a bug in this library because you have provided very little information and did not provide exact steps to reproduce (providing code is even better).

Please remember that this library's maintainers (mostly RabbitMQ core engineering team members) do so on their free time. Anything you can do to expedite issue analysis is appreciated.

Having said all that, if you'd like assistance with your issue, please ask on the mailing list first. Thanks.

Thanks. I posted a message on the list.

I'm just issuing this command:

conn, err := amqp.Dial("amqp://guest:guest@localhost:15672/")

I also made a second user, with no password, and gave access to a new virtual host, like

conn, err := amqp.Dial("amqp://dev@localhost:15672/flycaster")

Hi All,

I has the same issue and I found my mistake ( I used the docker Rabbit: https://hub.docker.com/_/rabbitmq/)

  • Firstly, you need 2 port 15672 and 5672

==> you can connect to 15672 (Rabbit Manager)
image

==> and your code you need to use another port to send request (ex: 5672)
image

It will work fine to me. Hope it will helps a beginner

just expose all ports in your docker

docker run -d --hostname my-rabbit --name some-rabbit -e RABBITMQ_DEFAULT_USER=guest -e RABBITMQ_DEFAULT_PASS=guest -p 15672:15672 -p 5671:5671 -p 5672:5672 -p 15671:15671 -p 25672:25672 rabbitmq:3-management

console http://localhost:15672

conn, err := amqp.Dial("amqp://guest:guest@localhost:5672/")
failOnError(err, "Failed connect to RabitMQ")

Hope it helps...

very thanks

I had this problem recently on a debian server clean installation. Then I start my producers / consumers from a Golang App and everything worked. Then I started the PHP producers / consumers and the server crashed. I restart the server and nothing happens. Well the problem was that I forgot to installed the rabbitmq_delayed_message_exchange plugin. The PHP app was sending messages that require this plugin and I don't know why the server blocked all the connections. What I did was to remove / clean / purge rabbitmq-server packages, reinstalled, enable the plugin and it worked.

I am also facing this problem , in my case rabbitmq cluster is running inside the kubernetes cluster and it is exposed to outside world via loadbalancer type service. I am using NLB load balancer with Client certificates for Rabbitmq server.
When I am trying to access the rabbitmq loadbalanacer service , I get above error.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

eimugray picture eimugray  路  12Comments

parthibd picture parthibd  路  3Comments

CodingAgainstChaos picture CodingAgainstChaos  路  3Comments

auyer picture auyer  路  4Comments

rlk833 picture rlk833  路  9Comments