[fix] RabbitMQ: AuthenticationFailureException ACCESS_REFUSED Login refused authentication mechanism PLAIN


Exception in thread "main" 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:385)
 at com.rabbitmq.client.impl.recovery.RecoveryAwareAMQConnectionFactory.newConnection(RecoveryAwareAMQConnectionFactory.java:65)
 at com.rabbitmq.client.impl.recovery.AutorecoveringConnection.init(AutorecoveringConnection.java:160)
 at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:1216)
 at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:1173)
 at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:1131)
 at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:1294)
 at Send.main(Send.java:19)

[AMQP Connection 127.0.0.1:5672] WARN com.rabbitmq.client.impl.ForgivingExceptionHandler - 

An unexpected connection driver error occurred (Exception message: Socket closed)

FAILURE: Build failed with an exception.

Check the logs at the RabbitMQ server end:

2022-06-13 07:41:48.892031+00:00 [error] <0.1804.0> Error on AMQP connection <0.1804.0> (172.17.0.1:62846 -> 172.17.0.2:5672, state: starting):
2022-06-13 07:41:48.892031+00:00 [error] <0.1804.0> PLAIN login refused: user 'guest' - invalid credentials
2022-06-13 07:41:48.898324+00:00 [info] <0.1804.0> closing AMQP connection <0.1804.0> (172.17.0.1:62846 -> 172.17.0.2:5672)
Fix:

As you see that the login was refused due to invalid credentials, make sure you have provided the correct username and password. If you are using the default credentials the username and password both are guest

Advertisements
Try Out Code2care Dev Tools:

Advertisements



Android Java Linux Microsoft Google Python macOS Notepad++ Microsoft Teams CSS PHP SharePoint Html Linux C Programs Bootstrap jQuery Sublime Android Studio Facebook Eclipse WhatsApp News MySQL Json HowTos JavaScript FTP S3


Advertisements


Code2care is an initiative to publish and share varied knowledge in programming and technical areas gathered during day-to-day learnings and development activities.

Students and Software Developers can leverage this portal to find solutions to their various queries without re-inventing the wheel by referring to our easy to understand posts. Technical posts might include Learnings, Tutorials, Trouble-Shooting steps, Video Tutorials, Code Snippets, How Tos, Blogs, Articles, etc.
🎉 We are celebrating the 10th years of Code2care! Thank you for all your support! We hope we made a difference.
We strong support Gender Equality & Diversity.

We stand in solidarity with Ukraine - Make a donation to UNHCR - https://donate.unhcr.org/in/en-in/ukraine-emergency