title: rabbitMQ Connection timed out
body: <p>I have rabbitMQ server running on vm.
  I am following rabbitMQ java tutorial.
  It works fine locally on the vm but when trying to send from the host I get an exception</p>
  
  <pre><code>Exception in thread "main" java.net.ConnectException: Connection timed out: connect
  at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
  at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
  at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
  at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
  at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
  at java.net.PlainSocketImpl.connect(Unknown Source)
  at java.net.SocksSocketImpl.connect(Unknown Source)
  at java.net.Socket.connect(Unknown Source)
  at com.rabbitmq.client.impl.FrameHandlerFactory.create(FrameHandlerFactory.java:32)
  at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:714)
  at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:760)
  at Send.main(Send.java:16)
  </code></pre>
  
  <p>here is the send code i am using:</p>
  
  <pre><code>import com.rabbitmq.client.ConnectionFactory;
  import com.rabbitmq.client.Connection;
  import java.util.concurrent.TimeoutException;
  import com.rabbitmq.client.Channel;
  
  public class Send {
      private final static String QUEUE_NAME = "hello";
  
      public static void main(String[] args) throws java.io.IOException, TimeoutException {
  
              ConnectionFactory factory = new ConnectionFactory();
              factory.setHost("192.168.198.100");
              factory.setPort(5672);
              Connection connection = factory.newConnection();
              Channel channel = connection.createChannel();
  
              channel.queueDeclare(QUEUE_NAME, false, false, false, null);
              String message = "Hello World from Windows!";
              channel.basicPublish("", QUEUE_NAME, null, message.getBytes());
              System.out.println(" [x] Sent '" + message + "'");
  
              channel.close();
              connection.close();
  
          }
      }
  </code></pre>
  
  <p>I can ping the server at 192.168.198.100 but I can't access the managment UI at
  192.168.198.100:15672/</p>
  
  <p>So could anyone help me figure out what's wrong with this issue?
  Thanks in advance.  </p>