title: ACCESS_REFUSED - Login was refused using authentication mechanism PLAIN
body: <p>I have installed "erlang" and "rabbitmq" in my windows 7 machine. But when I am trying to run this code I am getting One exception.</p>
  
   
  
  <pre><code>package com.rabbitmq;
  
  import com.rabbitmq.client.Channel;
  import com.rabbitmq.client.Connection;
  import com.rabbitmq.client.ConnectionFactory;
  public class SendMessage {
    private final static String QUEUE_NAME = "hello";
    public static void main(String[] argv) throws Exception { 
      ConnectionFactory factory = new ConnectionFactory();
      factory.setHost("localhost");
      Connection connection = factory.newConnection();
      Channel channel = connection.createChannel();
      channel.queueDeclare(QUEUE_NAME, false, false, false, null);
      String message = "Hello World!";
      channel.basicPublish("", QUEUE_NAME, null, message.getBytes("UTF-8"));
      System.out.println(" [x] Sent '" + message + "'");
      channel.close();
      connection.close();
    }
  }
  </code></pre>
  
  <p>I am getting this Exception.</p>
  
  <blockquote>
    <p>Exception in thread "main" com.rabbitmq.client.AuthenticationFailureException: ACCESS_REFUSED -
    Login was refused using authentication mechanism PLAIN. For details
    see the broker logfile.</p>
  </blockquote>
  
  <p>This is the log: </p>
  
  <blockquote>
    <p>11-Apr-2016::12:45:06 === Adding vhost 'localhost'</p>
    
    <p>=INFO REPORT==== 11-Apr-2016::14:08:52 === accepting AMQP connection &lt;0.360.0> (127.0.0.1:55327 -> 127.0.0.1:5672)</p>
    
    <p>=ERROR REPORT==== 11-Apr-2016::14:08:52 === Error on AMQP connection &lt;0.360.0> (127.0.0.1:55327 -> 127.0.0.1:5672, state: starting):  </p>
    
    <p>=INFO REPORT==== 11-Apr-2016::14:08:52 === closing AMQP connection &lt;0.360.0> (127.0.0.1:55327 -> 127.0.0.1:5672)</p>
  </blockquote>
  
  <p>When I am trying to list the users I am not getting any existing user and add_user is also not working in cmd <a href="http://i.stack.imgur.com/jrhY9.jpg" rel="noreferrer">link</a></p>