# Node Red Connection Errors after safe start

**URL:** <https://discourse.nodered.org/t/node-red-connection-errors-after-safe-start/42651>\
**Category:** General\
**Created:** [15 March 2021 03:11 UTC](https://discourse.nodered.org/t/node-red-connection-errors-after-safe-start/42651 "2021-03-15T03:11:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Maxdingus](https://avatars.discourse-cdn.com/v4/letter/m/ac91a4/32.png) [@Maxdingus](https://discourse.nodered.org/u/Maxdingus)\
**Post date:** [15 March 2021 03:11 UTC](https://discourse.nodered.org/t/node-red-connection-errors-after-safe-start/42651/1 "2021-03-15T03:11:23Z")

</div>

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/](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)

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [15 March 2021 06:06 UTC](https://discourse.nodered.org/t/node-red-connection-errors-after-safe-start/42651/2 "2021-03-15T06:06:08Z")

</div>

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:

```auto
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).

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [15 March 2021 09:05 UTC](https://discourse.nodered.org/t/node-red-connection-errors-after-safe-start/42651/3 "2021-03-15T09:05:40Z")

</div>

> [@Maxdingus](#):
>
> 14 Mar 18:53:00 - [info] Node-RED version: v1.0.3  
> 14 Mar 18:53:00 - [info] Node.js version: v10.15.2

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](https://nodered.org/docs/getting-started/raspberrypi) 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.

---

<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:** [14 May 2021 09:06 UTC](https://discourse.nodered.org/t/node-red-connection-errors-after-safe-start/42651/4 "2021-05-14T09:06:26Z")

</div>

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