# MQTT - Client to Cloud MQTT

**URL:** <https://discourse.nodered.org/t/mqtt-client-to-cloud-mqtt/66290>\
**Category:** General\
**Created:** [10 August 2022 14:40 UTC](https://discourse.nodered.org/t/mqtt-client-to-cloud-mqtt/66290 "2022-08-10T14:40:16Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![ScheepersJohan](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/scheepersjohan/32/39556_2.png) [@ScheepersJohan](https://discourse.nodered.org/u/ScheepersJohan)\
**Post date:** [10 August 2022 14:40 UTC](https://discourse.nodered.org/t/mqtt-client-to-cloud-mqtt/66290/1 "2022-08-10T14:40:16Z")

</div>

Hi,

On my Laptop I have node red running, I want t connect to oracle via MQTT. I installed mosquitto on the oracle instance.

I have opened the firewall for port 8883 and 1883. I have tested this as I connect to another server via MQTT and the messages are getting passed on.

I am not sure of how to set up the above.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/8/b8a9fe032c3759a915263ea8d050b4045db34641.png)

On both sides the MQTT node show connected but the messages don't get passed.

Laptop  
10 Aug 12:40:03 - [info] Node-RED version: v3.0.1  
10 Aug 12:40:03 - [info] Node.js version: v14.17.1  
10 Aug 12:40:03 - [info] Windows\_NT 10.0.16299 x64 LE  
10 Aug 12:40:04 - [info] Loading palette nodes

oracle  
10 Aug 14:31:00 - [info] Node-RED version: v2.2.2  
10 Aug 14:31:00 - [info] Node.js version: v14.19.1  
10 Aug 14:31:00 - [info] Linux 5.15.0-1013-oracle arm64 LE

---

<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:** [10 August 2022 16:16 UTC](https://discourse.nodered.org/t/mqtt-client-to-cloud-mqtt/66290/2 "2022-08-10T16:16:00Z")

</div>

Look at the mosquitto log in the cloud to see what it says.

I hope those are not the real ip addresses and user/pwd. If they are then change them immediately.

---

<div class="post-metadata">

**Author:** ![MecatronicaMADE](https://avatars.discourse-cdn.com/v4/letter/m/ce7236/32.png) [@MecatronicaMADE](https://discourse.nodered.org/u/MecatronicaMADE)\
**Post date:** [10 August 2022 16:18 UTC](https://discourse.nodered.org/t/mqtt-client-to-cloud-mqtt/66290/3 "2022-08-10T16:18:03Z")

</div>

Hi @ScheepersJohan , may be you need to configure MQTT mosquitto to allow connections:

"Boolean value that determines whether clients that connect without providing a username are allowed to connect. If set to _`false`_ then another means of connection should be created to control authenticated client access."

[mosquitto.conf](https://mosquitto.org/man/mosquitto-conf-5.html)

---

<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:** [10 August 2022 16:26 UTC](https://discourse.nodered.org/t/mqtt-client-to-cloud-mqtt/66290/4 "2022-08-10T16:26:31Z")

</div>

If the laptop MQTT node is showing connected then it cannot be that.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [10 August 2022 16:58 UTC](https://discourse.nodered.org/t/mqtt-client-to-cloud-mqtt/66290/5 "2022-08-10T16:58:09Z")

</div>

Not really a good idea to use 1883 over the Internet. Do everyone a favour please and change to a TLS interface only. You will also need to change the user id and password after implementing TLS. Not just because you've shown it here but also because you've been broadcasting it in clear text over the Internet.

---

<div class="post-metadata">

**Author:** ![ScheepersJohan](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/scheepersjohan/32/39556_2.png) [@ScheepersJohan](https://discourse.nodered.org/u/ScheepersJohan)\
**Post date:** [10 August 2022 19:43 UTC](https://discourse.nodered.org/t/mqtt-client-to-cloud-mqtt/66290/6 "2022-08-10T19:43:54Z")

</div>

> [@Colin](#):
>
> real ip addresses and user/pwd

Don't stress I will never reveal real IP or users/pwd on an site.

---

<div class="post-metadata">

**Author:** ![ScheepersJohan](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/scheepersjohan/32/39556_2.png) [@ScheepersJohan](https://discourse.nodered.org/u/ScheepersJohan)\
**Post date:** [10 August 2022 20:30 UTC](https://discourse.nodered.org/t/mqtt-client-to-cloud-mqtt/66290/7 "2022-08-10T20:30:49Z")

</div>

Ok so I have figured out that my mistake, msg were sent as msg.quarry:"Test", it needs to be msg.payload:"Test". This is still on 1883

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/8/28980917a200ad46836dda07cc03365160ed8ddf.png)

Now to enable port 8883 and add certificates.

---

<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:** [9 October 2022 20:31 UTC](https://discourse.nodered.org/t/mqtt-client-to-cloud-mqtt/66290/8 "2022-10-09T20:31:16Z")

</div>

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