# Modbus-flex-server Node crashing once a day with EHOSTUNREACH

**URL:** <https://discourse.nodered.org/t/modbus-flex-server-node-crashing-once-a-day-with-ehostunreach/84421>\
**Category:** General\
**Tags:** modbus\
**Created:** [9 January 2024 11:44 UTC](https://discourse.nodered.org/t/modbus-flex-server-node-crashing-once-a-day-with-ehostunreach/84421 "2024-01-09T11:44:22Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![avermeulen](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/avermeulen/32/85577_2.png) [@avermeulen](https://discourse.nodered.org/u/avermeulen)\
**Post date:** [9 January 2024 11:44 UTC](https://discourse.nodered.org/t/modbus-flex-server-node-crashing-once-a-day-with-ehostunreach/84421/1 "2024-01-09T11:44:22Z")

</div>

Hi there we are running a flow that is using the _Modbus-flex-server_ Node - and it is crashing once a day with an _EHOSTUNREACH_ error.

This is happening on 2 different networks and on multiple different hardware devices. Is there any way to ensure the server restarts after such crash or how do we gather more info about a crash like that? Or is there another way to recover without restarting the flow.

---

<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:** [9 January 2024 12:13 UTC](https://discourse.nodered.org/t/modbus-flex-server-node-crashing-once-a-day-with-ehostunreach/84421/2 "2024-01-09T12:13:09Z")

</div>

> [@avermeulen](#):
>
> and it is crashing once a day with an _EHOSTUNREACH_ error

Can you provide the node-red log showing the log trace of the crash?

> [@avermeulen](#):
>
> This is happening on 2 different networks and on multiple different hardware devices.

Are you making multiple requests at the same time or sequencing your requests?

Do you make the most of grouping reads to minimise traffic? ([This article](https://flowfuse.com/blog/2023/09/modernize-your-legacy-industrial-data-part2/) explains what I mean and why I ask that)

---

<div class="post-metadata">

**Author:** ![hornbartho](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hornbartho/32/87160_2.png) [@hornbartho](https://discourse.nodered.org/u/hornbartho)\
**Post date:** [9 January 2024 13:13 UTC](https://discourse.nodered.org/t/modbus-flex-server-node-crashing-once-a-day-with-ehostunreach/84421/3 "2024-01-09T13:13:09Z")

</div>

Hi Steve,

The only error associated with the modbus-flex-server issue that I could find in the logs were:

`error: read EHOSTUNREACH`

I did enable the error log output option for the server, but I am still unsure how we can get a more detailed version of the server status. Please let me know if you have any suggestions regarding this as well.

Regards,

Bart

---

<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:** [9 January 2024 13:38 UTC](https://discourse.nodered.org/t/modbus-flex-server-node-crashing-once-a-day-with-ehostunreach/84421/4 "2024-01-09T13:38:23Z")

</div>

> [@hornbartho](#):
>
> The only error associated with the modbus-flex-server issue that I could find in the logs were:
> 
> `error: read EHOSTUNREACH`

@avermeulen said :

> [@avermeulen](#):
>
> it is crashing once a day

So is node-red actually crashing or not?

Also, answer other question.

---

<div class="post-metadata">

**Author:** ![hornbartho](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hornbartho/32/87160_2.png) [@hornbartho](https://discourse.nodered.org/u/hornbartho)\
**Post date:** [9 January 2024 13:52 UTC](https://discourse.nodered.org/t/modbus-flex-server-node-crashing-once-a-day-with-ehostunreach/84421/5 "2024-01-09T13:52:55Z")

</div>

Hi,

So the _Modbus-flex-server_ is crashing, node-red keeps on running. The problem is that the _Modbus-flex-server_ does not recover from the issue. Hope that makes it more clear?

Regards

---

<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:** [9 January 2024 13:53 UTC](https://discourse.nodered.org/t/modbus-flex-server-node-crashing-once-a-day-with-ehostunreach/84421/6 "2024-01-09T13:53:10Z")

</div>

> [@hornbartho](#):
>
> The only error associated with the modbus-flex-server issue that I could find in the logs were:
> 
> `error: read EHOSTUNREACH`

If that is all you could find how do you know it is associated with the server node?

---

<div class="post-metadata">

**Author:** ![hornbartho](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hornbartho/32/87160_2.png) [@hornbartho](https://discourse.nodered.org/u/hornbartho)\
**Post date:** [9 January 2024 13:54 UTC](https://discourse.nodered.org/t/modbus-flex-server-node-crashing-once-a-day-with-ehostunreach/84421/7 "2024-01-09T13:54:32Z")

</div>

Hi Colin,

The server is unreachable and we cannot get any response from it. We need to restart the node-red instance to get the server working again. We tracked the server comms connection, and it dropped out at the same time as the when the `error: read EHOSTUNREACH` log was generated.

Regards,

---

<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:** [9 January 2024 14:24 UTC](https://discourse.nodered.org/t/modbus-flex-server-node-crashing-once-a-day-with-ehostunreach/84421/8 "2024-01-09T14:24:29Z")

</div>

I suggest you raise an issue on the repository.

> **[Issues · BiancoRoyal/node-red-contrib-modbus](https://github.com/BiancoRoyal/node-red-contrib-modbus/issues?q=is%3Aissue%2Bis%3Aopen%2BEHOSTUNREACH)**
>
> We need your sponsoring to work on this! With sponsors we can work faster for it. - Issues · BiancoRoyal/node-red-contrib-modbus

---

<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 March 2024 14:25 UTC](https://discourse.nodered.org/t/modbus-flex-server-node-crashing-once-a-day-with-ehostunreach/84421/9 "2024-03-09T14:25:20Z")

</div>

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