Value out of range stopping node red?

After a power outage i have lost the service of node red. if i SSH into the Pi that is running node red and entering:

   node red --safe

i can briefly load the UI and deploy a change then the connection fails after a couple of seconds.

Please review what terminal reports each and every time:

pi@raspberrypi:~ $ node-red --safe
12 Oct 18:21:38 - [info]

Welcome to Node-RED

12 Oct 18:21:38 - [info] Node-RED version: v0.20.8
12 Oct 18:21:38 - [info] Node.js version: v10.15.2
12 Oct 18:21:38 - [info] Linux 4.19.66-v7+ arm LE
12 Oct 18:21:43 - [info] Loading palette nodes
12 Oct 18:21:49 - [info] Dashboard version 2.15.5 started at /ui
12 Oct 18:21:51 - [info] Settings file : /home/pi/.node-red/settings.js
12 Oct 18:21:51 - [info] Context store : 'default' [module=memory]
12 Oct 18:21:51 - [info] User directory : /home/pi/.node-red
12 Oct 18:21:51 - [warn] Projects disabled : editorTheme.projects.enabled=false
12 Oct 18:21:51 - [info] Flows file : /home/pi/.node-red/flows_raspberrypi.json
12 Oct 18:21:51 - [info] Server now running at
12 Oct 18:21:51 - [warn]

Your flow credentials file is encrypted using a system-generated key.

If the system-generated key is lost for any reason, your credentials
file will not be recoverable, you will have to delete it and re-enter
your credentials.

You should set your own key using the 'credentialSecret' option in
your settings file. Node-RED will then re-encrypt your credentials
file using your chosen key the next time you deploy a change.

12 Oct 18:21:51 - [info] *****************************************************************
12 Oct 18:21:51 - [info] Flows stopped in safe mode. Deploy to start.
12 Oct 18:21:51 - [info] *****************************************************************
12 Oct 18:22:57 - [info] Stopping flows
12 Oct 18:22:57 - [info] Stopped flows
12 Oct 18:22:57 - [info] Starting flows
12 Oct 18:22:57 - [info] Started flows
12 Oct 18:22:58 - [info] [udp in:RPi4B+] udp listener at
12 Oct 18:22:58 - [info] [mqtt-broker:3f3328d6.a42f38] Connected to broker: mqtt://localhost:1883
12 Oct 18:22:59 - [red] Uncaught Exception:
12 Oct 18:22:59 - RangeError [ERR_OUT_OF_RANGE]: The value of "value" is out of range. It must be >= -32768 and <= 32767. Received 65436
at checkInt (internal/buffer.js:35:11)
at writeU_Int16BE (internal/buffer.js:653:3)
at Buffer.writeInt16BE (internal/buffer.js:715:10)
at bufferizeS7Item (/home/pi/.node-red/node_modules/nodes7/nodeS7.js:1995:25)
at NodeS7.prepareWritePacket (/home/pi/.node-red/node_modules/nodes7/nodeS7.js:671:3)
at NodeS7.writeItems (/home/pi/.node-red/node_modules/nodes7/nodeS7.js:461:7)
at writeNext (/home/pi/.node-red/node_modules/node-red-contrib-s7/red/s7.js:239:28)
at NodeS7.onWritten [as writeDoneCallback] (/home/pi/.node-red/node_modules/node-red-contrib-s7/red/s7.js:223:13)
at NodeS7.writeResponse (/home/pi/.node-red/node_modules/nodes7/nodeS7.js:1291:8)
at NodeS7.onResponse (/home/pi/.node-red/node_modules/nodes7/nodeS7.js:1201:10)
at Socket. (/home/pi/.node-red/node_modules/nodes7/nodeS7.js:396:20)
at Socket.emit (events.js:189:13)
at addChunk (_stream_readable.js:284:12)
at readableAddChunk (_stream_readable.js:265:11)
at Socket.Readable.push (_stream_readable.js:220:10)
at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)

Is there a way of viewing what is causing my problem?


What makes you think it isn't what is included in the error message?

In node node-red-contrib-s7

You should open an issue on GitHub with the nodes author as it should handle the error and not cause node-red to crash

1 Like

Thank you ukmoose,

I thought it was something more serious, i was looking for something called 'value'

i found a word in my PLC that contained 16 1's which is indeed out of range. i didn't know Node RED would respond in this way.



1 Like

Just to be clear, this is not the fault of node-red, the contrib s7 node hasn't handled an exception (hence the UNHANDLED EXCEPTION) in the log.

You should definitely raise an issue on GitHub so the author can fix it for the benefit everyone.

As a temporary workaround...
I'm not familiar with that node or how you set it up (so conjecture from this point forward...). Is there a data type option? I ask because if so, then set the type to unsigned int so that it doesn't overflow (UINT is 0 to 65535).

Hi Steve,

deffo a INT/SINT issue on my part.

I'm looking out for where to set data types.

i may look at the TRUNCATE function in Step7 to prevent this happening again. my influxDB database now has rogue data ruining my trends, i hope i can delete the bad data somehow, is this even possible?

I had a fuse blow last night after a leak above my boiler, a pH sensor ModBusTCP Arduino had hung with an input register of 65535

I have learned a bit more today thank you

1 Like