# MQTT Out still connecting to Thingsboard

**URL:** <https://discourse.nodered.org/t/mqtt-out-still-connecting-to-thingsboard/99138>\
**Category:** General\
**Tags:** mqtt\
**Created:** [23 September 2025 03:10 UTC](https://discourse.nodered.org/t/mqtt-out-still-connecting-to-thingsboard/99138 "2025-09-23T03:10:03Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![adysaputra](https://avatars.discourse-cdn.com/v4/letter/a/e495f1/32.png) [@adysaputra](https://discourse.nodered.org/u/adysaputra)\
**Post date:** [23 September 2025 03:10 UTC](https://discourse.nodered.org/t/mqtt-out-still-connecting-to-thingsboard/99138/1 "2025-09-23T03:10:03Z")

</div>

My goal is to send data to Thingsboard with the device name “A.” However, when I deploy the Node Mqtt Out status, it always says connecting. I have confirmed that the device token is correct, the server is the IP of the MQTT Broker, and I am using port 1883. The problem is that it always says connecting, but when I send it to Thingsboard Cloud, the status is connected. How can I fix this?

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/0/50c9532fc1c6c0a036323cadd67c5e8c34f7551d.png)

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [23 September 2025 03:33 UTC](https://discourse.nodered.org/t/mqtt-out-still-connecting-to-thingsboard/99138/2 "2025-09-23T03:33:58Z")

</div>

Welcome to the forum @adysaputra.

> [@adysaputra](#):
>
> I am using port 1880.

Doesn't MQTT use port 1883?

---

<div class="post-metadata">

**Author:** ![adysaputra](https://avatars.discourse-cdn.com/v4/letter/a/e495f1/32.png) [@adysaputra](https://discourse.nodered.org/u/adysaputra)\
**Post date:** [23 September 2025 03:39 UTC](https://discourse.nodered.org/t/mqtt-out-still-connecting-to-thingsboard/99138/3 "2025-09-23T03:39:04Z")

</div>

Oh yes, Sorry I mean port 1883

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [23 September 2025 06:50 UTC](https://discourse.nodered.org/t/mqtt-out-still-connecting-to-thingsboard/99138/4 "2025-09-23T06:50:39Z")

</div>

So if you open the `MQTT OUT` node what do you see?

(Screen shot)

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [23 September 2025 06:59 UTC](https://discourse.nodered.org/t/mqtt-out-still-connecting-to-thingsboard/99138/5 "2025-09-23T06:59:29Z")

</div>

From where Node-RED is running (not the browser, but where Node-RED is installed), can you ping the on-prem server? Can you use something like MQTT Explorer or Moquitto command-line tools `mosquitto_pub`/`mosquitto_sub` to check connectivity?

---

<div class="post-metadata">

**Author:** ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)\
**Post date:** [23 September 2025 07:03 UTC](https://discourse.nodered.org/t/mqtt-out-still-connecting-to-thingsboard/99138/6 "2025-09-23T07:03:30Z")

</div>

Does a simple 'back-to-back' test using your local broker work?

 ![tues_mqtt_test](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/d/1db81548fcdb76bf25d5618dec16bae9c009df03.png)

```auto
[{"id":"4558364fe9cbbfe7","type":"tab","label":"Simple MQTT test","disabled":false,"info":"","env":[]},{"id":"2e71707328dac480","type":"mqtt in","z":"4558364fe9cbbfe7","name":"","topic":"test","qos":"2","datatype":"auto-detect","broker":"bfab6cb6c0d14073","nl":false,"rap":true,"rh":0,"inputs":0,"x":190,"y":240,"wires":[["2ed55d26c885245e"]]},{"id":"9d2e8fd62b0e1695","type":"mqtt out","z":"4558364fe9cbbfe7","name":"","topic":"test","qos":"","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"bfab6cb6c0d14073","x":370,"y":160,"wires":[]},{"id":"5aa5b294df8c96c0","type":"inject","z":"4558364fe9cbbfe7","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"Hello World","payloadType":"str","x":210,"y":160,"wires":[["9d2e8fd62b0e1695"]]},{"id":"2ed55d26c885245e","type":"debug","z":"4558364fe9cbbfe7","name":"debug 3515","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":390,"y":240,"wires":[]},{"id":"bfab6cb6c0d14073","type":"mqtt-broker","name":"","broker":"127.0.0.1","port":"1883","clientid":"","autoConnect":true,"usetls":false,"protocolVersion":"4","keepalive":"60","cleansession":true,"autoUnsubscribe":true,"birthTopic":"","birthQos":"0","birthRetain":"false","birthPayload":"","birthMsg":{},"closeTopic":"","closeQos":"0","closeRetain":"false","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willRetain":"false","willPayload":"","willMsg":{},"userProps":"","sessionExpiry":""}]

```

---

<div class="post-metadata">

**Author:** ![adysaputra](https://avatars.discourse-cdn.com/v4/letter/a/e495f1/32.png) [@adysaputra](https://discourse.nodered.org/u/adysaputra)\
**Post date:** [23 September 2025 07:35 UTC](https://discourse.nodered.org/t/mqtt-out-still-connecting-to-thingsboard/99138/7 "2025-09-23T07:35:23Z")

</div>

I Try use Mosquitto Explorer and Disconnected

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [23 September 2025 07:36 UTC](https://discourse.nodered.org/t/mqtt-out-still-connecting-to-thingsboard/99138/8 "2025-09-23T07:36:51Z")

</div>

Unfortunately, we are not mind readers 😉

> I Try use Mosquitto Explorer

You tried where? on which machine?

> Disconnected

What disconnected/how/what did you see? Details please otherwise it is impossible to help!

---

<div class="post-metadata">

**Author:** ![adysaputra](https://avatars.discourse-cdn.com/v4/letter/a/e495f1/32.png) [@adysaputra](https://discourse.nodered.org/u/adysaputra)\
**Post date:** [23 September 2025 07:38 UTC](https://discourse.nodered.org/t/mqtt-out-still-connecting-to-thingsboard/99138/9 "2025-09-23T07:38:20Z")

</div>

Sorry, I Try MQTT Explorer in my computer and i set server to my thingsboard server. And status is disconnected

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [23 September 2025 07:39 UTC](https://discourse.nodered.org/t/mqtt-out-still-connecting-to-thingsboard/99138/10 "2025-09-23T07:39:33Z")

</div>

> [@adysaputra](#):
>
> I Try MQTT Explorer in my computer

Is this the same computer where Node-RED is installed (not where you access Node-RED from in the browser) (they can be different computers)

If the answer is yes, then you have your answer!

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [23 September 2025 07:53 UTC](https://discourse.nodered.org/t/mqtt-out-still-connecting-to-thingsboard/99138/11 "2025-09-23T07:53:29Z")

</div>

> [@adysaputra](#):
>
> I Try MQTT Explorer

If MQTT Explorer cannot connect that it is not a node-red problem, it is a problem with thingsboard server, or the access to it.

---

<div class="post-metadata">

**Author:** ![adysaputra](https://avatars.discourse-cdn.com/v4/letter/a/e495f1/32.png) [@adysaputra](https://discourse.nodered.org/u/adysaputra)\
**Post date:** [23 September 2025 07:54 UTC](https://discourse.nodered.org/t/mqtt-out-still-connecting-to-thingsboard/99138/12 "2025-09-23T07:54:27Z")

</div>

My Node-Red is running on an on-premise server, and I don't have access to the virtual machine running Node-Red. So I tried to establish MQTT communication from my personal laptop to the Thingsboard server, which is also installed on-premise. My laptop cannot connect to Thingsboard even though it is on the same network and the Node-Red status is also connecting. I tried sending data to Thingsboard cloud and it worked. So, in your opinion, is there an error in the Thingsboard server or the configuration in Node-Red?

---

<div class="post-metadata">

**Author:** ![adysaputra](https://avatars.discourse-cdn.com/v4/letter/a/e495f1/32.png) [@adysaputra](https://discourse.nodered.org/u/adysaputra)\
**Post date:** [23 September 2025 07:55 UTC](https://discourse.nodered.org/t/mqtt-out-still-connecting-to-thingsboard/99138/13 "2025-09-23T07:55:40Z")

</div>

Thank you, I agree. However, I haven't been able to access the ThingsBoard server, so I'm asking for your opinions in case there is something wrong with my Node-Red configuration.

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [23 September 2025 07:59 UTC](https://discourse.nodered.org/t/mqtt-out-still-connecting-to-thingsboard/99138/14 "2025-09-23T07:59:39Z")

</div>

@adysaputra  
Could you post the screenshot of the MQTT OUT node to that other server opened?

It may not be the solution, but may show something words are missing.

---

<div class="post-metadata">

**Author:** ![adysaputra](https://avatars.discourse-cdn.com/v4/letter/a/e495f1/32.png) [@adysaputra](https://discourse.nodered.org/u/adysaputra)\
**Post date:** [23 September 2025 08:07 UTC](https://discourse.nodered.org/t/mqtt-out-still-connecting-to-thingsboard/99138/15 "2025-09-23T08:07:49Z")

</div>

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/8/b892bbeab149e48ef5ba32e8406af97320d6718f.png)  
 ![Screenshot 2025-09-23 150536](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/5/55d47fbb1467bb7de0f601a19a7f4f71bf3e6b76.png)

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [23 September 2025 08:19 UTC](https://discourse.nodered.org/t/mqtt-out-still-connecting-to-thingsboard/99138/16 "2025-09-23T08:19:04Z")

</div>

Ok, looking good so far.

Just below the `keep alive`.....

what about the `use clean session`?

🤷

Sorry, just trying to get an idea of what's going on.

Another thing.....

(As asked by others)

Ok, you've hidden the IP address of the server.  
(Not sure why, it is a public server.)

Go to a CLI/Terminal/(what ever) and try to ping it.

---

<div class="post-metadata">

**Author:** ![adysaputra](https://avatars.discourse-cdn.com/v4/letter/a/e495f1/32.png) [@adysaputra](https://discourse.nodered.org/u/adysaputra)\
**Post date:** [23 September 2025 08:23 UTC](https://discourse.nodered.org/t/mqtt-out-still-connecting-to-thingsboard/99138/17 "2025-09-23T08:23:26Z")

</div>

I cannot ping that IP address because ICMP communication is closed. Only TCP communication through port 1883 is open. When I telnet , the port is open but communication is not possible.

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [23 September 2025 08:28 UTC](https://discourse.nodered.org/t/mqtt-out-still-connecting-to-thingsboard/99138/18 "2025-09-23T08:28:00Z")

</div>

Ok, was just wondering.

I did a quick look about `Pandaan`.... And it is said it is NOT an MQTT BROKER.

But is more an intermediate place.

`Pushes messages to an MQTT broker. `

So I am not sure you are using the correct _BROKER_.

_(Above my pay grade)_

Can someone else clarify this?

Ok, from the `AI` part of the reply.

```auto
"Pandaan" does not refer to a known MQTT broker; instead, the term "Pandaan" likely refers to Mustang Panda, a Chinese advanced persistent threat (APT) group that has been observed using the MQTT protocol, sometimes with a custom backdoor known as MQsTTang, for Command and Control (C2) communication with compromised systems. To clarify, a standard MQTT broker is a central server in the MQTT publish-subscribe architecture that routes messages between clients, while MQsTTang is a malware component used by the Mustang Panda APT group, not a legitimate broker. 
Understanding the Distinction

    MQTT Broker (Standard):
    A legitimate server software designed to manage IoT and machine-to-machine communication. It facilitates message exchange between publishers and subscribers, ensuring data flows between devices in a decoupled manner. 

MQsTTang (Malware):
A backdoor used by the Mustang Panda APT group to establish C2 communication with infected devices. It leverages the MQTT protocol to send and receive commands and data between the malware and the attacker's server, not for general purpose IoT communication. 

Key Points: 

    Mustang Panda is a known APT group.
    MQsTTang is their specific malware that uses the MQTT protocol for C2 communication.
    When searching for "Pandaan MQTT broker," you're likely encountering discussions about this specific malware and its malicious use of MQTT, not a legitimate broker service.

```

I don't know how much credence to give it, but I'd be worried.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [23 September 2025 08:34 UTC](https://discourse.nodered.org/t/mqtt-out-still-connecting-to-thingsboard/99138/19 "2025-09-23T08:34:12Z")

</div>

> [@adysaputra](#):
>
> My laptop cannot connect to Thingsboard even though it is on the same network

Forget about node-red and fix that first.

---

<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:** [22 December 2025 08:34 UTC](https://discourse.nodered.org/t/mqtt-out-still-connecting-to-thingsboard/99138/20 "2025-12-22T08:34:21Z")

</div>

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