Rabbitmq Login Was Refused Using Authentication Mechanism Plain Updated FREE

Rabbitmq Login Was Refused Using Authentication Mechanism Plain

I am getting beneath exception

org.springframework.amqp.AmqpAuthenticationException: com.rabbitmq.client.AuthenticationFailureException: ACCESS_REFUSED - Login was refused using authentication mechanism PLAIN. For details see the banker logfile.

Configuration: RabbitMQ three.three.5 on windows

On Config file in %APPDATA%\RabbitMQ\rabbit.config I have done below change as per https://www.rabbitmq.com/admission-control.html

            [{rabbit, [{loopback_users, []}]}].                      

I also tried creating a user/pwd - test/exam doesn't seem to make it piece of work.

Tried the Steps from this post.

Other Configuration Details are as below:

Tomcat hosted Leap Application Context:

            <!-- Rabbit MQ configuration Start -->     <!-- Connection Factory -->     <rabbit:connection-factory id="rabbitConnFactory" virtual-host="/" username="guest" password="invitee" port="5672"/>      <!-- Leap AMQP Template -->     <rabbit:template id="rabbitTemplate" connection-factory="rabbitConnFactory" routing-key="ecl.down.queue" queue="ecl.downwards.queue" />      <!-- Spring AMQP Admin -->     <rabbit:admin id="admin" connection-factory="rabbitConnFactory"/>      <rabbit:queue id="ecl.down.queue" name="ecl.downwards.queue" />      <rabbit:direct-exchange proper noun="ecl.downwardly.commutation">         <rabbit:bindings>             <rabbit:binding central="ecl.down.key" queue="ecl.down.queue"/>         </rabbit:bindings>     </rabbit:straight-exchange>                      

In my Controller Grade

            @Autowired RmqMessageSender rmqMessageSender;  //Within a method rmqMessageSender.submitToECLDown(orderInSession.getOrderNo());                      

In My Message sender:

            import org.springframework.amqp.core.AmqpTemplate; import org.springframework.beans.mill.note.Autowired; import org.springframework.stereotype.Component;  @Component("messageSender") public course RmqMessageSender  {      @Autowired     AmqpTemplate                rabbitTemplate;      public void submitToRMQ(String orderId){         try{             rabbitTemplate.convertAndSend("Hello Earth");         } catch (Exception e){             LOGGER.fault(east.getMessage());         }     }        }                      

Above exception Block gives below Exception


org.springframework.amqp.AmqpAuthenticationException: com.rabbitmq.customer.AuthenticationFailureException: ACCESS_REFUSED - Login was refused using hallmark mechanism PLAIN. For details see the banker logfile.


Error Log

                          =ERROR Written report==== 7-November-2014::eighteen:04:37 === closing AMQP connection <0.489.0> (10.i.20.2XX:52298 -> x.1.Xx.2XX:5672):     {handshake_error,starting,0,                      {amqp_error,access_refused,                                  "PLAIN login refused: user 'guest' can merely connect via localhost",                                  'connection.start_ok'}}                      

Pls find below the pom.xml entry

                          <dependency>             <groupId>org.springframework.amqp</groupId>             <artifactId>spring-rabbit</artifactId>             <version>1.3.half-dozen.RELEASE</version>         </dependency>         <dependency>             <groupId>org.springframework.integration</groupId>             <artifactId>spring-integration-amqp</artifactId>             <version>four.0.four.RELEASE</version>         </dependency>                      

Please let me know if you accept any thoughts/suggestions

This question is tagged with rabbitmq spring-integration leap-amqp

~ Asked on 2014-11-07 23:42:52

I am sure what Artem Bilan has explained hither might exist i of the reasons for this error:

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

simply 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 admission it from virtual host and and then used the new user name and password instead of default invitee and that cleared the error.

enter image description here

~ Answered on 2015-03-21 00:05:26

To consummate @cpu-100 answer,

in case y'all don't want to enable/employ web interface, you tin can create a new credentials using control line like below and utilize it in your code to connect to RabbitMQ.

            $ rabbitmqctl add_user YOUR_USERNAME YOUR_PASSWORD $ rabbitmqctl set_user_tags YOUR_USERNAME administrator $ rabbitmqctl set_permissions -p / YOUR_USERNAME ".*" ".*" ".*"                      

~ Answered on 2016-12-22 15:09:50

user 'invitee' tin only connect via localhost

That's true since RabbitMQ 3.three.ten. Hence you should upgrade to the same version the client library, or just upgrade Spring AMQP to the latest version (if you use dependency managent system).

Previous version of client used 127.0.0.1 as default value for the host option of ConnectionFactory.

~ Answered on 2014-11-08 17:46:fifty

The error

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

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

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

~ Answered on 2016-07-29 15:05:28

To allow guest access remotely, write this

            [{rabbit, [{loopback_users, []}]}].                      

to here

            c:\Users\[your user proper noun]\AppData\Roaming\RabbitMQ\rabbitmq.config                      

then restart the rabbitmq windows service (Source https://www.rabbitmq.com/access-control.html)

~ Answered on 2016-11-xiv 09:57:18

For me the solution was simple: the user name is instance sensitive. Declining to employ the correct caps will also lead to the error.

~ Answered on 2019-03-19 fourteen:05:08

New solution:

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

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

Like one of the post-obit: : . ? + %


Original, wrong respond:

The error message clearly complains about using PLAIN, it does non hateful the crendentials are wrong, information technology means y'all must use encrypted data delivery (TLS) instead of plaintext.

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

~ Answered on 2017-04-06 14:32:27

just add login password to connect to RabbitMq

                          CachingConnectionFactory connectionFactory =           new CachingConnectionFactory("rabbit_host");   connectionFactory.setUsername("login");  connectionFactory.setPassword("countersign");                      

~ Answered on 2020-01-xvi 15:09:55

if yous apply the number as your password, maybe you should try to modify your password using string.

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

~ Answered on 2020-02-27 15:21:59

I fabricated exactly what @grepit made.

Only I had to made some changes in my Java code:

In Producer and Receiver projection I altered:

            ConnectionFactory manufacturing plant = new ConnectionFactory(); factory.setHost("your-host-ip"); factory.setUsername("username-yous-created"); factory.setPassword("username-password");                      

Doing that, yous are connecting an specific host as the user you have created. It works for me!

~ Answered on 2020-07-23 fifteen:27:55

I was facing this upshot due to empty infinite at the end of the countersign(spring.rabbitmq.password=rabbit ) in spring boot awarding.backdrop got resolved on removing the empty infinite. Hope this checklist helps some one facing this issue.

~ Answered on 2020-07-27 xx:05:34

set ConnectionFactory or Connectedness hostname to localhost

~ Answered on 2017-04-12 06:14:07

Rabbitmq Login Was Refused Using Authentication Mechanism Plain

DOWNLOAD HERE

Source: https://syntaxfix.com/question/7169/spring-amqp-rabbitmq-3-3-5-access-refused-login-was-refused-using-authentication-mechanism-plain

Posted by: willisthisn1965.blogspot.com

Comments