Node Red Connection Errors after safe start

I've been trying to troubleshoot this experience all day with my pi and node-red. I understand that the credential secret option is totally useless right now but I don't understand any of the other errors. Whenever I first start node-red this seems to go on forever after restarting until I start in safe mode. However, when I open up the node-red dashboard on my laptop it says everything is ok until I redeploy anything in which it says "you have lost connection" and this pops up on the pi:

pi@raspberrypi:~ $ node-red --safe
14 Mar 18:53:00 - [info]

Welcome to Node-RED

14 Mar 18:53:00 - [info] Node-RED version: v1.0.3
14 Mar 18:53:00 - [info] Node.js version: v10.15.2
14 Mar 18:53:00 - [info] Linux 4.19.50-v7l+ arm LE
14 Mar 18:53:02 - [info] Loading palette nodes
14 Mar 18:53:05 - [info] Dashboard version 2.17.1 started at /ui
14 Mar 18:53:06 - [warn] ------------------------------------------------------
14 Mar 18:53:06 - [warn] [node-red-contrib-easybotics-gphoto-upload/gphotos] Error: Cannot find module 'axios/lib/helpers/isAbsoluteURL'
14 Mar 18:53:06 - [warn] [node-red-contrib-easybotics-ina219-sensor/ina] Error: Cannot find module 'ina219' (line:1)
14 Mar 18:53:06 - [warn] ------------------------------------------------------
14 Mar 18:53:06 - [info] Settings file : /home/pi/.node-red/settings.js
14 Mar 18:53:06 - [info] Context store : 'default' [module=memory]
14 Mar 18:53:06 - [info] User directory : /home/pi/.node-red
14 Mar 18:53:06 - [warn] Projects disabled : editorTheme.projects.enabled=false
14 Mar 18:53:06 - [info] Flows file : /home/pi/.node-red/flows_raspberrypi.json
14 Mar 18:53:06 - [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.

14 Mar 18:53:06 - [info] *****************************************************************
14 Mar 18:53:06 - [info] Flows stopped in safe mode. Deploy to start.
14 Mar 18:53:06 - [info] *****************************************************************
14 Mar 18:53:06 - [info] Server now running at http://127.0.0.1:1880/
14 Mar 18:53:29 - [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.

14 Mar 18:53:29 - [info] Stopping flows
14 Mar 18:53:29 - [info] Stopped flows
14 Mar 18:53:29 - [info] Starting flows
14 Mar 18:53:29 - [info] Started flows
14 Mar 18:53:29 - [red] Uncaught Exception:
14 Mar 18:53:29 - Error: EREMOTEIO: remote I/O error, read
at Object.readSync (fs.js:494:3)
at Bus.i2cReadSync (/home/pi/.node-red/node_modules/i2c-bus/i2c-bus.js:334:13)
at Oled._readI2C (/home/pi/.node-red/node_modules/oled-i2c-bus/oled.js:170:15)
at tick (/home/pi/.node-red/node_modules/oled-i2c-bus/oled.js:182:10)
at Timeout._onTimeout (/home/pi/.node-red/node_modules/oled-i2c-bus/oled.js:194:27)
at ontimeout (timers.js:436:11)
at tryOnTimeout (timers.js:300:5)
at listOnTimeout (timers.js:263:5)
at Timer.processTimers (timers.js:223:10)

Do you have something connected to the GPIO pins and/or do you have that setup in your flows, it seems like that is the culprit:

4 Mar 18:53:29 - Error: EREMOTEIO: remote I/O error, read
at Object.readSync (fs.js:494:3)
at Bus.i2cReadSync (/home/pi/.node-red/node_modules/i2c-bus/i2c-bus.js:334:13)
at Oled._readI2C (/home/pi/.node-red/node_modules/oled-i2c-bus/oled.js:170:15)
at tick (/home/pi/.node-red/node_modules/oled-i2c-bus/oled.js:182:10)
at Timeout._onTimeout (/home/pi/.node-red/node_modules/oled-i2c-bus/oled.js:194:27)

Safe mode is a special mode for troubleshooting, the purpose is to disable/remove/update offending nodes, when done, you can deploy after which the flows will be started (hopefully without errors).

You are running an old version of node-red and an obsolete version of node.js. The latest in the 10.x series is 10.24 I think.

How did you install node-red? I suspect you did not use the recommended method for a pi. I suggest you run the script there which will bring you up to date. It may not help but at least you can then rule out that issue.

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