I have a device that hosts node-red and my mqtt broker. I'm working on transitioning the node-red to a different host with more memory and I'm running into difficulties connecting to the mqqt broker on my original device. Both devices are on my local network, so I'm using the IP address of the device hosting the mqtt broker instead. However, it's simply not connecting and I'm wondering if somebody can assist me with troubleshooting steps. I have included some screen shots that might better illustrate what I'm working with.
When I do a trace route from my new node-red host to the mqtt broker, there's a single hop between the two devices.
I opened ports 1883 and 8883 on the firewall of both devices, so I'm assuming the firewall is not the issue.
I can connect to the mqtt://test.mosquitto.org:1883 on my new node-red host device.
You are right, it is an industrial unit and the broker is installed on the unit. I have worked with their support personal, and they said it should work but they are not very good at helping with troubleshooting.
Thanks for the help Steve-Mcl. As you suggested, I tried to connect to my broker with the app using its IP address and it could not connect. I was able to connect to two test brokers with the app. So the issue seems to be my broker??
I can ping the broker box from my Node-Red machine. That seems to work fine.
I ended up having to install a third party broker on my machine running node-red and it instantly connected. Seems like the broker on my original unit is bound to localhost, even though their support claims it should work.
I'm not totally satisfied with this solution, but I'm relieved that it's finally working after spending tons of time try to find the problem. Will probably have more time to troubleshoot sometime later....
Having it bound to 127.0.0.1 by default is obviously better for security - so I would also do that if I was shipping a generic product. It is probably a configuration option somewhere to change that to 0.0.0.0 (ie all interfaces)