ACCESS_REFUSED - Login was refused using authentication mechanism PLAIN. For details see the broker

13,621 views
Skip to first unread message

kamal...@gmail.com

unread,
Aug 18, 2018, 12:30:05 PM8/18/18
to rabbitmq-users
I have installed rabbitmq 3.7.7 on my Red hat 7 EC2 instance. I having this following issue when I run my application container to connect to rabbitmq. 

Caused by: com.rabbitmq.client.AuthenticationFailureException: ACCESS_REFUSED - Login was refused using authentication mechanism PLAIN. For details see the broker logfile.

at com.rabbitmq.client.impl.AMQConnection.start(AMQConnection.java:349) ~[amqp-client-4.1.0.jar!/:4.1.0]

at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:920) ~[amqp-client-4.1.0.jar!/:4.1.0]

at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:870) ~[amqp-client-4.1.0.jar!/:4.1.0]

at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:810) ~[amqp-client-4.1.0.jar!/:4.1.0]

at org.springframework.amqp.rabbit.connection.AbstractConnectionFactory.createBareConnection(AbstractConnectionFactory.java:351) ~[spring-rabbit-1.7.1.RELEASE.jar!/:?]

at org.springframework.amqp.rabbit.connection.CachingConnectionFactory.createConnection(CachingConnectionFactory.java:595) ~[spring-rabbit-1.7.1.RELEASE.jar!/:?]

at org.springframework.amqp.rabbit.core.RabbitTemplate.doExecute(RabbitTemplate.java:1430) ~[spring-rabbit-1.7.1.RELEASE.jar!/:?]

at org.springframework.amqp.rabbit.core.RabbitTemplate.execute(RabbitTemplate.java:1411) ~[spring-rabbit-1.7.1.RELEASE.jar!/:?]

at org.springframework.amqp.rabbit.core.RabbitTemplate.execute(RabbitTemplate.java:1387) ~[spring-rabbit-1.7.1.RELEASE.jar!/:?]

at org.springframework.amqp.rabbit.core.RabbitAdmin.declareExchange(RabbitAdmin.java:157) ~[spring-rabbit-1.7.1.RELEASE.jar!/:?]

at com.capitalone.cerberus.common.config.CerberusRabbitMQConfig.declareExchange(CerberusRabbitMQConfig.java:177) ~[cerberus-common-03.00.00.65.jar!/:?]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_171]

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_171]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_171]

at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_171]

at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162) ~[spring-beans-4.3.1.RELEASE.jar!/:4.3.1.RELEASE]

at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588) ~[spring-beans-4.3.1.RELEASE.jar!/:4.3.1.RELEASE]

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1123) ~[spring-beans-4.3.1.RELEASE.jar!/:4.3.1

Michael Klishin

unread,
Aug 18, 2018, 4:32:06 PM8/18/18
to rabbitm...@googlegroups.com
The error is has a specific suggestion: see server logs as all connection attempts that send at least 1 byte of data
are logged, whether they are successful or not [1]. [2][3][4] cover user management, virtual hosts, permissions and the fact
that the default user ("guest") can only connect from localhost by default for security reasons.


--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+unsubscribe@googlegroups.com.
To post to this group, send email to rabbitmq-users@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
MK

Staff Software Engineer, Pivotal/RabbitMQ

kamal...@gmail.com

unread,
Aug 19, 2018, 12:12:26 AM8/19/18
to rabbitmq-users
Thank you for your reply here I have found this on my logs 

2018-08-18 15:00:00.568 [info] <0.557.0> accepting AMQP connection <0.557.0> (127.0.0.1:47874 -> 127.0.0.1:5672)

2018-08-18 15:00:00.601 [info] <0.557.0> Connection <0.557.0> (127.0.0.1:47874 -> 127.0.0.1:5672) has a client-provided name: rabbitGeneralConnFactory#0

2018-08-18 15:00:00.602 [error] <0.557.0> Error on AMQP connection <0.557.0> (127.0.0.1:47874 -> 127.0.0.1:5672, state: starting):

PLAIN login refused: user 'guest' - invalid credentials

To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To post to this group, send email to rabbitm...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Michael Klishin

unread,
Aug 19, 2018, 4:56:55 AM8/19/18
to rabbitm...@googlegroups.com
> PLAIN login refused: user 'guest' - invalid credentials

is pretty specific. If the internal authentication/authorization backend is used, [1] is an easy
way to verify use credentials. Make sure each value is quoted appropriately for your shell.

Obviously the credentials can be changed. We recommend avoiding the "guest" user outside of local development
environments and creating a new one [2].



To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+unsubscribe@googlegroups.com.
To post to this group, send email to rabbitmq-users@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages