I think I've experienced a bug when auto upgrading to v1.2.9.
I'm running the snap version of node red on a centos 8 system. Today the node red snap has been automatically upgraded to v1.2.9. After that, the daemon was not able to start the service anymore.
These are the corresponding lines in the log file.
10 Feb 14:14:13 - [info] Dashboard version 2.24.0 started at /ui
10 Feb 14:14:14 - [error] Failed to start server:
10 Feb 14:14:14 - [error] Error: EPERM: operation not permitted, copyfile '/root/snap/node-red/671/.config.nodes.json' -> '/root/snap/node-red/671/.config.nodes.json.backup'
After discovering this I checked the permissions corresponding to that folder but I couldn't see anything unusual. The snap is running as user root and the permissions seem to be correct. To be sure I double checked the folder permissions using getfacl and set them to 777, just to be sure. That didn't help.
Any ideas how to tackle this error? It looks very much like a bug to me, especially because node red worked just fine until the upgrade.
Odd - not sure why it would have a permissions problem when running as root.
We don't do anything specific about permissions as we have never had to.
Worked fine when I tested it on ubuntu not helpful i know...
10 Feb 16:43:54 - [info] Node-RED version: v1.2.9
10 Feb 16:43:54 - [info] Node.js version: v14.15.5
10 Feb 16:43:54 - [info] Linux 5.4.0-1032-kvm x64 LE
10 Feb 16:43:54 - [info] Loading palette nodes
10 Feb 16:43:55 - [info] Worldmap version 2.5.6
10 Feb 16:43:55 - [info] Dashboard version 2.23.4 started at /ui
10 Feb 16:43:55 - [error] Failed to start server:
10 Feb 16:43:55 - [error] Error: EPERM: operation not permitted, copyfile '/root/snap/node-red/671/.config.nodes.json' -> '/root/snap/node-red/671/.config.nodes.json.backup'
and thanks for picking up this topic so quickly. I'm very surprised and happy at the same time.
What are the permission on those files ?
how about ls -lart ?
That's what I checked before I posted. They all looked fine, similar to the listing you posted and to the directory of the running revision.
or manual copy across once ?
I tried that before, too. I was able to copy the file with no issues. Changing permissions worked flawlessly, too. I did not run into the error message Manish posted, telling about a read-only file system.
Neither of those did solve the initial error, though.
OK - have reverted it for now... if anyone has any ideas let me know.
It seems a snap refresh node-red did the trick.
After I had posted the issue, i reverted the node-red snap to the previous version which was up and running instantly.
After reading your answers, I did a refresh and now I've got a running 1.2.6 (snap rev. 667).
Just for the record:
The version I was running until this morning was rev. 630, which is some 1.1.x-ish version.
The version which came with the auto upgrade was the mentioned 1.2.9 (rev. 671)
after reverting and refreshing (and you meanwhile rolling back the 1.2.9) the snap has been upgraded to v1.2.6 (rev. 667)
The only difference between this and the previous broken one was that I bumped nodejs up to 14.x - This is still on 10.x which goes EOL in April... why changing node.js version should change r/w permissions is beyond me.