Rabbitmq authentication: 11 (AUTHENTICATION_FAILURE_LOOPBACK)

82 views
Skip to first unread message

lucas zhang

unread,
Aug 6, 2024, 3:32:23 AM8/6/24
to rabbitmq-users
I want to connect rabbitmq use 5552 port.But I get an error for my rabbitmq cluster.
And then I run a docker to start a rabbitmq server, the version is same as my rabbitmq cluster.It is connect successfully. I don't know why?
the error log is below:
Caused by: com.rabbitmq.stream.AuthenticationFailureException: Unexpected response code during authentication: 11 (AUTHENTICATION_FAILURE_LOOPBACK). The user is not authorized to connect from a remote host. If the broker is running locally, make sure the '172.16.8.203' hostname is resolved to the loopback interface (localhost, 127.0.0.1, ::1). See https://www.rabbitmq.com/access-control.html#loopback-users.
        at com.rabbitmq.stream.impl.Client.authenticate(Client.java:516)
        at com.rabbitmq.stream.impl.Client.<init>(Client.java:372)
        at com.rabbitmq.stream.impl.StreamEnvironment.lambda$new$5(StreamEnvironment.java:233)
        at com.rabbitmq.stream.impl.StreamEnvironment.<init>(StreamEnvironment.java:258)
        at com.rabbitmq.stream.impl.StreamEnvironmentBuilder.build(StreamEnvironmentBuilder.java:324)
        at io.debezium.server.rabbitmq.RabbitMqStreamNativeChangeConsumer.connect(RabbitMqStreamNativeChangeConsumer.java:105)
        ... 31 more

Arnaud Cogoluègnes

unread,
Aug 6, 2024, 7:18:03 AM8/6/24
to rabbitmq-users
Have you looked at the link from the error message? Please read the error message, have a look at the link to the documentation, and come back to us with more information if you cannot resolve the problem.

lucas zhang

unread,
Aug 6, 2024, 9:26:51 PM8/6/24
to rabbitmq-users
Yes, I add loopback_users=none to rabbitmq.conf, and then it solved.
But the point is I don't know why I use docker image needn't to set this conf, I go to docker container, and look the rabbitmq.conf, it doesn't has this config.

The Rabbitmq version is 3.9.16

Arnaud Cogoluègnes

unread,
Aug 7, 2024, 5:48:50 AM8/7/24
to rabbitmq-users
It's likely you use the default "guest" user. It works when the broker and the client application are on the same host, but it does not work anymore when they are not on the same host. You should create a dedicated user with a complex password. With "loopback_users=none" anyone can connect from a remote host with the default credentials.

The documentation is pretty clear about this, please read it and enforce the best practices.

Also, do not use RabbitMQ 3.9.16, it is no longer supported, use the latest patch release of the 3.13 branch, see [1].

Reply all
Reply to author
Forward
0 new messages