Node-Red connection issues with MQTT

Hello everyone,

I have a connection problem from the Node-RED integration to the MQTT integration.

My MQTT topics in Node-RED are not connecting:

image

I can connect to Gladys’ MQTT with MQTTX without any problem.

An example of a topic on Node-RED:

The MQTT broker config in Node-RED:

I may be mistaken but I noticed that in Security the password length is not the same after deployment:

Before:

After deployment:

Is that the problem? :confused:

For those who might be interested, here’s what the flow looks like:

For more info, feel free to ask!

Hi @Xenicle !

[quote=« Xenicle, post:1, topic:8699 »]
Is the problem there? :confused

1 Like

I tried with the MQTT V3.1.1 protocol:

And, after deployment, still no connection…

If in doubt about the password, can you try to re-save the password by following:

I tried disabling that in Brave, but also in Firefox with no saved passwords and the same login problem… :triumph:

I can even see that nice try at saving the correct password.

Is it normal that in the Docker bridge there is no eclipse-mosquitto:

docker network inspect bridge
"...
Containers": {
            "07047a22b4ce0d70099c959d957516813b41c7d726431c16f7e0104af363c924": {
                "Name": "gladys-node-red",
                "EndpointID": "6f225535c88d71a8f3e81eb2d09e111e0d409b532840012ecbbf0a9e540d268d",
                "MacAddress": "02:42:ac:11:00:03",
                "IPv4Address": "172.17.0.3/16",
                "IPv6Address": ""
            },
            "d5ee1ba9aad7331016b95a42c8d9f7d7e3639bdf257d1aaed8ec20f54411bbc0": {
                "Name": "watchtower",
                "EndpointID": "e7ebe4ca4c4ac1945884afd65f0598517b0e25dc1c12678c2ca6e6383528bec2",
                "MacAddress": "02:42:ac:11:00:02",
                "IPv4Address": "172.17.0.2/16",
                "IPv6Address": ""
            }
        },
...

And that eclipse-mosquitto has no IP?

docker inspect eclipse-mosquitto
"...
Networks": {
                "host": {
                    "IPAMConfig": null,
                    "Links": null,
                    "Aliases": null,
                    "NetworkID": "c52c79bdb90384fdc2b909c0d7db9432c5ae7cd45bcaf68ecb70122e5cd783cf",
                    "EndpointID": "b16e687927eff9372ac097d230233212444024c23a3a7b04e8f40aaae3878c58",
                    "Gateway": "",
                    "IPAddress": "",
                    "IPPrefixLen": 0,
                    "IPv6Gateway": "",
                    "GlobalIPv6Address": "",
                    "GlobalIPv6PrefixLen": 0,
                    "MacAddress": "",
                    "DriverOpts": null
                }
            }
...

With the URL on the Pi’s external IP it works!!!

:crazy_face:

What can I do to fix this mosquito that’s going bbzzzzzzzzzzzz ? :rofl:

Ah, in that case I can’t help you, I don’t use eclipse-mosquitto but a mosquitto installed next to Gladys on a different Pi^^. Same for node-red!!

Strange indeed…

Well, that’s already something :sweat_smile:

1 Like

Yes that’s already something, in the meantime thanks for your help! :wink:

1 Like

@Xenicle
Apparently it can no longer resolve the localhost IP 127.0.0.1
This can happen after a Node-RED update
Export your flows, stop Node-RED, delete the flows.json file, restart Node-RED and re-import your flows

Thanks @cce66, I tried that solution and it didn’t change anything: still no connection on localhost…

(on the other hand the flows.json file wasn’t recreated afterwards…)

did you reimport it?

Yes, I did reimport my flow via the Node-RED interface…

You’d think the file was recreated elsewhere ^^

image

Did you deploy? Did you restart the streams?

Yes, several times…

But I must have broken something with Docker a few weeks ago…

I think I’ll take advantage of Gladys Plus to reinstall the Pi! :confused:

Back up your flows to your email

But it’s surprising that

1 Like

Thanks for the tutorial on backing up the flows!

Reinstallation is in progress…