Mqtt node not connecting

NR 0.20.5
Node.js v12.10.0
Ubuntu 18.04.3 LTS

  • trying to deploy mqtt in and mqtt out nodes
  • connecting nodes to different 100% tested and running mqtt brokers (servers)
  • credentials are typed in properly
  • green dot (with the sign connected) not apearing
  • red dot (with the sign disconnected) not apearing
  • topic nor payload are not sent

On an other node-red installation ( 0.19.5) all is running fine

Restart node red in a terminal and post the log you get here. That is the log containing the message Welcome to node-red.

 nodered.service - Node-RED is a tool for wiring together hardware devices, APIs and online services in new and interesting ways.
   Loaded: loaded (/etc/systemd/system/nodered.service; enabled; vendor preset: enabled)
   Active: active (running) since Thu 2019-10-17 22:43:12 CEST; 1min 24s ago
     Docs: http://nodered.org/
 Main PID: 5468 (node-red)
    Tasks: 11 (limit: 4915)
   CGroup: /system.slice/nodered.service
           └─5468 node-red

Oct 17 22:43:14 husova.maxbox.cz Node-RED[5468]: If the system-generated key is lost for any reason, your credentials
Oct 17 22:43:14 husova.maxbox.cz Node-RED[5468]: file will not be recoverable, you will have to delete it and re-enter
Oct 17 22:43:14 husova.maxbox.cz Node-RED[5468]: your credentials.
Oct 17 22:43:14 husova.maxbox.cz Node-RED[5468]: You should set your own key using the 'credentialSecret' option in
Oct 17 22:43:14 husova.maxbox.cz Node-RED[5468]: your settings file. Node-RED will then re-encrypt your credentials
Oct 17 22:43:14 husova.maxbox.cz Node-RED[5468]: file using your chosen key the next time you deploy a change.
Oct 17 22:43:14 husova.maxbox.cz Node-RED[5468]: ---------------------------------------------------------------------
Oct 17 22:43:14 husova.maxbox.cz Node-RED[5468]: 17 Oct 22:43:14 - [info] Starting flows
Oct 17 22:43:15 husova.maxbox.cz Node-RED[5468]: 17 Oct 22:43:15 - [info] Started flows
Oct 17 22:43:15 husova.maxbox.cz Node-RED[5468]: 17 Oct 22:43:15 - [info] [mqtt-broker:11b65d93.b32232] Connected to broker: mqtt://maxbox.maxbox.cz:1883

Trying to add nodes pointing to the broker running on localhost

Oct 17 22:54:18 husova.maxbox.cz Node-RED[5468]: 17 Oct 22:54:18 - [info] [mqtt-broker:1044c0d8.71d067] Connected to broker: mqtt://127.0.0.1:1883
Oct 17 22:54:18 husova.maxbox.cz Node-RED[5468]: 17 Oct 22:54:18 - [info] [mqtt-broker:6c280899.73bfb8] Connected to broker: mqtt://172.19.100.1:1883
Oct 17 22:54:18 husova.maxbox.cz Node-RED[5468]: 17 Oct 22:54:18 - [info] [mqtt-broker:f2b7941d.92b59] Connected to broker: mqtt://localhost:1883

That isn't exactly what I asked, you have restarted it as a service rather than running it in a terminal, but no matter, as you can see it has connected to the mqtt brokers correctly.
You say they are not showing connected in the browser however. Are other nodes showing status ok?

None of the nodes (IN node nor OUT node) on the new server has a status sign (green nor red).
On the old NR server status signs are OK.

Even so, I can publish msg from the new NR to my old NR (using local or remote broker).

IN nodes (Subscribers) on the new NR server do not receive messages.

Hi @Petr

just to clarify, the log messages you've shared all show the client has connected.

So is this just a matter that the status in the editor doesn't reflect the true state of the connection?

Or is the client really not connected?

Old server
Screenshot%20from%202019-10-17%2023-18-08

New server

AFIK:

  • publisher nodes on new NR server are sending messages properly
  • subscriber nodes on old server are receiving messages
  • subscriber nodes on the new server are NOT receiving messages

It looks to me the problem is somewhere else:
Even such a simple configuration does not send the messages to the debugging window

So maybe the subscriber is receiving the message, but it is not apearing in the debug window.

The node status updates and the Debug sidebar messages all reach the editor via a WebSocket connection between the editor and runtime. If something is disrupting that connection then it would cause both to be blank.

But if it was simply a broken websocket connection then the editor would show a notification that it had lost its connection to the runtime.

Are you running Node-RED behind any kind of proxy?

Bingo.
I have connected to the virtual machine running in the network, where the NR server is running and voila:

BTW, editor on my PC was (is) showing me messages "connection lsot... reconnecting" (i dont remember exact text of message) often.
I was just thinking the connection quality (speed) is poor.