# Raspberry Pi Install Not Restarting After Installing From Manage Pallet

**URL:** <https://discourse.nodered.org/t/raspberry-pi-install-not-restarting-after-installing-from-manage-pallet/2835>\
**Category:** General\
**Created:** [4 September 2018 13:06 UTC](https://discourse.nodered.org/t/raspberry-pi-install-not-restarting-after-installing-from-manage-pallet/2835 "2018-09-04T13:06:09Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Patrick](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/patrick/32/2313_2.png) [@Patrick](https://discourse.nodered.org/u/Patrick)\
**Post date:** [4 September 2018 13:06 UTC](https://discourse.nodered.org/t/raspberry-pi-install-not-restarting-after-installing-from-manage-pallet/2835/1 "2018-09-04T13:06:09Z")

</div>

Hi,

I have Rasbian Stretch Lite set up in read only mode and installed NodeRED with the script (as per the website).

Using manage pallet to install the dashboard works fine. But after a reboot NodeRED does not start.

sudo journalctl -f -u nodered -o cat  
returns:

at Object.saveNodeList (/usr/lib/node\_modules/node-red/red/runtime/nodes/registry/registry.js:134:25)  
at /usr/lib/node\_modules/node-red/red/runtime/nodes/registry/loader.js:376:29  
at tryCatchReject (/usr/lib/node\_modules/node-red/node\_modules/when/lib/makePromise.js:845:30)  
at runContinuation1 (/usr/lib/node\_modules/node-red/node\_modules/when/lib/makePromise.js:804:4)  
at Fulfilled.when (/usr/lib/node\_modules/node-red/node\_modules/when/lib/makePromise.js:592:4)  
at Pending.run (/usr/lib/node\_modules/node-red/node\_modules/when/lib/makePromise.js:483:13)  
at Scheduler.\_drain (/usr/lib/node\_modules/node-red/node\_modules/when/lib/Scheduler.js:62:19)  
at Scheduler.drain (/usr/lib/node\_modules/node-red/node\_modules/when/lib/Scheduler.js:27:9)  
at \_combinedTickCallback (internal/process/next\_tick.js:131:7)  
at process.\_tickCallback (internal/process/next\_tick.js:180:9)

Any ideas?  
Thanks!

---

<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:** [4 September 2018 13:23 UTC](https://discourse.nodered.org/t/raspberry-pi-install-not-restarting-after-installing-from-manage-pallet/2835/2 "2018-09-04T13:23:42Z")

</div>

Restart node red then post here what you see from running node-red-log

---

<div class="post-metadata">

**Author:** ![Patrick](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/patrick/32/2313_2.png) [@Patrick](https://discourse.nodered.org/u/Patrick)\
**Post date:** [4 September 2018 13:44 UTC](https://discourse.nodered.org/t/raspberry-pi-install-not-restarting-after-installing-from-manage-pallet/2835/3 "2018-09-04T13:44:52Z")

</div>

installing the dashboard with npm works fine...

---

<div class="post-metadata">

**Author:** ![Patrick](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/patrick/32/2313_2.png) [@Patrick](https://discourse.nodered.org/u/Patrick)\
**Post date:** [4 September 2018 13:53 UTC](https://discourse.nodered.org/t/raspberry-pi-install-not-restarting-after-installing-from-manage-pallet/2835/4 "2018-09-04T13:53:28Z")

</div>

3 Sep 13:40:25 - [info] Node-RED version: v0.19.2

3 Sep 13:40:25 - [info] Node.js version: v8.11.4

3 Sep 13:40:25 - [info] Linux 4.14.62-v7+ arm LE

3 Sep 13:40:26 - [info] Loading palette nodes

3 Sep 13:40:30 - [info] Dashboard version 2.9.7 started at /ui

3 Sep 13:40:30 - [error] Failed to start server:

3 Sep 13:40:30 - [error] Error: EROFS: read-only file system, rename '/home/pi/.node-red/.config.json' -\> '/home/pi/.node-red/.config.json.backup'

---

<div class="post-metadata">

**Author:** ![Patrick](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/patrick/32/2313_2.png) [@Patrick](https://discourse.nodered.org/u/Patrick)\
**Post date:** [4 September 2018 13:54 UTC](https://discourse.nodered.org/t/raspberry-pi-install-not-restarting-after-installing-from-manage-pallet/2835/5 "2018-09-04T13:54:58Z")

</div>

So NodeRED cannot start in read only mode?  
This worked on older versions of Raspbian Stretch Lite...

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [4 September 2018 14:26 UTC](https://discourse.nodered.org/t/raspberry-pi-install-not-restarting-after-installing-from-manage-pallet/2835/6 "2018-09-04T14:26:34Z")

</div>

Have you got `readOnly` set in your settings file?

We have an [open pull-request](https://github.com/node-red/node-red/pull/1866) from @dceejay to refine how we report running on a read-only filesystem without the readOnly flag having been set. It's a scenario we hadn't tested for a while, so wasn't been handled as gracefully as it was previously.

---

<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:** [4 September 2018 14:26 UTC](https://discourse.nodered.org/t/raspberry-pi-install-not-restarting-after-installing-from-manage-pallet/2835/7 "2018-09-04T14:26:58Z")

</div>

Are you sure it is not to do with it being a later version of node-red?  
Presumably the file system was not read-only when you installed the dashboard, or when you deploy flows. It is only a guess but I think it may only do that backup when things have changed so you could try making the file system readable and start node-red a couple of times. It may well be that if you make it ro again then successive restarts will then be ok.  
Otherwise one of the gurus will no doubt respond.

---

<div class="post-metadata">

**Author:** ![Patrick](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/patrick/32/2313_2.png) [@Patrick](https://discourse.nodered.org/u/Patrick)\
**Post date:** [4 September 2018 14:29 UTC](https://discourse.nodered.org/t/raspberry-pi-install-not-restarting-after-installing-from-manage-pallet/2835/8 "2018-09-04T14:29:01Z")

</div>

When readOnly is set in settings.js, it creates a new flow after the Pi reboots.

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [4 September 2018 14:36 UTC](https://discourse.nodered.org/t/raspberry-pi-install-not-restarting-after-installing-from-manage-pallet/2835/9 "2018-09-04T14:36:48Z")

</div>

> [@Patrick](#):
>
> When readOnly is set in settings.js, it creates a new flow after the Pi reboots.

You'll have to give us a bit more information to help us understand what you are doing.

In your original post, you say you have it setup in read-only mode. You then say you installed the dashboard via the manage palette option. Was that with the file-system still in read-only mode? If so, that is a very odd thing because installing a node involves writing files.

You have not answered whether you have readOnly set in your settings file.

If you don't have readOnly mode set in the settings file then node-red will happily try to write files and, as I mentioned, it doesn't currently handle a failure as gracefully as it once did, and we have a PR working towards a fix on that.

So the right answer should be for you to ensure you have readOnly set in your settings file. But you mention if creates a new flow when you have that set. If that's the case, that is a bug that must be fixed. Are you using the Projects feature?

---

<div class="post-metadata">

**Author:** ![Patrick](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/patrick/32/2313_2.png) [@Patrick](https://discourse.nodered.org/u/Patrick)\
**Post date:** [4 September 2018 14:41 UTC](https://discourse.nodered.org/t/raspberry-pi-install-not-restarting-after-installing-from-manage-pallet/2835/10 "2018-09-04T14:41:47Z")

</div>

readOnly is not set in setting.js

Read-write mode is entered to deploy flows and install nodes.  
The file system boots to read only as default.

Deploying flows then rebooting seems to be stable.

NodeRED does not start after installing nodes from manage palette then rebooting.

Starting NodeRED in read-write mode once solves the issue (it then starts properly after reboot).

---

<div class="post-metadata">

**Author:** ![Patrick](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/patrick/32/2313_2.png) [@Patrick](https://discourse.nodered.org/u/Patrick)\
**Post date:** [4 September 2018 14:52 UTC](https://discourse.nodered.org/t/raspberry-pi-install-not-restarting-after-installing-from-manage-pallet/2835/11 "2018-09-04T14:52:39Z")

</div>

Not currently using the projects feature, but planning on it...

Testing with:  
readOnly: true,  
flowFile: **'/home/pi/.node-red/flows.json'** ,  
userDir: **'/home/pi/.node-red/'** ,  
nodesDir: **'/home/pi/.node-red/nodes'** ,

When a new flow is deployed in read-write mode, then NodeRED is restarted, it reverts back to the previous flow.

(In earlier testing the log showed something like "creating new flow". That was probably when there was no flow to revert to.)

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [4 September 2018 14:59 UTC](https://discourse.nodered.org/t/raspberry-pi-install-not-restarting-after-installing-from-manage-pallet/2835/12 "2018-09-04T14:59:53Z")

</div>

> [@Patrick](#):
>
> When a new flow is deployed in read-write mode, then NodeRED is restarted, it reverts back to the previous flow.

When you say 'read-write mode' do you mean both the filesystem is in read-write mode _and_ the readOnly property in settings.js is not set?

---

<div class="post-metadata">

**Author:** ![Patrick](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/patrick/32/2313_2.png) [@Patrick](https://discourse.nodered.org/u/Patrick)\
**Post date:** [4 September 2018 15:08 UTC](https://discourse.nodered.org/t/raspberry-pi-install-not-restarting-after-installing-from-manage-pallet/2835/13 "2018-09-04T15:08:33Z")

</div>

I mean only the file system...

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [4 September 2018 15:19 UTC](https://discourse.nodered.org/t/raspberry-pi-install-not-restarting-after-installing-from-manage-pallet/2835/14 "2018-09-04T15:19:09Z")

</div>

If you have `readOnly` set to true in your settings file, then Node-RED will not try writing any files, regardless of the state of the filesystem. That is why it appears to revert when you restart Node-RED.

I _think_ we used to reject the Deploy in this scenario to make it explicit - but clearly something has unintentionally changed (probably back in 0.17 when Projects was introduced). I will look at fixing that - so deploy's are properly rejected when `readOnly` is set.

---

<div class="post-metadata">

**Author:** ![Patrick](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/patrick/32/2313_2.png) [@Patrick](https://discourse.nodered.org/u/Patrick)\
**Post date:** [4 September 2018 15:29 UTC](https://discourse.nodered.org/t/raspberry-pi-install-not-restarting-after-installing-from-manage-pallet/2835/15 "2018-09-04T15:29:14Z")

</div>

Got it.

I never had an issue trying to write to a read only file system (without readOnly set). Always got an error and things kept working.

The issue for this thread is NodeRED does not start on a read-only file system after installing nodes on a read-write file system (readOnly not defined in settings.js).  
Starting NodeRED once with the file system in read-write mode fixes the issue.

Thanks for the help & clarifications!

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [4 September 2018 15:33 UTC](https://discourse.nodered.org/t/raspberry-pi-install-not-restarting-after-installing-from-manage-pallet/2835/16 "2018-09-04T15:33:27Z")

</div>

> [@Patrick](#):
>
> The issue for this thread is NodeRED does not start on a read-only file system after installing nodes on a read-write file system (readOnly not defined in settings.js).

Yup - and that is one of the scenarios the PR will handle. _But_ the question is whether it is an error condition or not - should it be a warning or a fatal error (as it is today, just with a more meaningful message). Is it an error to be running Node-RED on a read-only filesystem without having set the `readOnly` flag in the settings file?

I would rather stop NR running on a R/O filesystem if readOnly is _not_ set, then have a user complain all their work was lost because they thought they were running on a r/w filesystem.

---

<div class="post-metadata">

**Author:** ![Patrick](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/patrick/32/2313_2.png) [@Patrick](https://discourse.nodered.org/u/Patrick)\
**Post date:** [4 September 2018 15:53 UTC](https://discourse.nodered.org/t/raspberry-pi-install-not-restarting-after-installing-from-manage-pallet/2835/17 "2018-09-04T15:53:49Z")

</div>

For my application having to change the readOnly flag for every deploy would make things cumbersome.

Here is a typical scenario:

- I create a flow
- try to deploy
- get a message that the deploy failed because the file system is read only
- set the file system to read write
- deploy
- set file system to read only

NodeRED has never crashed on me so I am happy to work like this.  
I might feel differently if I lost my work x% of the time because I forget to set the file system to read write before clicking deploy.

Then again I should "know what I am doing" and would eventually learn.

In every case, I am not a fan of stopping NR if readOnly is not set and file system is RO.  
2 cents...

---

<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:** [4 September 2018 16:18 UTC](https://discourse.nodered.org/t/raspberry-pi-install-not-restarting-after-installing-from-manage-pallet/2835/18 "2018-09-04T16:18:23Z")

</div>

> [@Patrick](#):
>
> For my application having to change the readOnly flag for every deploy would make things cumbersome.

In your situation I would write a couple of simple scripts, one to set ro in settings and to make the file system ro, and another to reverse it. Then it is not cumbersome.  
May I ask why are you running ro during development?

---

<div class="post-metadata">

**Author:** ![Patrick](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/patrick/32/2313_2.png) [@Patrick](https://discourse.nodered.org/u/Patrick)\
**Post date:** [4 September 2018 16:46 UTC](https://discourse.nodered.org/t/raspberry-pi-install-not-restarting-after-installing-from-manage-pallet/2835/19 "2018-09-04T16:46:39Z")

</div>

We already have a script for the file system. I guess you are right - we can extend it to modify settings.js. Sounds like that is what NR would prefer.

Raspberry Pi is in read only to protect the SD card.  
Power can "accidentally" get pulled - especially on the test bench.

---

<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:** [4 September 2018 16:51 UTC](https://discourse.nodered.org/t/raspberry-pi-install-not-restarting-after-installing-from-manage-pallet/2835/20 "2018-09-04T16:51:47Z")

</div>

> [@Patrick](#):
>
> Raspberry Pi is in read only to protect the SD card.

That is interesting, it had not occurred to me that one could do that. I feel some googling on how to do it coming on. It would only be appropriate on systems that don't need to write anything but I do have some that it might be useful for. One couldn't have mosquitto for example, at least not with retained properties.

[Next page](https://discourse.nodered.org/t/raspberry-pi-install-not-restarting-after-installing-from-manage-pallet/2835.md?page=2)
