Connection failed to connect to mqtt broker

Hi !

I am having pain to start with node red and Mqtt. My mqtt entity is constantly showing as “connecting”.

In node red console I have not really much information to troubleshoot.

Can you help me start troubleshooting?

Broker is mosquito Mqtt and I can connect from Mqtt explorer add-on in HA.

 Welcome to Node-RED
 ===================
 10 Jan 20:15:33 - [info] Node-RED version: v3.0.2
 10 Jan 20:15:33 - [info] Node.js  version: v18.12.1
 10 Jan 20:15:33 - [info] Linux 5.15.76-v8 arm64 LE
 10 Jan 20:15:35 - [info] Loading palette nodes
 10 Jan 20:15:40 - [info] Dashboard version 3.3.0 started at /endpoint/ui
 10 Jan 20:15:42 - [info] Settings file  : /etc/node-red/config.js
 10 Jan 20:15:42 - [info] Context store  : 'default' [module=memory]
 10 Jan 20:15:42 - [info] User directory : /config/node-red/
 10 Jan 20:15:42 - [warn] Projects disabled : editorTheme.projects.enabled=false
 10 Jan 20:15:42 - [info] Flows file     : /config/node-red/flows.json
 10 Jan 20:15:42 - [info] Server now running at http://127.0.0.1:46836/
 10 Jan 20:15:42 - [info] Starting flows
 10 Jan 20:15:42 - [info] Started flows
 10 Jan 20:15:42 - [info] [mqtt-broker:HomeAssistant broker] Connection failed to broker: mqtt://192.168.1.5
 [20:15:42] INFO: Starting NGinx...

Did you configure the mqtt node?

In your log I don’t see a port specified when it says “connection failed to broker”. MQTT should be on port 1883. Also be sure under the “security” tab make sure the mqtt user name and password is filled in.

I’m running node red in docker vs the addon so your settings on this could be a little different from mine

Thank you for your message I appreciate your help (sorry for the late reply).

As you can see, my configuration is not far from yours. Sending now the mqtt broker connection

I have no idea why the logs doesn’t show the port because it’s well described here !

image

My credential are verified and update accordingly in mqtt parameters.

But for sure the mqtt broker is working as mqtt explorer is able to connect to the broker

image

image

Any suggestion ? I installed / deleted / re-installed as well without success…

I added an mqtt out with an inject instead of an mqtt in with a debug. Choose the same broker in the list and deployed. It works…
I created back the mqtt in with a debug and it does work.

Complete no sense, thank you for your help anyway.