javaspringrabbitmq

RabbitMQ is running still getting connection refused Connect Exception


I have installed rabbit MQ 3.8.3 on windows 10 and I can see it is running as windows services. When I try to access http://localhost:15672/ it is unreachable.

I have enabled the rabbit MQ management plugin in sbin directory rabbitmq-plugins enable rabbitmq_management

But still, http://localhost:15672/ is unreachable.

Getting the following error in java service :

org.springframework.amqp.AmqpConnectException: java.net.ConnectException: Connection refused: connect

I have also run the command to see if anything is running on port 5672:

Command : netstat -ano | find "5672"

Response : TCP 0.0.0.0:25672 0.0.0.0:0 LISTENING 2900

How do I fix this?


Solution

    1. Stop rabbitmq
    2. Create the RABBITMQ_BASE environment variable set its value to full path of rabbit mq server. (eg. C:\Program Files\RabbitMQ Server)
    3. Restart the rabbit mq and make sure the rabbit mq plugin is enabled.