# Mqtt nodes not connecting

**URL:** <https://discourse.nodered.org/t/mqtt-nodes-not-connecting/38950>\
**Category:** General\
**Created:** [11 January 2021 12:58 UTC](https://discourse.nodered.org/t/mqtt-nodes-not-connecting/38950 "2021-01-11T12:58:39Z")\
**Posts on this page:** 7\
**Page:** 2

<div class="post-metadata">

**Author:** ![ega](https://avatars.discourse-cdn.com/v4/letter/e/919ad9/32.png) [@ega](https://discourse.nodered.org/u/ega)\
**Post date:** [11 January 2021 18:05 UTC](https://discourse.nodered.org/t/mqtt-nodes-not-connecting/38950/21 "2021-01-11T18:05:26Z")

</div>

And I'll have a look at these pages, thanks

---

<div class="post-metadata">

**Author:** ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)\
**Post date:** [11 January 2021 18:15 UTC](https://discourse.nodered.org/t/mqtt-nodes-not-connecting/38950/22 "2021-01-11T18:15:36Z")

</div>

Try also this command to see your open ports;  
`sudo lsof -i -P -n | grep LISTEN`

In my RPi it looks like below. Port 1883 in use on IPv4 and IPv6

```auto
rpcbind 336 root 8u IPv4 14644 0t0 TCP *:111 (LISTEN)
rpcbind 336 root 11u IPv6 14647 0t0 TCP *:111 (LISTEN)
node 360 pi 21u IPv4 24325 0t0 TCP *:1880 (LISTEN)
owhttpd 539 Debian-ow 13u IPv4 17308 0t0 TCP *:2121 (LISTEN)
vncserver 563 root 10u IPv6 19745 0t0 TCP *:5900 (LISTEN)
vncserver 563 root 11u IPv4 19746 0t0 TCP *:5900 (LISTEN)
sshd 615 root 3u IPv4 19617 0t0 TCP *:22 (LISTEN)
sshd 615 root 4u IPv6 19619 0t0 TCP *:22 (LISTEN)
smbd 1325 root 32u IPv6 26671 0t0 TCP *:445 (LISTEN)
smbd 1325 root 33u IPv6 26672 0t0 TCP *:139 (LISTEN)
smbd 1325 root 34u IPv4 26673 0t0 TCP *:445 (LISTEN)
smbd 1325 root 35u IPv4 26674 0t0 TCP *:139 (LISTEN)
mosquitto 7665 mosquitto 5u IPv4 147522 0t0 TCP *:1883 (LISTEN)
mosquitto 7665 mosquitto 6u IPv6 147523 0t0 TCP *:1883 (LISTEN)

```

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [11 January 2021 18:33 UTC](https://discourse.nodered.org/t/mqtt-nodes-not-connecting/38950/23 "2021-01-11T18:33:13Z")

</div>

Do you have multiple client nodes trying to use the same id ? usually it is easiest to leave them blank at let it assign a random one

---

<div class="post-metadata">

**Author:** ![vikozo](https://avatars.discourse-cdn.com/v4/letter/v/858c86/32.png) [@vikozo](https://discourse.nodered.org/u/vikozo)\
**Post date:** [11 January 2021 18:37 UTC](https://discourse.nodered.org/t/mqtt-nodes-not-connecting/38950/24 "2021-01-11T18:37:03Z")

</div>

> [@ega](#):
>
> node-red in a cloud server. All mqtt nodes

so this are 2 Server?  
on the post where you show the Server Properties would it help to use the real IP Address and not localhost?  
And on the MQTT-Noder could you just add a Debug-node -maybe there will be a feedback.  
have a nice day  
vinc

---

<div class="post-metadata">

**Author:** ![ega](https://avatars.discourse-cdn.com/v4/letter/e/919ad9/32.png) [@ega](https://discourse.nodered.org/u/ega)\
**Post date:** [18 January 2021 11:16 UTC](https://discourse.nodered.org/t/mqtt-nodes-not-connecting/38950/25 "2021-01-18T11:16:23Z")

</div>

many ports:  
systemd-r 619 systemd-resolve 13u IPv4 15561 0t0 TCP 127.0.0.53:53 (LISTEN)  
mysqld 693 mysql 30u IPv4 140362 0t0 TCP 127.0.0.1:3306 (LISTEN)  
sshd 998 root 3u IPv4 19502 0t0 TCP \*:22 (LISTEN)  
sshd 998 root 4u IPv6 19513 0t0 TCP \*:22 (LISTEN)  
apache2 4265 www-data 4u IPv6 7101260 0t0 TCP \*:80 (LISTEN)  
apache2 4265 www-data 6u IPv6 7101264 0t0 TCP \*:443 (LISTEN)  
apache2 4266 www-data 4u IPv6 7101260 0t0 TCP \*:80 (LISTEN)  
apache2 4266 www-data 6u IPv6 7101264 0t0 TCP \*:443 (LISTEN)  
apache2 4267 www-data 4u IPv6 7101260 0t0 TCP \*:80 (LISTEN)  
apache2 4267 www-data 6u IPv6 7101264 0t0 TCP \*:443 (LISTEN)  
apache2 4268 www-data 4u IPv6 7101260 0t0 TCP \*:80 (LISTEN)  
apache2 4268 www-data 6u IPv6 7101264 0t0 TCP \*:443 (LISTEN)  
apache2 4269 www-data 4u IPv6 7101260 0t0 TCP \*:80 (LISTEN)  
apache2 4269 www-data 6u IPv6 7101264 0t0 TCP \*:443 (LISTEN)  
apache2 6465 www-data 4u IPv6 7101260 0t0 TCP \*:80 (LISTEN)  
apache2 6465 www-data 6u IPv6 7101264 0t0 TCP \*:443 (LISTEN)  
apache2 11948 www-data 4u IPv6 7101260 0t0 TCP \*:80 (LISTEN)  
apache2 11948 www-data 6u IPv6 7101264 0t0 TCP \*:443 (LISTEN)  
node-red 14235 root 13u IPv4 21797973 0t0 TCP \*:1880 (LISTEN)  
apache2 23823 root 4u IPv6 7101260 0t0 TCP \*:80 (LISTEN)  
apache2 23823 root 6u IPv6 7101264 0t0 TCP \*:443 (LISTEN)  
mosquitto 23892 mosquitto 3u IPv4 15662379 0t0 TCP 127.0.0.1:1883 (LISTEN)  
mosquitto 23892 mosquitto 4u IPv4 15662382 0t0 TCP \*:8883 (LISTEN)  
mosquitto 23892 mosquitto 5u IPv6 15662383 0t0 TCP \*:8883 (LISTEN)

---

<div class="post-metadata">

**Author:** ![ega](https://avatars.discourse-cdn.com/v4/letter/e/919ad9/32.png) [@ega](https://discourse.nodered.org/u/ega)\
**Post date:** [18 January 2021 11:22 UTC](https://discourse.nodered.org/t/mqtt-nodes-not-connecting/38950/26 "2021-01-18T11:22:01Z")

</div>

Hi all! Finally I changed in the mosquitto broker.conf file, in the certificates section, in the **cafile** line, **chain.pem** with **fullchain.pem** , I restarted mosquitto and it worked!  
I guess I had an obsolete indication...  
Thanks to all of you!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [1 February 2021 11:22 UTC](https://discourse.nodered.org/t/mqtt-nodes-not-connecting/38950/27 "2021-02-01T11:22:05Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.

[Previous page](https://discourse.nodered.org/t/mqtt-nodes-not-connecting/38950.md?page=1)
