Troubleshooting
When one failed Modbus getter freezes the next getter in Node-RED
Short answer
A failed poll can leave later Modbus-Getters in Node-RED unable to accept input when they share one modbus-client configuration node; the blockage follows the configuration identity, not the gateway address. Duplicate the client configuration for the getters after the likely failure, or pin node-red-contrib-modbus 5.23.3, where Empty msg on Modbus fail still emits after a failed poll.

On this page
- Why does one failed getter freeze the getters after it?
- What does the same server mean for this freeze?
- How do you prove the freeze follows the configuration node and not the address?
- How do you tell a blocked chain from a dead getter?
- How do you fix the flow without changing the poll targets?
- Which version brings back the old Empty msg on Modbus fail behavior?
- When do you duplicate the client and when do you pin the old version?
- Questions asked
One failed poll can stop a chained Modbus poll sequence in Node-RED: the failing Modbus-Getter emits its error message, but every later getter bound to the same modbus-client configuration node ignores input, and only a message from an Inject node still triggers them. The blockage tracks the client configuration node, not the gateway's IP address, so the fix is to split the chain across two client configurations pointed at the same host and port, or to pin the package version whose Empty msg on Modbus fail option still emits after a failure. Below are the isolation test, the configuration change and the rollback command.
Why does one failed getter freeze the getters after it? #
Because after a failed poll the error message from the failing Modbus-Getter leaves every later getter that shares the same modbus-client configuration node unable to accept input; only a message from an Inject node still triggers them, so the chain stops at the first failed unit.
Chaining getters through their outputs is the standard way to poll several unit IDs in order through one gateway — the same sequencing problem as polling 100 Modbus TCP slave IDs from Node-RED without 100% CPU, at smaller scale. Each getter's second output feeds the next getter, so the sequence advances only when every read completes.
With Empty msg on Modbus fail enabled (emptyMsgOnFail in the flow), a failed poll is supposed to emit a message on the getter's error output so the chain continues past a dead unit. On the reported host, Node-RED 4.1.8 with node-red-contrib-modbus 5.45.2, that continuation broke: reads for unit IDs 27 and 28 succeeded, the unit 29 getter failed against its physically disabled unit, and the unit 30 getter on the same client configuration never ran.
The package's issue tracker records both halves of that behavior: with Empty msg on Modbus fail checked, a request to an offline device no longer produces the error message it used to (issue 517), and on 5.43.0 Modbus communication was reported to stop without any error prompts (issue 564).
A single gateway also puts every unit ID on one serial bus behind the TCP link, which is the same effect described in why Modbus RTU drive polling on one serial port is slow: the chain's pace is bounded by serial turnaround, not by the PC.
What does the same server mean for this freeze? #
It means the same modbus-client configuration node, identified by its own configuration identity, not the IP address: two client configurations pointing at one host and port behave independently, and only getters bound to the configuration that saw the failure lose their input.
In the reported flow, the getters for unit IDs 27 through 30 all reference one modbus-client configuration named A1-401-2-KOM-RS1, configuration id aa6ffc916a37a4e2. A parallel getter for unit 30 references A1-401-2-KOM-RS1*, configuration id 6ac3d731375d7956 — a separate configuration node carrying the same TCP host and port. After the failure, the shared-configuration getter for unit 30 ignored the incoming message, and the duplicate-configuration getter polled. The duplicates differ in both display name and configuration identity, so the comparison proves the split matters; it does not prove the name text alone is the switch.
Shared state under one client configuration shows up outside error paths too: disabling one read node has been reported to move the other read nodes on the same client into the closed state (issue 487). One configuration node means one shared connection state and one command queue for every getter bound to it — exactly the structure a single error message reaches.
How do you prove the freeze follows the configuration node and not the address? #
Run one failure test against two getters that differ only in their client configuration: in the reported flow the getter on the shared configuration ignored the error message, while the identical getter on the duplicated configuration at 10.30.44.20:502 polled unit 30.
Every getter in the example reads a HoldingRegister block at address 512, quantity 26, so a full pass over unit IDs 27 through 30 moves 4 × 26 = 104 register values through the chain; unit 29 is physically disabled, which makes its failure a deliberate, repeatable stimulus.
- Confirm the stimulus: the units before the disabled one read normally on every pass, so the transport and the request baseline are sound.
- Bind one copy of the next getter to the shared configuration and an identical copy to the duplicate configuration, both fed from the failing getter's error output.
- Trigger one pass.
- Watch which copy polls.
| Getter under test | Client configuration | TCP endpoint | Result on the same error message |
|---|---|---|---|
| Unit 30 getter, shared configuration | A1-401-2-KOM-RS1, id aa6ffc916a37a4e2 |
10.30.44.20:502 | message arrives at its input, no poll starts |
| Unit 30 getter, duplicate configuration | A1-401-2-KOM-RS1*, id 6ac3d731375d7956 |
10.30.44.20:502 | polls its unit normally |
Same endpoint, different configuration identity, different outcome: the address does not discriminate, the configuration node does. Reproduce that comparison on your own flow before changing anything else.
How do you tell a blocked chain from a dead getter? #
Add Debug taps at the failing getter's error output and at the next getter's input, trigger one failure, and compare: a message that never arrives points at the upstream wiring, while a message that arrives with no poll starting points at the shared client path.
An Inject wired directly to the frozen getter settles it further: on the reported flow a manual Inject with a date payload still fired the frozen getter's poll. The node itself is alive, and the block sits in the shared path. Call that Inject an isolation test, not a reset — it clears no state, and it does not carry the message shape your error branch produces.
The status functions in the example branch on msg.hasOwnProperty('error'), so the error path, not a successful read, is the continuation path under test. Check what your release puts on that message: issue 517 records the failed-poll message changing from older releases, and a branch keyed to the old shape can misfire even while the chain keeps moving.
If this chain feeds an alarm or an operator display, treat a frozen getter as stale data rather than a healthy last value; the error-property check is the only thing between a failed poll and a plausible-looking number.
How do you fix the flow without changing the poll targets? #
Duplicate the modbus-client configuration: create a second client node with the same tcpHost 10.30.44.20, tcpPort 502 and identical timeout settings, give it its own name, and rebind every getter that must keep polling after a failure to that second configuration node.
- Open the modbus-client configuration the chain uses —
A1-401-2-KOM-RS1in the reported flow — and record its values:clienttypetcp,tcpHost10.30.44.20,tcpPort502,bufferCommandstrue,clientTimeout1000,reconnectOnTimeouttrue,reconnectTimeout2000,commandDelay1,serialConnectionDelay100,parallelUnitIdsAllowedtrue. - Add a second modbus-client configuration with the same values and a distinct name — the reported flow named it
A1-401-2-KOM-RS1*. Node-RED assigns it its own configuration identity. - Rebind the getters after the likely failure to the second configuration, keeping each getter's unit ID, HoldingRegister type, address 512 and quantity 26 unchanged.
- Leave Empty msg on Modbus fail enabled on every getter in both chains.
- Deploy, fail the middle unit again, and confirm the next getter now polls on the duplicate configuration.
The saved client configuration also lists serial-side fields — serialPort /dev/ttyUSB, serialType RTU-BUFFERD, 9600 baud, 8 data bits, 1 stop bit, no parity — which sit unused under clienttype tcp; copy them for fidelity, but do not chase them when the TCP hop is the live path.
One split survives one failed unit: an error freezes only getters bound to the configuration that saw it, so the next getter on the duplicate keeps running. Two consecutive failed units freeze both configurations, because the second failure poisons the duplicate as well; a chain that must ride out more consecutive failures needs one additional configuration per extra consecutive failure. Each configuration opens its own TCP session to the gateway, so keep the session count within what the gateway accepts.
Which version brings back the old Empty msg on Modbus fail behavior? #
Roll back to node-red-contrib-modbus 5.23.3: on that release the Empty msg on Modbus fail option always emits a message after a failed poll, which is what a continuation chain needs, and a user with this exact symptom reports the downgrade fixes the frozen chain.
Run the downgrade from your Node-RED user directory and restart Node-RED:
npm i node-red-contrib-modbus@5.23.3
Confirm the installed version in the palette afterwards.
Version context from the field: the flows library lists 5.60.2 as the current release, and the tracker auto-closes issues after 60 days, so silence there is not a roadmap. A rollback that old forgoes every later change, so prove it on a bench host against your own gateway before touching the production one.
When do you duplicate the client and when do you pin the old version? #
Duplicate the client configuration when your flow logic only needs each getter to keep accepting input after a failure, because it works on any package version; pin 5.23.3 only when your branches depend on the exact message an older release emits after a failed poll.
- Default: duplicate configurations. No dependency change, and it is the only option on an image that ships pinned nodes, where changing package versions breaks the pin — the same discipline as keeping stable gateway flows with vendor-pinned nodes.
- Pin the old release: when a branch keys on the failed-poll message's properties — the error-property check the status functions use — and the current release's message breaks that logic.
- Either way, re-run the deliberate-failure test after the change. The pass condition is concrete: the disabled unit times out, its error message leaves the getter, and the next getter in the chain polls on a configuration the failure did not touch.
Questions asked
Where is the Empty msg on Modbus fail option and how is it stored?
It is a checkbox in each Modbus-Getter node's edit panel, stored per getter as the emptyMsgOnFail field in the flow export. Because it travels with the flow, an imported chain keeps the setting, and a getter added later needs it re-checked. The reported chain had it enabled on every getter, and the freeze still occurred.
Which node-red-contrib-modbus versions matter for this freeze?
The reported case ran 5.45.2 on Node-RED 4.1.8. A silent communication stop was reported on 5.43.0, and the flows library lists 5.60.2 as the current release. Version 5.23.3 predates the behavior change and is the reported downgrade target for this symptom.
Will two client configurations against one gateway address conflict?
In the reported flow, two modbus-client configurations with the same TCP host and port ran side by side, and the getter on the duplicate configuration polled normally. Each configuration keeps its own session and command queue, so the gateway sees one extra TCP session; keep the total within what the gateway accepts.
How do I roll back the package on a production host?
Export the flows first and note the installed version in the palette. Run the downgrade in the Node-RED user directory, restart Node-RED, and confirm the version shown in the palette before importing the flows back. Keep the exported flow file as the record of your last known-good chain.

