Node red stops right after reboot and node-red "auto-start"

@Colin At 13:46 I gave reboot command.

This is the log from CLI:

26 Dec 13:45:07 - [info] User directory : /home/pi/.node-red
26 Dec 13:45:07 - [warn] Projects disabled : editorTheme.projects.enabled=false
26 Dec 13:45:07 - [info] Flows file     : /home/pi/.node-red/flows.json
26 Dec 13:45:07 - [info] Creating new flow file
26 Dec 13:45:07 - [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.
---------------------------------------------------------------------
26 Dec 13:45:07 - [warn] Encrypted credentials not found
26 Dec 13:45:07 - [info] Starting flows
26 Dec 13:45:07 - [info] Started flows
26 Dec 13:45:07 - [info] Server now running at http://127.0.0.1:1880/
26 Dec 13:45:57 - [info] Stopping flows
Stopping Node-RED graphical event wiring tool...
26 Dec 13:45:57 - [info] Stopped flows
nodered.service: Succeeded.
Stopped Node-RED graphical event wiring tool.
nodered.service: Consumed 11.234s CPU time.
Started Node-RED graphical event wiring tool.
26 Dec 13:46:16 - [info]
Welcome to Node-RED
===================
26 Dec 13:46:16 - [info] Node-RED version: v3.0.2
26 Dec 13:46:16 - [info] Node.js  version: v16.19.0
26 Dec 13:46:16 - [info] Linux 5.15.76-v7+ arm LE
26 Dec 13:46:20 - [info] Loading palette nodes
26 Dec 13:46:27 - [info] Settings file  : /home/pi/.node-red/settings.js
26 Dec 13:46:27 - [info] Context store  : 'default' [module=memory]
26 Dec 13:46:27 - [info] User directory : /home/pi/.node-red
26 Dec 13:46:27 - [warn] Projects disabled : editorTheme.projects.enabled=false
26 Dec 13:46:27 - [info] Flows file     : /home/pi/.node-red/flows.json
26 Dec 13:46:27 - [info] Creating new flow file
26 Dec 13:46:27 - [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.
---------------------------------------------------------------------
26 Dec 13:46:27 - [warn] Encrypted credentials not found
26 Dec 13:46:28 - [info] Starting flows
26 Dec 13:46:28 - [info] Started flows
26 Dec 13:46:28 - [info] Server now running at http://127.0.0.1:1880/

This is the syslog-file:

ec 26 13:45:00 EBStest Node-RED[337]: 26 Dec 13:45:00 - [info] Loading palette nodes
Dec 26 13:45:01 EBStest vncserver-x11[524,root]: Connections: connected: 192.168.0.190::9235 (TCP)
Dec 26 13:45:01 EBStest vncserver-x11[524,root]: Connections: authenticated: 192.168.0.190::9235 (TCP), as pi (d permissions)
Dec 26 13:45:01 EBStest dhcpcd[415]: eth0: DHCPv6 REPLY: No Addresses Available
Dec 26 13:45:02 EBStest dbus-daemon[320]: [system] Activating via systemd: service name='org.freedesktop.ColorManager' unit='colord.service' requested by ':1.10' (uid=0 pid=470 comm="/usr/sbin/cupsd -l ")
Dec 26 13:45:02 EBStest systemd[1]: Starting Manage, Install and Generate Color Profiles...
Dec 26 13:45:02 EBStest dbus-daemon[320]: [system] Successfully activated service 'org.freedesktop.ColorManager'
Dec 26 13:45:02 EBStest systemd[1]: Started Manage, Install and Generate Color Profiles.
Dec 26 13:45:04 EBStest PackageKit: refresh-cache transaction /15_bccbdaba from uid 1000 finished with success after 4490ms
Dec 26 13:45:05 EBStest kernel: [   33.110419] cam-dummy-reg: disabling
Dec 26 13:45:07 EBStest Node-RED[337]: 26 Dec 13:45:07 - [info] Settings file  : /home/pi/.node-red/settings.js
Dec 26 13:45:07 EBStest Node-RED[337]: 26 Dec 13:45:07 - [info] Context store  : 'default' [module=memory]
Dec 26 13:45:07 EBStest Node-RED[337]: 26 Dec 13:45:07 - [info] User directory : /home/pi/.node-red
Dec 26 13:45:07 EBStest Node-RED[337]: 26 Dec 13:45:07 - [warn] Projects disabled : editorTheme.projects.enabled=false
Dec 26 13:45:07 EBStest Node-RED[337]: 26 Dec 13:45:07 - [info] Flows file     : /home/pi/.node-red/flows.json
Dec 26 13:45:07 EBStest Node-RED[337]: 26 Dec 13:45:07 - [info] Creating new flow file
Dec 26 13:45:07 EBStest Node-RED[337]: 26 Dec 13:45:07 - [warn]
Dec 26 13:45:07 EBStest Node-RED[337]: ---------------------------------------------------------------------
Dec 26 13:45:07 EBStest Node-RED[337]: Your flow credentials file is encrypted using a system-generated key.
Dec 26 13:45:07 EBStest Node-RED[337]: If the system-generated key is lost for any reason, your credentials
Dec 26 13:45:07 EBStest Node-RED[337]: file will not be recoverable, you will have to delete it and re-enter
Dec 26 13:45:07 EBStest Node-RED[337]: your credentials.
Dec 26 13:45:07 EBStest Node-RED[337]: You should set your own key using the 'credentialSecret' option in
Dec 26 13:45:07 EBStest Node-RED[337]: your settings file. Node-RED will then re-encrypt your credentials
Dec 26 13:45:07 EBStest Node-RED[337]: file using your chosen key the next time you deploy a change.
Dec 26 13:45:07 EBStest Node-RED[337]: ---------------------------------------------------------------------
Dec 26 13:45:07 EBStest Node-RED[337]: 26 Dec 13:45:07 - [warn] Encrypted credentials not found
Dec 26 13:45:07 EBStest Node-RED[337]: 26 Dec 13:45:07 - [info] Starting flows
Dec 26 13:45:07 EBStest Node-RED[337]: 26 Dec 13:45:07 - [info] Started flows
Dec 26 13:45:07 EBStest Node-RED[337]: 26 Dec 13:45:07 - [info] Server now running at http://127.0.0.1:1880/
Dec 26 13:45:10 EBStest systemd[1]: systemd-fsckd.service: Succeeded.
Dec 26 13:45:12 EBStest PackageKit: get-updates transaction /16_eeadceda from uid 1000 finished with success after 7628ms
Dec 26 13:45:23 EBStest systemd-timesyncd[290]: Initial synchronization to time server 193.190.198.10:123 (2.debian.pool.ntp.org).
Dec 26 13:45:28 EBStest dhcpcd[415]: eth0: DHCPv6 REPLY: No Addresses Available
Dec 26 13:45:37 EBStest systemd[1]: systemd-hostnamed.service: Succeeded.
Dec 26 13:45:57 EBStest systemd[1]: Stopping Session 1 of user pi.
Dec 26 13:45:57 EBStest systemd[1]: Stopping Session 3 of user pi.
Dec 26 13:45:57 EBStest systemd[1]: Stopping Session 4 of user pi.
Dec 26 13:45:57 EBStest systemd[1]: Removed slice system-modprobe.slice.
Dec 26 13:45:57 EBStest systemd[1]: Stopped target Bluetooth.
Dec 26 13:45:57 EBStest systemd[1]: Stopped target Graphical Interface.
Dec 26 13:45:57 EBStest systemd[1]: Stopped target Multi-User System.
Dec 26 13:45:57 EBStest systemd[1]: Stopped target Login Prompts.
Dec 26 13:45:57 EBStest systemd[1]: Stopped target Sound Card.
Dec 26 13:45:57 EBStest systemd[1]: Stopped target Timers.
Dec 26 13:45:57 EBStest systemd[1]: apt-daily-upgrade.timer: Succeeded.
Dec 26 13:45:57 EBStest systemd[1]: Stopped Daily apt upgrade and clean activities.
Dec 26 13:45:57 EBStest systemd[1]: apt-daily.timer: Succeeded.
Dec 26 13:45:57 EBStest systemd[1]: Stopped Daily apt download activities.
Dec 26 13:45:57 EBStest ModemManager[460]: <info>  caught signal, shutting down...
Dec 26 13:45:57 EBStest systemd[1]: e2scrub_all.timer: Succeeded.
Dec 26 13:45:57 EBStest bluetoothd[917]: Terminating
Dec 26 13:45:57 EBStest systemd[1]: Stopped Periodic ext4 Online Metadata Check for All Filesystems.
Dec 26 13:45:57 EBStest bluetoothd[917]: Endpoint unregistered: sender=:1.25 path=/MediaEndpoint/A2DPSink/sbc
Dec 26 13:45:57 EBStest systemd[1]: fstrim.timer: Succeeded.
Dec 26 13:45:57 EBStest bluetoothd[917]: Endpoint unregistered: sender=:1.25 path=/MediaEndpoint/A2DPSource/sbc
Dec 26 13:45:57 EBStest systemd[1]: Stopped Discard unused blocks once a week.
Dec 26 13:45:57 EBStest systemd[1]: logrotate.timer: Succeeded.
Dec 26 13:45:57 EBStest ModemManager[460]: <info>  ModemManager is shut down
Dec 26 13:45:57 EBStest influxd[472]: ts=2022-12-26T12:45:57.845137Z lvl=info msg="Signal received, initializing clean shutdown..." log_id=0e~cGmp0000
Dec 26 13:45:57 EBStest influxd[472]: ts=2022-12-26T12:45:57.845273Z lvl=info msg="Waiting for clean shutdown..." log_id=0e~cGmp0000
Dec 26 13:45:57 EBStest influxd[472]: ts=2022-12-26T12:45:57.845594Z lvl=info msg="Listener closed" log_id=0e~cGmp0000 service=snapshot
Dec 26 13:45:57 EBStest systemd[1]: Stopped Daily rotation of log files.
Dec 26 13:45:57 EBStest systemd[1]: man-db.timer: Succeeded.
Dec 26 13:45:57 EBStest systemd[1]: Stopped Daily man-db regeneration.
Dec 26 13:45:57 EBStest systemd[1]: systemd-tmpfiles-clean.timer: Succeeded.
Dec 26 13:45:57 EBStest systemd[1]: Stopped Daily Cleanup of Temporary Directories.
Dec 26 13:45:57 EBStest systemd[1]: Stopped target System Time Synchronized.
Dec 26 13:45:57 EBStest systemd[1]: Stopped target System Time Set.
Dec 26 13:45:57 EBStest systemd[1]: systemd-rfkill.socket: Succeeded.
Dec 26 13:45:57 EBStest systemd[1]: Closed Load/Save RF Kill Switch Status /dev/rfkill Watch.
Dec 26 13:45:57 EBStest systemd[1]: Unmounting RPC Pipe File System...
Dec 26 13:45:57 EBStest influxd[472]: ts=2022-12-26T12:45:57.845553Z lvl=info msg="Shutting down monitor service" log_id=0e~cGmp0000 service=monitor
Dec 26 13:45:57 EBStest influxd[472]: ts=2022-12-26T12:45:57.858460Z lvl=info msg="Terminating precreation service" log_id=0e~cGmp0000 service=shard-precreation
Dec 26 13:45:57 EBStest influxd[472]: ts=2022-12-26T12:45:57.858611Z lvl=info msg="Terminating continuous query service" log_id=0e~cGmp0000 service=continuous_querier
Dec 26 13:45:57 EBStest influxd[472]: ts=2022-12-26T12:45:57.858931Z lvl=info msg="Closing retention policy enforcement service" log_id=0e~cGmp0000 service=retention
Dec 26 13:45:57 EBStest influxd[472]: ts=2022-12-26T12:45:57.859629Z lvl=info msg="Closed service" log_id=0e~cGmp0000 service=subscriber
Dec 26 13:45:57 EBStest systemd[1]: Stopping Modem Manager...
Dec 26 13:45:57 EBStest influxd[472]: ts=2022-12-26T12:45:57.869904Z lvl=info msg="Server shutdown completed" log_id=0e~cGmp0000
Dec 26 13:45:57 EBStest systemd[1]: Stopping Save/Restore Sound Card State...
Dec 26 13:45:57 EBStest systemd[1]: Stopping Bluetooth service...
Dec 26 13:45:57 EBStest systemd[1]: Stopping Manage, Install and Generate Color Profiles...
Dec 26 13:45:57 EBStest systemd[1]: Stopping Regular background program processing daemon...
Dec 26 13:45:57 EBStest systemd[1]: Stopping Make remote CUPS printers available locally...
Dec 26 13:45:57 EBStest systemd[1]: Stopping dphys-swapfile - set up, mount/unmount, and delete a swap file...
Dec 26 13:45:57 EBStest systemd[1]: Stopping Getty on tty1...
Dec 26 13:45:57 EBStest systemd[1]: glamor-test.service: Succeeded.
Dec 26 13:45:57 EBStest systemd[1]: Stopped Check for glamor.
Dec 26 13:45:57 EBStest systemd[1]: gldriver-test.service: Succeeded.
Dec 26 13:45:57 EBStest systemd[1]: Stopped Check for v3d driver.
Dec 26 13:45:57 EBStest Node-RED[337]: 26 Dec 13:45:57 - [info] Stopping flows
Dec 26 13:45:57 EBStest systemd[1]: Stopping InfluxDB is an open-source, distributed, time series database...
Dec 26 13:45:57 EBStest systemd[1]: Stopping Light Display Manager...
Dec 26 13:45:57 EBStest systemd[1]: Stopping Node-RED graphical event wiring tool...
Dec 26 13:45:57 EBStest systemd[678]: run-rpc_pipefs.mount: Succeeded.
Dec 26 13:45:57 EBStest systemd[1]: Stopping PackageKit Daemon...
Dec 26 13:45:57 EBStest Node-RED[337]: 26 Dec 13:45:57 - [info] Stopped flows
Dec 26 13:45:57 EBStest systemd[1]: Stopping LSB: Switch to ondemand cpu governor (unless shift key is pressed)...
Dec 26 13:45:57 EBStest vncserver-x11-serviced[593]: X connection to :0 broken (explicit kill or server shutdown).
Dec 26 13:45:57 EBStest systemd[1]: Stopping LSB: rng-tools (Debian variant)...
Dec 26 13:46:03 EBStest systemd-modules-load[129]: Failed to find module 'lp'
Dec 26 13:46:03 EBStest systemd-modules-load[129]: Failed to find module 'ppdev'
Dec 26 13:46:03 EBStest systemd-modules-load[129]: Failed to find module 'parport_pc'
Dec 26 13:46:03 EBStest systemd-modules-load[129]: Inserted module 'i2c_dev'
Dec 26 13:46:03 EBStest systemd-sysctl[147]: Couldn't write '1' to 'kernel/unprivileged_userns_clone', ignoring: No such file or directory
Dec 26 13:46:03 EBStest fake-hwclock[133]: Mon 26 Dec 12:45:58 UTC 2022
Dec 26 13:46:03 EBStest systemd-fsck[143]: e2fsck 1.46.2 (28-Feb-2021)
Dec 26 13:46:03 EBStest systemd-fsck[143]: rootfs: clean, 138917/1918208 files, 1175366/7725184 blocks
Dec 26 13:46:03 EBStest systemd[1]: Finished Remount Root and Kernel File Systems.
Dec 26 13:46:03 EBStest systemd[1]: Condition check resulted in Rebuild Hardware Database being skipped.
Dec 26 13:46:03 EBStest systemd[1]: Starting Flush Journal to Persistent Storage...
Dec 26 13:46:03 EBStest systemd[1]: Condition check resulted in Platform Persistent Storage Archival being skipped.
Dec 26 13:46:03 EBStest systemd[1]: Starting Load/Save Random Seed...
Dec 26 13:46:03 EBStest systemd[1]: Starting Create System Users...
Dec 26 13:46:03 EBStest systemd[1]: Finished Coldplug All udev Devices.
Dec 26 13:46:03 EBStest systemd[1]: Starting Helper to synchronize boot up for ifupdown...
Dec 26 13:46:03 EBStest systemd[1]: Finished Helper to synchronize boot up for ifupdown.
Dec 26 13:46:03 EBStest systemd[1]: Finished Load/Save Random Seed.
Dec 26 13:46:03 EBStest systemd[1]: Condition check resulted in First Boot Complete being skipped.
Dec 26 13:46:03 EBStest systemd[1]: Finished Create System Users.
Dec 26 13:46:03 EBStest systemd[1]: Starting Create Static Device Nodes in /dev...
Dec 26 13:46:03 EBStest systemd[1]: Finished Set the console keyboard layout.
Dec 26 13:46:03 EBStest systemd[1]: Finished Create Static Device Nodes in /dev.
Dec 26 13:46:03 EBStest systemd[1]: Reached target Local File Systems (Pre).
Dec 26 13:46:03 EBStest systemd[1]: Starting Rule-based Manager for Device Events and Files...
Dec 26 13:46:03 EBStest systemd[1]: Finished Flush Journal to Persistent Storage.
Dec 26 13:46:03 EBStest systemd[1]: Started Rule-based Manager for Device Events and Files.
Dec 26 13:46:03 EBStest systemd[1]: Starting Show Plymouth Boot Screen...
Dec 26 13:46:03 EBStest systemd[1]: Received SIGRTMIN+20 from PID 172 (plymouthd).
Dec 26 13:46:03 EBStest systemd[1]: Started Show Plymouth Boot Screen.
Dec 26 13:46:03 EBStest systemd[1]: Condition check resulted in Dispatch Password Requests to Console Directory Watch being skipped.
Dec 26 13:46:03 EBStest systemd[1]: Started Forward Password Requests to Plymouth Directory Watch.
Dec 26 13:46:03 EBStest systemd[1]: Reached target Local Encrypted Volumes.
D

Ok, look carefully at your node-red log. It starts at 13:45:07, which is before the boot.
At 13:46 you rebooted. In fact I think it was a few seconds before that because in the log you can see it stopping node-red (because you had told it to reboot).

Then the reboot happened and at 13:46:16 node-red restarted

So I can't see anything wrong in the log. I don't understand what you think the problem is.

@Colin The problem is, that after reboot Node Red starts 2 times, only after that it keeps on running well. Only difference is, before I installed all again it stopped after first time, after restart it kept on going well.

But I have found the reason for the problems, it is just a bad SD card. I bought me another one and installed with the same procedure again. Now it is running well!!!

You keep saying that, but so far you have shown no evidence to support that so we can diagnose why. All restarts that you showed us appeared to be the actual reboot itself.
However, if all is now well then that is ok.

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