Unable to connect to RabbitMQ server in Azure

Viewed 33

I have followed the tutorial for installing RabbitMQ in Azure using Bitnami Cluster package and able to access the RabbitMQ portal using the IP Address and Port number from my local system.

But from my webapi controller, when I am trying to create a connection using the below code I'm getting error "RabbitMQ.Client.Exceptions.BrokerUnreachableException: 'None of the specified endpoints were reachable' ".

var factory = new ConnectionFactory()
        {
            HostName = "xxx.x.x.x",
            UserName = "user",
            Password = "password123",
            VirtualHost = "/",
            Port =15672
        };
        var connection = factory.CreateConnection();
        var channel = connection.CreateModel();

I have validated the hostname, port, username and password is correct and able to manually launch the RabbitMq server and login with same credentials.

Any help to resolve this issue is appreciated. Thanks in advance.

0 Answers
Related