title: Rabbit MQ Fails to start with Spring Boot Run (Connection Refused)
body: <p>I was going to post this question but I think I've found an answer. I'm hoping someone can provide a reason why to further public knowledge.</p>
  
  <p>I am integrating RabbitMQ into my Spring Boot Application.</p>
  
  <p>Upon startup of my Spring boot Application I keep getting this stack trace</p>
  
  <pre><code>org.springframework.amqp.AmqpConnectException: java.net.ConnectException: Connection refused (Connection refused)
      at org.springframework.amqp.rabbit.support.RabbitExceptionTranslator.convertRabbitAccessException(RabbitExceptionTranslator.java:62) ~[spring-rabbit-2.0.5.RELEASE.jar:2.0.5.RELEASE]
      at org.springframework.amqp.rabbit.connection.AbstractConnectionFactory.createBareConnection(AbstractConnectionFactory.java:484) ~[spring-rabbit-2.0.5.RELEASE.jar:2.0.5.RELEASE]
      at org.springframework.amqp.rabbit.connection.CachingConnectionFactory.createConnection(CachingConnectionFactory.java:626) ~[spring-rabbit-2.0.5.RELEASE.jar:2.0.5.RELEASE]
      at org.springframework.amqp.rabbit.connection.ConnectionFactoryUtils.createConnection(ConnectionFactoryUtils.java:240) ~[spring-rabbit-2.0.5.RELEASE.jar:2.0.5.RELEASE]
      at org.springframework.amqp.rabbit.core.RabbitTemplate.doExecute(RabbitTemplate.java:1797) ~[spring-rabbit-2.0.5.RELEASE.jar:2.0.5.RELEASE]
      at org.springframework.amqp.rabbit.core.RabbitTemplate.execute(RabbitTemplate.java:1771) ~[spring-rabbit-2.0.5.RELEASE.jar:2.0.5.RELEASE]
      at org.springframework.amqp.rabbit.core.RabbitTemplate.execute(RabbitTemplate.java:1752) ~[spring-rabbit-2.0.5.RELEASE.jar:2.0.5.RELEASE]
  ... 
  Caused by: java.net.ConnectException: Connection refused (Connection refused)
      at java.net.PlainSocketImpl.socketConnect(Native Method) ~[na:1.8.0_172]
      at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) ~[na:1.8.0_172]
      at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) ~[na:1.8.0_172]
      at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) ~[na:1.8.0_172]
      at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[na:1.8.0_172]
  </code></pre>
  
  <p>I've cut RabbitMQ to bare bones and only have the dependency in the <code>pom.xml</code> and have the following in <code>application.properties</code></p>
  
  <pre><code>spring.rabbitmq.host=localhost
  spring.rabbitmq.port=15672
  spring.rabbitmq.username=guest
  spring.rabbitmq.password=guest
  </code></pre>
  
  <p>I verified that Rabbit MQ was up and running and could even go into the GUI</p>
  
  <p>My solution was to change <code>spring.rabbitmq.port</code> to <code>5672</code> (removing the 1)</p>
  
  <p>Can anyone provide a technical answer? Is it because RabbitMQ listens on that port 5672 and provides the front end only on 15672</p>