# Connecting never happens

**URL:** <https://discourse.nodered.org/t/connecting-never-happens/38041>\
**Category:** General\
**Created:** [26 December 2020 17:02 UTC](https://discourse.nodered.org/t/connecting-never-happens/38041 "2020-12-26T17:02:31Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![plclady](https://avatars.discourse-cdn.com/v4/letter/p/a3d4f5/32.png) [@plclady](https://discourse.nodered.org/u/plclady)\
**Post date:** [26 December 2020 17:02 UTC](https://discourse.nodered.org/t/connecting-never-happens/38041/1 "2020-12-26T17:02:32Z")

</div>

I have node-red running on a groov Epic(192.168.1.130) and I'm editing it on a laptop (.160). I installed the eclipse MQTT broker on a different computer (.150) plugged into the same unmanaged switch as the Epic. I have mosquitto running on the .150 and have opened port 1883 in the firewall. I can ping the .130 from the .150 so I know they can talk.

This is my flow:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/f/1fb9a91eec631cf5ba4847d11d70e3dfc18189a4.png)

The problem is that it never moves from connecting to connected. What am I missing?

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [26 December 2020 17:09 UTC](https://discourse.nodered.org/t/connecting-never-happens/38041/2 "2020-12-26T17:09:26Z")

</div>

You have not shown how your mqtt node is configured.

---

<div class="post-metadata">

**Author:** ![plclady](https://avatars.discourse-cdn.com/v4/letter/p/a3d4f5/32.png) [@plclady](https://discourse.nodered.org/u/plclady)\
**Post date:** [26 December 2020 17:14 UTC](https://discourse.nodered.org/t/connecting-never-happens/38041/3 "2020-12-26T17:14:32Z")

</div>

Thank you for the reminder!  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/3/93043ca4200b9b3c9cc10b60be464673ceaa9e5f.png)

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [26 December 2020 17:16 UTC](https://discourse.nodered.org/t/connecting-never-happens/38041/4 "2020-12-26T17:16:44Z")

</div>

Show us the config when you click the pencil icon to right of server.

A welcome to the forum.

---

<div class="post-metadata">

**Author:** ![plclady](https://avatars.discourse-cdn.com/v4/letter/p/a3d4f5/32.png) [@plclady](https://discourse.nodered.org/u/plclady)\
**Post date:** [26 December 2020 17:18 UTC](https://discourse.nodered.org/t/connecting-never-happens/38041/5 "2020-12-26T17:18:46Z")

</div>

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/e/6e075c10b7ad9a75c335568eb9862f47297e96a8.png)

---

<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:** [26 December 2020 17:23 UTC](https://discourse.nodered.org/t/connecting-never-happens/38041/6 "2020-12-26T17:23:28Z")

</div>

Have you got mosquitto and the Eclipse broker (whatever that is) both running on .150? You can't run two brokers on one machine (at least not on the same port).

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [26 December 2020 17:26 UTC](https://discourse.nodered.org/t/connecting-never-happens/38041/7 "2020-12-26T17:26:20Z")

</div>

when you type mosquitto in consol, what is returned?

---

<div class="post-metadata">

**Author:** ![plclady](https://avatars.discourse-cdn.com/v4/letter/p/a3d4f5/32.png) [@plclady](https://discourse.nodered.org/u/plclady)\
**Post date:** [26 December 2020 17:26 UTC](https://discourse.nodered.org/t/connecting-never-happens/38041/8 "2020-12-26T17:26:30Z")

</div>

Sorry. I am new to this so my terminology may be incorrect. The MQTT broker I downloaded is the Eclipse version. That may mean nothing at all but I didn't know so I included it.

---

<div class="post-metadata">

**Author:** ![plclady](https://avatars.discourse-cdn.com/v4/letter/p/a3d4f5/32.png) [@plclady](https://discourse.nodered.org/u/plclady)\
**Post date:** [26 December 2020 17:28 UTC](https://discourse.nodered.org/t/connecting-never-happens/38041/9 "2020-12-26T17:28:08Z")

</div>

When I type mosquitto in the console nothing happens and usual prompt reappears immediately.

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [26 December 2020 17:29 UTC](https://discourse.nodered.org/t/connecting-never-happens/38041/10 "2020-12-26T17:29:40Z")

</div>

Then it looks like mosquitto is not running or installed.

---

<div class="post-metadata">

**Author:** ![plclady](https://avatars.discourse-cdn.com/v4/letter/p/a3d4f5/32.png) [@plclady](https://discourse.nodered.org/u/plclady)\
**Post date:** [26 December 2020 17:29 UTC](https://discourse.nodered.org/t/connecting-never-happens/38041/11 "2020-12-26T17:29:43Z")

</div>

Mosquitto is running. I started it with net start mosquitto.

---

<div class="post-metadata">

**Author:** ![plclady](https://avatars.discourse-cdn.com/v4/letter/p/a3d4f5/32.png) [@plclady](https://discourse.nodered.org/u/plclady)\
**Post date:** [26 December 2020 17:31 UTC](https://discourse.nodered.org/t/connecting-never-happens/38041/12 "2020-12-26T17:31:00Z")

</div>

When I retype net start mosquitto it says the requested service has already been started

---

<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:** [26 December 2020 17:32 UTC](https://discourse.nodered.org/t/connecting-never-happens/38041/13 "2020-12-26T17:32:54Z")

</div>

Try using something like MQTT explorer on the same machine - can it connect?

Other observations...

- Don't start topics with a `/`
- Don't use legacy mode unless you need to.

Question - the firewall - did you open TCP 1883?

---

<div class="post-metadata">

**Author:** ![plclady](https://avatars.discourse-cdn.com/v4/letter/p/a3d4f5/32.png) [@plclady](https://discourse.nodered.org/u/plclady)\
**Post date:** [26 December 2020 17:37 UTC](https://discourse.nodered.org/t/connecting-never-happens/38041/14 "2020-12-26T17:37:05Z")

</div>

Yes I did open the port. I created a rule for both outgoing and incoming.

I opened a second command line window on the .150 and published to a topic that I had subscribed to in the other window. I received 'hello world' from myself.

I will try the same thing on the .130 right now.

I read somewhere that the Eclipse version of MQTT broker may be the legacy version, so I checked that box in my troubleshooting efforts.

I will try changing the / prefix as well.

BRB

---

<div class="post-metadata">

**Author:** ![plclady](https://avatars.discourse-cdn.com/v4/letter/p/a3d4f5/32.png) [@plclady](https://discourse.nodered.org/u/plclady)\
**Post date:** [26 December 2020 17:43 UTC](https://discourse.nodered.org/t/connecting-never-happens/38041/15 "2020-12-26T17:43:58Z")

</div>

On the machine that is running node-red I changed the IP address for the config to the 192.168.1.130. Is that the correct method for testing it on the local machine? It is doing the same thing (connecting forever).

---

<div class="post-metadata">

**Author:** ![plclady](https://avatars.discourse-cdn.com/v4/letter/p/a3d4f5/32.png) [@plclady](https://discourse.nodered.org/u/plclady)\
**Post date:** [26 December 2020 18:06 UTC](https://discourse.nodered.org/t/connecting-never-happens/38041/16 "2020-12-26T18:06:03Z")

</div>

This is my log. I must be doing something wrong in the flow. I changed the port ID just to test that.

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

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [26 December 2020 18:06 UTC](https://discourse.nodered.org/t/connecting-never-happens/38041/17 "2020-12-26T18:06:59Z")

</div>

Confirm the ip of the machine running Mosquitto.

---

<div class="post-metadata">

**Author:** ![plclady](https://avatars.discourse-cdn.com/v4/letter/p/a3d4f5/32.png) [@plclady](https://discourse.nodered.org/u/plclady)\
**Post date:** [26 December 2020 18:11 UTC](https://discourse.nodered.org/t/connecting-never-happens/38041/18 "2020-12-26T18:11:23Z")

</div>

I did an ipconfig and got 192.168.1.150 on that machine.

The machine that is running node red is this one (groov Epic):

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/3/43127caf25ad7025c7113f6d5893d7e2724d3112.png)

Because I tried your method of using itself I think there is something I don't know about the groov Epic at .130 that is giving me the problem.

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [26 December 2020 18:16 UTC](https://discourse.nodered.org/t/connecting-never-happens/38041/19 "2020-12-26T18:16:59Z")

</div>

so 150 is the ip you need to use,

the firewall on windows , try disabling it and any firewall on router.

---

<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:** [26 December 2020 21:34 UTC](https://discourse.nodered.org/t/connecting-never-happens/38041/20 "2020-12-26T21:34:53Z")

</div>

> [@plclady](#):
>
> I read somewhere that the Eclipse version of MQTT broker may be the legacy version, so I checked that box in my troubleshooting efforts.

I still don't understand this. You must only run one broker. You can't run mosquitto and the eclipse broker at the same time. I suggest you disable the Eclipse one and stick to mosquitto.  
I didn't see whether you tried running mqtt explorer or similar on the node red machine and see if it can talk to the .150 broker. That will tell you whether it is a node red problem or a problem accessing the broker.

[Next page](https://discourse.nodered.org/t/connecting-never-happens/38041.md?page=2)
