Can telnet to rabbitmq server on port 5672, but cannot connect via c# dotnet nor easynetQ?

1,791 views
Skip to first unread message

TheBear

unread,
Oct 14, 2015, 1:20:23 PM10/14/15
to rabbitmq-users
Hey guys,

I installed rabbitmq server on a vmware machine with static IP address: 192.168.1.120

From my local computer I can go to the vmware rabbitmq management plugin:

I can also telnet into it:
telnet 192.168.1.120 5672

However, when I try to run using the dotnet plugin or the easynetQ, it basically times out.

Here is my dotnet code:

ConnectionFactory connectionFactory = new ConnectionFactory();
            
connectionFactory.UserName = "my_username";
connectionFactory.Password = "my_password";
connectionFactory.HostName = "192.168.1.120";
connectionFactory.Port = 5672;

IConnection conn = connectionFactory.CreateConnection();


The error message I get for dotnet is: "BrokerUnreachableException"

And for the easynetQ, it doesn't give me an error but after 3 seconds the code continues but I can see that the object isConnected flag is set to false.

Does anyone have any idea on how to get my c# code connecting to the rabbitmq server?

Is there some setting I am missing, or simply shouldn't use vmware to run my rabbitmq server?

Many thanks.

Michael Klishin

unread,
Oct 14, 2015, 2:10:11 PM10/14/15
to rabbitm...@googlegroups.com, TheBear
Using VMware or virtualization in general is perfectly fine: most of our users do that.

What versions of the server and the client do you use?
Have you checked RabbitMQ logs? Are there any errors or inbound connections at all? 
--
MK

Staff Software Engineer, Pivotal/RabbitMQ


Tony

unread,
Oct 14, 2015, 3:07:23 PM10/14/15
to rabbitmq-users
I'm not familiar with easynetQ, but it certainly looks like your setup should work.  Have you tried capturing network traffic (wireshark) and on both machines when your code is executed?  The capture might shed some light on the reason.

TheBear

unread,
Oct 14, 2015, 6:02:23 PM10/14/15
to rabbitmq-users
OK I finally figured it out.

I did 2 things:

1. Uninstalled RabbitMQ and re-installed it using Administrator Privileges. All my settings were kept in tact. I then did a rabbitmqctl status, and I could see the node is up and running.

2. When I added a new user via the management plugin, I did NOT set the Virtual Host permissions for the new user.

Although this is totally a rookie mistake, the UI doesn't guide me at all to make sure the Virtual host permissions are properly set. 

Hope this helps anyone else that comes across this issue.

Michael Klishin

unread,
Oct 14, 2015, 6:04:43 PM10/14/15
to rabbitm...@googlegroups.com, TheBear
On 15 Oct 2015 at 01:02:25, TheBear (huber...@gmail.com) wrote:
> 2. When I added a new user via the management plugin, I did NOT
> set the Virtual Host permissions for the new user.

About which there is a message in the server log.

> Although this is totally a rookie mistake, the UI doesn't guide
> me at all to make sure the Virtual host permissions are properly
> set.

Do you have suggestions about how it could do that? For rabbitmqctl
we could output something like “please make sure your user has permissions
configured to one or more vhosts” but management UI is generally pretty
light on pop-up notifications like that. 

Hubert Tse

unread,
Oct 14, 2015, 6:17:57 PM10/14/15
to Michael Klishin, rabbitm...@googlegroups.com
That suggestion would work. Another one would be when you are in the "add user" section, also add a line where you can set the vhost as well?

Otherwise the flow doesn't make too much sense. I wanted to quickly add an admin by just filling out all the information asked of me in the "add user" section, but only to find it not to work since apparently there was more setting up to be done.

Or maybe could add it to the troubleshooting guide/FAQ if you don't want to add to the complexity of the UI?

I did some searching on google/stackoverflow but don't think I came across this particular scenario/solution.


TheBear

unread,
Oct 14, 2015, 6:19:48 PM10/14/15
to rabbitmq-users
That suggestion would work. Another one would be when you are in the "add user" section, also add a line where you can set the vhost as well?

Otherwise the flow doesn't make too much sense. I wanted to quickly add an admin by just filling out all the information asked of me in the "add user" section, but only to find it not to work since apparently there was more setting up to be done.

Or maybe could add it to the troubleshooting guide/FAQ if you don't want to add to the complexity of the UI?

I did some searching on google/stackoverflow but don't think I came across this particular scenario/solution.

Michael Klishin

unread,
Oct 14, 2015, 6:35:33 PM10/14/15
to rabbitm...@googlegroups.com, TheBear
On 15 Oct 2015 at 01:19:50, TheBear (huber...@gmail.com) wrote:
> That suggestion would work. Another one would be when you are
> in the "add user" section, also add a line where you can set the
> vhost as well?

It can’t be just one field then: it’d have to be 4 fields (vhost name and 3 permission patterns).
They perhaps can be pre-filled.

We’ll consider it. 
Reply all
Reply to author
Forward
0 new messages