# Error ERR\_OUT\_OF\_RANGE

**URL:** https://discourse.nodered.org/t/error-err-out-of-range/73367
**Category:** General
**Tags:** modbus
**Created:** [8 January 2023 12:34 UTC](https://discourse.nodered.org/t/error-err-out-of-range/73367 "2023-01-08T12:34:57Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Avellanas](https://avatars.discourse-cdn.com/v4/letter/a/48db29/32.png) [@Avellanas](https://discourse.nodered.org/u/Avellanas)
#### Post date: [8 January 2023 12:34 UTC](https://discourse.nodered.org/t/error-err-out-of-range/73367/1 "2023-01-08T12:34:57Z")

</div>

Hello,  
I have this error in syslog and I can't find how to fix it.  
Can you help me?

```auto
*Jan 6 14:44:21 iot2050[298]: 6 Jan 14:44:21 - [red] Uncaught Exception:*
*Jan 6 14:44:21 iot2050[298]: 6 Jan 14:44:21 - RangeError [ERR_OUT_OF_RANGE]: The value of "offset" is out of range. It must be >= 0 and <= 7. Received 9*
*Jan 6 14:44:21 iot2050[298]: at boundsError (internal/buffer.js:82:9)*
*Jan 6 14:44:21 iot2050[298]: at Buffer.readUInt16BE (internal/buffer.js:328:5)*
*Jan 6 14:44:21 iot2050[298]: at _readFC4 (/root/.node-red/node_modules/modbus-serial/index.js:118:24)*
*Jan 6 14:44:21 iot2050[298]: at ModbusRTU._onReceive (/root/.node-red/node_modules/modbus-serial/index.js:427:13)*
*Jan 6 14:44:21 iot2050[298]: at TcpPort.emit (events.js:314:20)*
*Jan 6 14:44:21 iot2050[298]: at Socket.<anonymous> (/root/.node-red/node_modules/modbus-serial/ports/tcpport.js:92:20)*
*Jan 6 14:44:21 iot2050[298]: at Socket.emit (events.js:314:20)*
*Jan 6 14:44:21 iot2050[298]: at addChunk (_stream_readable.js:297:12)*
*Jan 6 14:44:21 iot2050[298]: at readableAddChunk (_stream_readable.js:272:9)*
*Jan 6 14:44:21 iot2050d[298]: at Socket.Readable.push (_stream_readable.js:213:10)*
*Jan 6 14:44:21 iot2050 systemd[1]: node-red.service: Main process exited, code=exited, status=1/FAILURE*
*Jan 6 14:44:21 iot2050 systemd[1]: node-red.service: Failed with result 'exit-code'.*
*Jan 6 14:44:21 iot2050 systemd[1]: node-red.service: Consumed 19min 53.911s CPU time.*

```

How can I find out where in the program this error is coming from? _at boundsError (internal/buffer.js:82:9)_

Thank you.

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [8 January 2023 13:12 UTC](https://discourse.nodered.org/t/error-err-out-of-range/73367/2 "2023-01-08T13:12:36Z")

</div>

You are using Modbus and somewhere in your flow it looks like you are receiving an input over modbus-serial that is outside of the allowed range. So I'd start by looking at your modbus flows.

---

<div class="post-metadata">

### Author: ![Avellanas](https://avatars.discourse-cdn.com/v4/letter/a/48db29/32.png) [@Avellanas](https://discourse.nodered.org/u/Avellanas)
#### Post date: [12 January 2023 13:59 UTC](https://discourse.nodered.org/t/error-err-out-of-range/73367/3 "2023-01-12T13:59:41Z")

</div>

Hello TotallyInformation  
Thank you for your answer.  
Yes, we think the problem is about the modbus tcp flows. We don't find the solution yet. When we know, I will post it.

---

<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: [13 March 2023 14:00 UTC](https://discourse.nodered.org/t/error-err-out-of-range/73367/4 "2023-03-13T14:00:25Z")

</div>

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