Spring AMQP + RabbitMQ 3.3.5 ACCESS_REFUSED - Login was refused using authentication mechanism PLAIN

后端 未结 12 1461
南笙
南笙 2020-12-01 00:43

I am getting below exception

org.springframework.amqp.AmqpAuthenticationException: com.rabbitmq.client.AuthenticationFailureException: ACCESS_REFUSED

相关标签:
12条回答
  • 2020-12-01 00:55

    The error

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

    can occur if the credentials that your application is trying to use to connect to RabbitMQ are incorrect or missing.

    I had this happen when the RabbitMQ credentials stored in my ASP.NET application's web.config file had a value of "" for the password instead of the actual password string value.

    0 讨论(0)
  • 2020-12-01 00:56

    I was facing this issue due to empty space at the end of the password(spring.rabbitmq.password=rabbit ) in spring boot application.properties got resolved on removing the empty space. Hope this checklist helps some one facing this issue.

    0 讨论(0)
  • 2020-12-01 01:00

    I am sure what Artem Bilan has explained here might be one of the reasons for this error:

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

    but the solution for me was that I logged in to rabbitMQ admin page (http://localhost:15672/#/users) with the default user name and password which is guest/guest then added a new user and for that new user I enabled the permission to access it from virtual host and then used the new user name and password instead of default guest and that cleared the error.

    enter image description here

    0 讨论(0)
  • 2020-12-01 01:00

    New solution:

    The node module can't handle : in a password properly. Even url encoded, like it would work normally, it does not work.

    Don't use typicalspecial characters from an URL in the password!

    Like one of the following: : . ? + %


    Original, wrong answer:

    The error message clearly complains about using PLAIN, it does not mean the crendentials are wrong, it means you must use encrypted data delivery (TLS) instead of plaintext.

    Changing amqp:// in the connection string to amqps:// (note the s) solves this.

    0 讨论(0)
  • 2020-12-01 01:00

    if you use the number as your password, maybe you should try to change your password using string.

    I can login using deltaqin:000000 on the website, but had this while running the program. then change the password to deltaiqn. and it works.

    0 讨论(0)
  • 2020-12-01 01:04

    set ConnectionFactory or Connection hostname to localhost

    0 讨论(0)
提交回复
热议问题