Very strange. on one instance of node red on a raspberry pi all MQTT nodes stopped working earlier. All are showing "disconnected". From a laptop running node red I can connect to all the MQTT servers.
I would appreciate any recommendations how to debug this.
mmm. many questions to ask..
so you have more than one MQTT server ?
Are your MQTT instances running in which machine , same on as your Node-RED instance ?
How do you configure the MQTT server in the node , via ip adddress or host name ?
First thing i would check is if the machine hosting MQTT changed it ip address.
Hi @Andrei, 3 servers on different machines all configured with ip address, including the problem instance. I can connect from all the other instances to the MQTT server on the problem machine. The ip address has not changed!
Good, so we can discard ip connectivity issues between machines.
Well, the second thing that comes to my mind is checking the status os the MQTT service. Assuming you have installed mosquitto under Raspbian you would issue the command: systemctl status mosquitto
odroid@odroid:~$ systemctl status mosquitto
â—Ź mosquitto.service - LSB: mosquitto MQTT v3.1 message broker
Loaded: loaded (/etc/init.d/mosquitto; generated)
Active: active (running) since Wed 2020-10-21 10:51:20 -03; 1 months 4 days ago
An issue was reported earlier this week regarding the MQTT nodes and Node 8.
We updated to the latest mqtt module in 1.2.5 - looks like it breaks on Node 8. Need to investigate properly - may need to do 1.2.6 with a reverted version of the mqtt module, unless we can find a way to workaround the issue to keep node 8 going...
The alternative is to upgrade off Node 8 (which reached its end of life 10 months ago).
ReferenceError: URL is not defined
at Object.connect (/usr/lib/node_modules/node-red/node_modules/mqtt/lib/connect/index.js:64:18)
at MQTTBrokerNode.connect (/usr/lib/node_modules/node-red/node_modules/@node-red/nodes/core/network/10-mqtt.js:245:40)
at MQTTBrokerNode.register (/usr/lib/node_modules/node-red/node_modules/@node-red/nodes/core/network/10-mqtt.js:221:22)
at new MQTTOutNode (/usr/lib/node_modules/node-red/node_modules/@node-red/nodes/core/network/10-mqtt.js:504:29)
at Object.createNode (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/flows/util.js:493:31)
at Flow.start (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/flows/Flow.js:194:48)
at start (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/flows/index.js:345:33)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:189:7)
ReferenceError: URL is not defined
at Object.connect (/usr/lib/node_modules/node-red/node_modules/mqtt/lib/connect/index.js:64:18)
at MQTTBrokerNode.connect (/usr/lib/node_modules/node-red/node_modules/@node-red/nodes/core/network/10-mqtt.js:245:40)
at MQTTBrokerNode.register (/usr/lib/node_modules/node-red/node_modules/@node-red/nodes/core/network/10-mqtt.js:221:22)
at new MQTTOutNode (/usr/lib/node_modules/node-red/node_modules/@node-red/nodes/core/network/10-mqtt.js:504:29)
at Object.createNode (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/flows/util.js:493:31)
at Flow.start (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/flows/Flow.js:194:48)
at start (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/flows/index.js:345:33)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:189:7)