title: Access refused - Login was refused using authentication mechanism PLAIN RabbitMQ Queue
body: <p>I am trying to use RabbitMQ for posting messages from one application and receiving them in another.
  I am able to post messages using localhost.</p>
  
  <pre><code>ex:  amqp://guest:guest@localhost:5672
  </code></pre>
  
  <p>when i trying to post messages using different Ip getting below mention exception.</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>sample code:</p>
  
  <pre><code>private  Connection getConnection(){
      Connection connection = null;
      try {
          ConnectionFactory factory = new ConnectionFactory();
          final URI uri = URI.create(PropertyReader.read("rabbit.mq.uri").trim());
          factory.setConnectionTimeout(30000);
          factory.setAutomaticRecoveryEnabled(true);
          factory.setTopologyRecoveryEnabled(true);
          factory.setNetworkRecoveryInterval(10000);
          factory.setExceptionHandler(new DefaultExceptionHandler());
          factory.setRequestedHeartbeat(360); 
          factory.setUri(uri);
  
          connection = factory.newConnection();
          LOGGER.info("Rabbit MQ Connection established successfully");
      } catch (Exception e) {
          LOGGER.error("Error { }"+e);
      } 
      return connection;
  }
  </code></pre>
  
  <p>I need help for this.</p>
  
  <p>using telnet i checked provided Ip.</p>