# Connection failure

**URL:** <https://discourse.nodered.org/t/connection-failure/59846>\
**Category:** General\
**Created:** [14 March 2022 14:46 UTC](https://discourse.nodered.org/t/connection-failure/59846 "2022-03-14T14:46:38Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![SHAMOO](https://avatars.discourse-cdn.com/v4/letter/s/439d5e/32.png) [@SHAMOO](https://discourse.nodered.org/u/SHAMOO)\
**Post date:** [14 March 2022 14:46 UTC](https://discourse.nodered.org/t/connection-failure/59846/1 "2022-03-14T14:46:38Z")

</div>

Hi guys,

Feeling dumb this morning and confused by the time change. Got to work and my node-red refuses to connect, not sure why. I've started it back up the way I normally do, in fact it usually fires right up when I come in, but this morning I can't get it to go.

I've stopped my mosquitto broker and rerun it, using these commands:  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/d/5d4ab3e1c5a365a6a949642e110643814080f489.png)  
And I've closed node-RED and rerun it but opening CMD as admin and typing "node-red" but I get this error:

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

I've restarted my pc, had my coffee, and walked around to clear my head on it, still no dice- any indications here on what I'm doing wrong?

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [14 March 2022 15:40 UTC](https://discourse.nodered.org/t/connection-failure/59846/2 "2022-03-14T15:40:08Z")

</div>

Did the IP address of the device running the MQTT broker change?

---

<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:** [14 March 2022 15:44 UTC](https://discourse.nodered.org/t/connection-failure/59846/3 "2022-03-14T15:44:24Z")

</div>

In particular, is the broker running on the same machine as node-red? I ask because the node red startup says it is running on 10.59.1.46, but it is trying to connect to a broker at 1.89

---

<div class="post-metadata">

**Author:** ![SHAMOO](https://avatars.discourse-cdn.com/v4/letter/s/439d5e/32.png) [@SHAMOO](https://discourse.nodered.org/u/SHAMOO)\
**Post date:** [14 March 2022 15:56 UTC](https://discourse.nodered.org/t/connection-failure/59846/4 "2022-03-14T15:56:54Z")

</div>

🤦‍♂️  
Now I really feel silly! Yup, looks like all our IP addresses shifted over the weekend for some reason. I've updated Node-RED config nodes and the PLC and now things are working again. Thanks y'all!

---

<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:** [14 March 2022 16:25 UTC](https://discourse.nodered.org/t/connection-failure/59846/5 "2022-03-14T16:25:50Z")

</div>

If it is running on the same machine then use `localhost` instead of the ip address, then it will always work.

---

<div class="post-metadata">

**Author:** ![SHAMOO](https://avatars.discourse-cdn.com/v4/letter/s/439d5e/32.png) [@SHAMOO](https://discourse.nodered.org/u/SHAMOO)\
**Post date:** [14 March 2022 19:29 UTC](https://discourse.nodered.org/t/connection-failure/59846/6 "2022-03-14T19:29:34Z")

</div>

Nice tip, thanks Colin! Now if only the PLC had a setting like that.. lol

---

<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:** [14 March 2022 20:55 UTC](https://discourse.nodered.org/t/connection-failure/59846/7 "2022-03-14T20:55:22Z")

</div>

I think you need to find out why the IP addresses changed. Talk to your IT guys and work out what is going on. Either you need fixed IP addresses or you need to use host names. The IT dept should be able to advise you.

---

<div class="post-metadata">

**Author:** ![SHAMOO](https://avatars.discourse-cdn.com/v4/letter/s/439d5e/32.png) [@SHAMOO](https://discourse.nodered.org/u/SHAMOO)\
**Post date:** [22 March 2022 18:26 UTC](https://discourse.nodered.org/t/connection-failure/59846/8 "2022-03-22T18:26:05Z")

</div>

We weren't able to determine why the IP addresses changed but I did configure static IP on the machine running my broker as well as the PLC, we're working on getting the PLC and broker to the cloud now.

---

<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:** [5 April 2022 18:27 UTC](https://discourse.nodered.org/t/connection-failure/59846/9 "2022-04-05T18:27:03Z")

</div>

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