I have a simple RabbitMQ test program that sends and then receives a message to a RabbitMQ server. I have two computers and I’ve found that whether or not my code works depends on which computer hosts the RabbitMQ server. Here is my situation (excuse my MS Paint):

- If computer A hosts the server and runs the code, sending a message from A to A, it works.
- If computer A hosts the server and my code runs on computer B, sending a message from B to A, it works.
- If computer B hosts the server and my code runs on computer A, sending a message from A to B, I get an exception that says “None of the specified endpoints were reachable”.
- If computer B hosts the server and runs the code, sending a message from B to B, it works.
I can’t figure out why scenario #3 doesn’t work for me.
- I don’t think it’s the code because three of my scenarios work exactly as I expect them to.
- I don’t think it’s a firewall issue because I ran these tests with my firewalls turned off on both computers.
- I don’t think it’s a problem with the RabbitMQ server on computer B because it is able to communicate with itself just fine (scenario #4).
- I checked the RabbitMQ log files on computer B after trying scenario #3, but I don’t see anything that says something about an attempted connection. I think computer A is simply unable to see computer B when sending requests.
My question, very generally is, what are some things that I should be looking for that might point to my problem? There must be some setting that is checked on computer A but is not checked on computer B. Computer B has the default installation of Erlang and RabbitMQ. I’m pretty sure computer A is also set to the defaults (I didn’t install it as recently).
Please help.
The issue is only evident when A tries to connect to B, so:
nslookup bfor this.ping bwill be helpful for this.telnet b 5672. If you get a blank screen that means the connection was accepted. I’m betting you’ll get some sort of error though. Try this trick first using b’s IP address and then if that works try it with the hostname of b to make sure it resolves.In summary, just strip it down to pure network checks (no RabbitMQ involved) and work from there.