question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Node-Red Uncaught Exception due Modbus Server node.

See original GitHub issue

I’m submitting a … (check one with “x”)

Problem

  • (x) bug report => please search github for a similar issue or PR and test Modbus problems with the modbus-serial package before submitting
  • ( ) unexpected behavior => please visit the Wiki before

Current behavior

Uncaught Exception on Node-RED. After a lost connection from Modbus master, the Modbus Server node shows an error that makes Node-Red to forced stop.

Expected behavior

After a lost connection from Modbus master, the Modbus Server must show the connection error but Node-Red should remain active.

Minimal reproduction of the problem with instructions

  1. Load data into Modbus Server Buffer.
  2. Start a Modbus Request from another device.
  3. Start / Stop the connection from remote device.

Your Environment

Please tell us about your environment:

  • (x) I am using just the Node-RED package and got modbus-serial package installed with it
  • ( ) I have installed modbus-serial package global from source (using git clone)
  • ( ) I have installed modbus-serial as a global package (using npm i -g)

Yes, modbus-serial is the name but it does all, TCP and Serial. The node-modbus package is just for the Modbus Server node.

  • Device :

    • ( ) macOS: v
    • ( ) Linux: v
    • ( ) Windows: v
    • (x) Raspbian: v
    • ( ) Other:
      • Name:
      • Version:
  • Description of the connecting Modbus system:

    • Name : Modbus Simulator
    • Version : 3.53
    • Vendor : Calta Computer Systems Limited
    • Link : https://
  • node-red-contrib-modbus version: v5.13.3

  • Node: (min. 10.x) node --version = v12.19.1

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
R-LopezVcommented, Jul 28, 2022

Redshift1: As a workaround you can use an external Modbus/TCP server, and writing the necessary values using Node-Red to it

Yeah, we’re working on that right now, thanks for the idea.

@biancode I hope all of you have had a better year so far. I appreciate all of you working on this in spite of your personal situations.

biancode: it is Open-Source and the community could contribute or users could sponsor for fixing issues faster 😉 It will be fixed with the next v5.22+ - but keep in mind, then the flow should handle the error state of the node

To be honest I’m not super savvy on JS, but I could give it a try… As for the flow handling the error, it’s more than enough personally. That would make fixing my mistakes on the node’s config much faster.

1reaction
biancodecommented, Jul 28, 2022

Yes - two years - the last two years were and are not easy with all the issues from our real life. @R-LopezV it is Open-Source and the community could contribute or users could sponsor for fixing issues faster 😉

It will be fixed with the next v5.22+ - but keep in mind, then the flow should handle the error state of the node

Read more comments on GitHub >

github_iconTop Results From Across the Web

Node-red crash after mistake in modbus server - General
Hi, yesterday in a test with modbus server, I lost connection with node-red server. Now I'm not able to make any change because...
Read more >
Node-red crashes after "Started flows". Uncaught Exception
You have a node in your flow that is trying to access 10.8. 0.10, port 502. But it isn't accessible for some reason....
Read more >
Unable to start node-red after installing modbus sample code
Hi all, I recently copied the codes below related to modebus master and slave. Node red is not starting, and I am getting...
Read more >
Node red crash with bad node parameter - General
It's happened to get Node-Red crash by changing one of node parameters (Modbus TCP - ip address); moreover Node-Red failed to re-start due...
Read more >
Node-red Error . Does not start - General
2019-09-08 10:34:10: Connecting to modbustcp slave at 192.168.1.23:502 unit_id: 255 ... 8 Sep 11:34:11 - [red] Uncaught Exception:
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found