# New install of Node-RED broke modbus

**URL:** <https://discourse.nodered.org/t/new-install-of-node-red-broke-modbus/86036>\
**Category:** General\
**Tags:** modbus\
**Created:** [29 February 2024 19:19 UTC](https://discourse.nodered.org/t/new-install-of-node-red-broke-modbus/86036 "2024-02-29T19:19:13Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![hotdog](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hotdog/32/88448_2.png) [@hotdog](https://discourse.nodered.org/u/hotdog)\
**Post date:** [29 February 2024 19:19 UTC](https://discourse.nodered.org/t/new-install-of-node-red-broke-modbus/86036/1 "2024-02-29T19:19:13Z")

</div>

I have been working through a RPi with node red v3.0.2 for a few weeks now but recently I needed to set up a new pi and import my flows to it. However, after installing a fresh install on a new sd, my flows aren't passing through my modbus flex getter. I have been on the forums all day and have reinstalled both my pi os and node red (as well as older versions of modbus) multiple times. All of my port addresses are correct and theres no reason this shouldnt be working as far as i can tell.

---

<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:** [29 February 2024 20:39 UTC](https://discourse.nodered.org/t/new-install-of-node-red-broke-modbus/86036/2 "2024-02-29T20:39:35Z")

</div>

What exact symptom are you seeing?

Please show us the node red startup log by running, in a command window  
`node-red-stop`  
`node-red-start`  
That is assuming that you installed node red using the [recommended install script](https://nodered.org/docs/getting-started/raspberrypi).  
Let it run until after the modbus has failed and copy/paste the full console output here please. Copy/paste not screen shot.

---

<div class="post-metadata">

**Author:** ![hotdog](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hotdog/32/88448_2.png) [@hotdog](https://discourse.nodered.org/u/hotdog)\
**Post date:** [29 February 2024 21:19 UTC](https://discourse.nodered.org/t/new-install-of-node-red-broke-modbus/86036/3 "2024-02-29T21:19:20Z")

</div>

I can send those screen shots but really whats happening is that my flow isn't passing throught the flex getter node. I am unable to get any errors or logs to come out of the node

---

<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:** [29 February 2024 21:24 UTC](https://discourse.nodered.org/t/new-install-of-node-red-broke-modbus/86036/4 "2024-02-29T21:24:06Z")

</div>

Are any messages passing on any flows?

Is node-red crashing and restarting?

What version of nodejs was the old SD card running Vs the new pi OS?

---

<div class="post-metadata">

**Author:** ![hotdog](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hotdog/32/88448_2.png) [@hotdog](https://discourse.nodered.org/u/hotdog)\
**Post date:** [29 February 2024 21:34 UTC](https://discourse.nodered.org/t/new-install-of-node-red-broke-modbus/86036/5 "2024-02-29T21:34:17Z")

</div>

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

The flows passes through the first two function nodes and will output the payload correctly. Its just the flex getter (renamed) that halts all progress. Node red is functioning normally with no crashes. The new SD is running nodejs v18.19.1 and the old one is running v16.19.1

---

<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:** [29 February 2024 21:40 UTC](https://discourse.nodered.org/t/new-install-of-node-red-broke-modbus/86036/6 "2024-02-29T21:40:23Z")

</div>

Is it serial or modbustcp?

Assuming TCP, How are you addressing the modbus device (ip? Hostname?)

---

<div class="post-metadata">

**Author:** ![hotdog](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hotdog/32/88448_2.png) [@hotdog](https://discourse.nodered.org/u/hotdog)\
**Post date:** [29 February 2024 21:43 UTC](https://discourse.nodered.org/t/new-install-of-node-red-broke-modbus/86036/7 "2024-02-29T21:43:50Z")

</div>

TCP with IP address.

---

<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:** [29 February 2024 21:51 UTC](https://discourse.nodered.org/t/new-install-of-node-red-broke-modbus/86036/8 "2024-02-29T21:51:23Z")

</div>

Can you ping the device from node-red? (Using node-red-node-ping)

Not sure if it the same for outbound connections but Linux typically needs permission to open port 502. Is it possible to change your server to use port 10502?

---

<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:** [29 February 2024 21:53 UTC](https://discourse.nodered.org/t/new-install-of-node-red-broke-modbus/86036/9 "2024-02-29T21:53:36Z")

</div>

> [@Steve-Mcl](#):
>
> Not sure if it the same for outbound connections but Linux typically needs permission to open port 502.

That should not be an issue on outbound connections.

---

<div class="post-metadata">

**Author:** ![hotdog](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hotdog/32/88448_2.png) [@hotdog](https://discourse.nodered.org/u/hotdog)\
**Post date:** [29 February 2024 21:56 UTC](https://discourse.nodered.org/t/new-install-of-node-red-broke-modbus/86036/10 "2024-02-29T21:56:05Z")

</div>

Ping returned false

---

<div class="post-metadata">

**Author:** ![hotdog](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hotdog/32/88448_2.png) [@hotdog](https://discourse.nodered.org/u/hotdog)\
**Post date:** [29 February 2024 21:58 UTC](https://discourse.nodered.org/t/new-install-of-node-red-broke-modbus/86036/11 "2024-02-29T21:58:00Z")

</div>

i was connecting to the same system ip with the same flow yesterday.

---

<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:** [29 February 2024 22:00 UTC](https://discourse.nodered.org/t/new-install-of-node-red-broke-modbus/86036/12 "2024-02-29T22:00:25Z")

</div>

Well if you can't ping it then it won't work. Assuming the server responds to ping.

---

<div class="post-metadata">

**Author:** ![hotdog](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hotdog/32/88448_2.png) [@hotdog](https://discourse.nodered.org/u/hotdog)\
**Post date:** [29 February 2024 22:03 UTC](https://discourse.nodered.org/t/new-install-of-node-red-broke-modbus/86036/13 "2024-02-29T22:03:55Z")

</div>

We have a similar system in the building that we use for testing. After connecting to it and running a ping, it sends back a float.

---

<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:** [29 February 2024 22:14 UTC](https://discourse.nodered.org/t/new-install-of-node-red-broke-modbus/86036/14 "2024-02-29T22:14:02Z")

</div>

> [@hotdog](#):
>
> it sends back a float

That means it is working.

> [@hotdog](#):
>
> Ping returned false

That means it is not & You have a direction to start digging.

Double check network IP, mask and gateway.

Check firewall settings (iptables / uwf)

---

<div class="post-metadata">

**Author:** ![StrongTown](https://avatars.discourse-cdn.com/v4/letter/s/4bbf92/32.png) [@StrongTown](https://discourse.nodered.org/u/StrongTown)\
**Post date:** [1 March 2024 01:52 UTC](https://discourse.nodered.org/t/new-install-of-node-red-broke-modbus/86036/15 "2024-03-01T01:52:24Z")

</div>

Just a thought. I use modbus in NR to get data from my solar controller (about 20 registers). The controller I read from will only allow one (1) connection at a time. Is it possible your device is the same and something else has already captured the port?

---

<div class="post-metadata">

**Author:** ![hotdog](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hotdog/32/88448_2.png) [@hotdog](https://discourse.nodered.org/u/hotdog)\
**Post date:** [1 March 2024 13:48 UTC](https://discourse.nodered.org/t/new-install-of-node-red-broke-modbus/86036/16 "2024-03-01T13:48:03Z")

</div>

I can verify that the system i'm currently testing on was able to communicate with node red on several different Pi's all using the same os version. Even when I am not directly connected to the system, my flow would run, pass through the flex getter, and set my global variables with a value of null. I'm not worried about the system communicating with my Pi properly, but rather that information can pass through these flex getters.

---

<div class="post-metadata">

**Author:** ![hotdog](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hotdog/32/88448_2.png) [@hotdog](https://discourse.nodered.org/u/hotdog)\
**Post date:** [1 March 2024 14:45 UTC](https://discourse.nodered.org/t/new-install-of-node-red-broke-modbus/86036/17 "2024-03-01T14:45:01Z")

</div>

New update: Error: connect ETIMEDOUT (IP Address)

---

<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:** [1 March 2024 15:01 UTC](https://discourse.nodered.org/t/new-install-of-node-red-broke-modbus/86036/18 "2024-03-01T15:01:06Z")

</div>

> [@hotdog](#):
>
> ETIMEDOUT (IP Address)

That is exactly what one would expect if the pi cannot access the modbus device. You need to investigate why this pi cannot ping the device. It is not a node-red issue.

---

<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:** [30 May 2024 15:01 UTC](https://discourse.nodered.org/t/new-install-of-node-red-broke-modbus/86036/19 "2024-05-30T15:01:27Z")

</div>

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