Connecting never happens

I have node-red running on a groov Epic(192.168.1.130) and I'm editing it on a laptop (.160). I installed the eclipse MQTT broker on a different computer (.150) plugged into the same unmanaged switch as the Epic. I have mosquitto running on the .150 and have opened port 1883 in the firewall. I can ping the .130 from the .150 so I know they can talk.

This is my flow:

The problem is that it never moves from connecting to connected. What am I missing?

You have not shown how your mqtt node is configured.

Thank you for the reminder!
image

Show us the config when you click the pencil icon to right of server.

A welcome to the forum.

Have you got mosquitto and the Eclipse broker (whatever that is) both running on .150? You can't run two brokers on one machine (at least not on the same port).

when you type mosquitto in consol, what is returned?

Sorry. I am new to this so my terminology may be incorrect. The MQTT broker I downloaded is the Eclipse version. That may mean nothing at all but I didn't know so I included it.

When I type mosquitto in the console nothing happens and usual prompt reappears immediately.

Then it looks like mosquitto is not running or installed.

Mosquitto is running. I started it with net start mosquitto.

When I retype net start mosquitto it says the requested service has already been started

Try using something like MQTT explorer on the same machine - can it connect?

Other observations...

  • Don't start topics with a /
  • Don't use legacy mode unless you need to.

Question - the firewall - did you open TCP 1883?

Yes I did open the port. I created a rule for both outgoing and incoming.

I opened a second command line window on the .150 and published to a topic that I had subscribed to in the other window. I received 'hello world' from myself.

I will try the same thing on the .130 right now.

I read somewhere that the Eclipse version of MQTT broker may be the legacy version, so I checked that box in my troubleshooting efforts.

I will try changing the / prefix as well.

BRB

On the machine that is running node-red I changed the IP address for the config to the 192.168.1.130. Is that the correct method for testing it on the local machine? It is doing the same thing (connecting forever).

This is my log. I must be doing something wrong in the flow. I changed the port ID just to test that.

Confirm the ip of the machine running Mosquitto.

I did an ipconfig and got 192.168.1.150 on that machine.

The machine that is running node red is this one (groov Epic):

Because I tried your method of using itself I think there is something I don't know about the groov Epic at .130 that is giving me the problem.

so 150 is the ip you need to use,

the firewall on windows , try disabling it and any firewall on router.

I still don't understand this. You must only run one broker. You can't run mosquitto and the eclipse broker at the same time. I suggest you disable the Eclipse one and stick to mosquitto.
I didn't see whether you tried running mqtt explorer or similar on the node red machine and see if it can talk to the .150 broker. That will tell you whether it is a node red problem or a problem accessing the broker.