title: RabbitMQ - ACCESS_REFUSED - Login was refused
body: <p>I'm using <code>rabbitmq-server</code> and fetch messages from it using a consumer written in Scala. This has been working like a charm but since I migrated my RabbitMQ server from a server to another, I get the following error when trying to connect to it:</p>
  
  <pre><code>com.rabbitmq.client.AuthenticationFailureException: ACCESS_REFUSED - Login was refused using authentication mechanism PLAIN. For details see the broker logfile.
  </code></pre>
  
  <p>In addition, the <code>rabbitmq-server</code> logs:</p>
  
  <pre><code>=INFO REPORT==== 18-Jul-2018::15:28:05 ===
  accepting AMQP connection &lt;0.7107.0&gt; (127.0.0.1:42632 -&gt; 127.0.0.1:5672)
  
  =ERROR REPORT==== 18-Jul-2018::15:28:05 ===
  Error on AMQP connection &lt;0.7107.0&gt; (127.0.0.1:42632 -&gt; 127.0.0.1:5672, state: starting):
  PLAIN login refused: user 'my_personal_user' - invalid credentials
  
  =INFO REPORT==== 18-Jul-2018::15:28:05 ===
  closing AMQP connection &lt;0.7107.0&gt; (127.0.0.1:42632 -&gt; 127.0.0.1:5672)
  </code></pre>
  
  <p>I went through every SO questions about authentication problems and found the following leads:</p>
  
  <ul>
  <li>My credentials are wrong </li>
  <li>I'm trying to connect with <code>guest</code> from
  remote</li>
  <li>My RabbitMQ version is not compatible with the consumer</li>
  </ul>
  
  <p>All those leads did not help me. My crendetials are good, I'm not using <code>guest</code> to connect but a privileged user with full access and admin I created and my RabbitMQ version did not change through the migration.</p>
  
  <p>NB: I migrated my RabbitMQ server from a separate server to the same as my consumer, so now the consumer is fetching from localhost. Don't know the consequences but I figured it could help you guys help me.</p>