# Unable to connection mqtt

**URL:** <https://discourse.nodered.org/t/unable-to-connection-mqtt/56542>\
**Category:** General\
**Tags:** mqtt\
**Created:** [12 January 2022 15:44 UTC](https://discourse.nodered.org/t/unable-to-connection-mqtt/56542 "2022-01-12T15:44:51Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![MrEngineer](https://avatars.discourse-cdn.com/v4/letter/m/96bed5/32.png) [@MrEngineer](https://discourse.nodered.org/u/MrEngineer)\
**Post date:** [12 January 2022 15:44 UTC](https://discourse.nodered.org/t/unable-to-connection-mqtt/56542/1 "2022-01-12T15:44:51Z")

</div>

hallo,  
first of all happy new year!!!  
for my work i want to experience someting. i have an arduino mkr1310 with LoRa. I'am able to connect the microcontroller with kpn. Now i want to send the data from KPN to Node-red with mqtt. i did some research online, and it looks very simple but unfortuned i can every time connection failed.  
i do not see my mistake so if somoine has see it of have some ideas i will be thankfull.

 ![KPN](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/4/14b6fdd71df7b268f1a0fc218ddf40333f803d22.png)  
 ![result](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/2/1282f6c2ed661de1d7749a48524ea8cd675ba6fd.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:** [12 January 2022 16:07 UTC](https://discourse.nodered.org/t/unable-to-connection-mqtt/56542/2 "2022-01-12T16:07:12Z")

</div>

hi @MrEngineer. welcome to the forum.

Perhaps your post would be better categorised as a General query than Share Your Projects?

Does [mqtt.arduino.org](http://mqtt.arduino.org) exist? I can't find anything about it online.

Does it work if you use (for testing only) [test.mosquitto.org](http://test.mosquitto.org)?

---

<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:** [12 January 2022 17:09 UTC](https://discourse.nodered.org/t/unable-to-connection-mqtt/56542/3 "2022-01-12T17:09:22Z")

</div>

firstly, uninstall node-red-contrib-mqtt - the built in MQTT nodes are more up to date.

Secondly, where are you running node-red? looks like a windows PC

Can you ping `mqtt.arduino.org` from a cmd window on this device?

---

<div class="post-metadata">

**Author:** ![alsak0de](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/alsak0de/32/52600_2.png) [@alsak0de](https://discourse.nodered.org/u/alsak0de)\
**Post date:** [13 January 2022 01:56 UTC](https://discourse.nodered.org/t/unable-to-connection-mqtt/56542/4 "2022-01-13T01:56:13Z")

</div>

while [mqtt.arduino.org](http://mqtt.arduino.org) responds to a ping request it does not seem to be providing any service. I've been trying to connect through a regular mqtt client and it won't connect so.. not your fault.  
You'd need an mqtt server to place your data into.

---

<div class="post-metadata">

**Author:** ![MrEngineer](https://avatars.discourse-cdn.com/v4/letter/m/96bed5/32.png) [@MrEngineer](https://discourse.nodered.org/u/MrEngineer)\
**Post date:** [13 January 2022 07:33 UTC](https://discourse.nodered.org/t/unable-to-connection-mqtt/56542/5 "2022-01-13T07:33:25Z")

</div>

Hi @jbudd,

Thank you, and my appology. i'am going to see if i can change the category. 🙂

---

<div class="post-metadata">

**Author:** ![MrEngineer](https://avatars.discourse-cdn.com/v4/letter/m/96bed5/32.png) [@MrEngineer](https://discourse.nodered.org/u/MrEngineer)\
**Post date:** [13 January 2022 07:40 UTC](https://discourse.nodered.org/t/unable-to-connection-mqtt/56542/6 "2022-01-13T07:40:25Z")

</div>

hi @Steve-Mcl,  
first of all, thank you very mutch for the info 🙂 .

1. yes it was my plan to unstall it, because it was my first time using node red i was trying out some stuff.
2. i'm running node red on a virtual windows pc. i did some research and in some circomstances it can cause connection problems because the virtual pc network has to go through the physical pc.
3. going to try it

---

<div class="post-metadata">

**Author:** ![MrEngineer](https://avatars.discourse-cdn.com/v4/letter/m/96bed5/32.png) [@MrEngineer](https://discourse.nodered.org/u/MrEngineer)\
**Post date:** [13 January 2022 08:24 UTC](https://discourse.nodered.org/t/unable-to-connection-mqtt/56542/7 "2022-01-13T08:24:28Z")

</div>

hi @everynone  
thank you for the help, i'v solve my problem. i didn't understrand in the correct way how mqqt server worked. i did some extra research and i fixed my problem so everyting is working. Again thanks to everyone for the help and the info 😃

---

<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:** [13 January 2022 08:27 UTC](https://discourse.nodered.org/t/unable-to-connection-mqtt/56542/8 "2022-01-13T08:27:07Z")

</div>

Can you explain what you did to sort out the problem as it might help other people who encounter a similar issue in the furture?

---

<div class="post-metadata">

**Author:** ![MrEngineer](https://avatars.discourse-cdn.com/v4/letter/m/96bed5/32.png) [@MrEngineer](https://discourse.nodered.org/u/MrEngineer)\
**Post date:** [17 January 2022 07:43 UTC](https://discourse.nodered.org/t/unable-to-connection-mqtt/56542/9 "2022-01-17T07:43:46Z")

</div>

hallo,

My apology for the late anwere, i just finalise some details and then i will explaine everything.  
Again sorry for being so late.

Best regards,

---

<div class="post-metadata">

**Author:** ![MrEngineer](https://avatars.discourse-cdn.com/v4/letter/m/96bed5/32.png) [@MrEngineer](https://discourse.nodered.org/u/MrEngineer)\
**Post date:** [20 January 2022 14:50 UTC](https://discourse.nodered.org/t/unable-to-connection-mqtt/56542/10 "2022-01-20T14:50:42Z")

</div>

Hallo,

I'm finally done with my little project. everything is know working correctly. i will try to explained it in several steps:

1. connection with KPN must always be an encrypted connection which means that the port must be 8883.
2. before any connection can be done, you will need to configure a encrypted connection to your server. I have done it with the help of the site below but it depends on your server system:  
[How to Install and Secure the Mosquitto MQTT Messaging Broker on Ubuntu 18.04 | DigitalOcean](https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-the-mosquitto-mqtt-messaging-broker-on-ubuntu-18-04)
3. ones the configuration is done, you will need the MQTT\_IN node or block and you just need to put in the server information: host, port, encrypted keys, topic, etc...
4. after that you just press the Deploy button if there is a green connection below the MQTT node then it should work.

if there are other question or uncertainties then you can ask

best regard,

MrEngineer

---

<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:** [21 March 2022 14:51 UTC](https://discourse.nodered.org/t/unable-to-connection-mqtt/56542/11 "2022-03-21T14:51:33Z")

</div>

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