Node red keeps on auto restarting

hello I have a systemd service which keeps on restarting automatically every 40 seconds for some reason

My systemd service file is as follows:


[Unit]
Description=Node-RED is a tool for wiring together hardware devices, APIs and online services in new and interesting ways.
After=syslog.target network.target
Documentation=http://nodered.org/

[Service]
ExecStart=/usr/local/bin/node-red
Type=forking
WorkingDirectory=/home/chris/.node-red/
Nice=10
SyslogIdentifier=Node-RED
StandardOutput=syslog
Restart=on-failure
KillSignal=SIGINT

[Install]
WantedBy=default.target

The syslog on my system outputs the following:

Sep 22 22:08:19 server systemd[793]: node-red-m.service: start operation timed out. Terminating.
Sep 22 22:08:19 server systemd[793]: node-red-m.service: Failed with result 'timeout'.
Sep 22 22:08:19 server Node-RED[237077]: 22 Sep 22:08:19 - [info] Stopping flows
Sep 22 22:08:19 server Node-RED[237077]: 22 Sep 22:08:19 - [info] [server:Home Assistant] Closing connection to http://192.168.0.3:8123
Sep 22 22:08:19 server Node-RED[237077]: 22 Sep 22:08:19 - [info] [deconz-server:deconz_new] WebSocket connection closed
Sep 22 22:08:19 server Node-RED[237077]: 22 Sep 22:08:19 - [info] Stopped flows
Sep 22 22:08:19 server systemd[793]: Failed to start Node-RED is a tool for wiring together hardware devices, APIs and online services in new and interesting ways..
Sep 22 22:08:20 server systemd[793]: node-red-m.service: Scheduled restart job, restart counter is at 820.
Sep 22 22:08:20 server systemd[793]: Stopped Node-RED is a tool for wiring together hardware devices, APIs and online services in new and interesting ways..
Sep 22 22:08:20 server systemd[793]: Starting Node-RED is a tool for wiring together hardware devices, APIs and online services in new and interesting ways....
Sep 22 22:08:20 server Node-RED[237363]: 22 Sep 22:08:20 - [info]
Sep 22 22:08:20 server Node-RED[237363]: Welcome to Node-RED
Sep 22 22:08:20 server Node-RED[237363]: ===================
Sep 22 22:08:20 server Node-RED[237363]: 22 Sep 22:08:20 - [info] Node-RED version: v2.0.6
Sep 22 22:08:20 server Node-RED[237363]: 22 Sep 22:08:20 - [info] Node.js  version: v10.19.0
Sep 22 22:08:20 server Node-RED[237363]: 22 Sep 22:08:20 - [info] Linux 5.4.0-84-generic x64 LE
Sep 22 22:08:21 server Node-RED[237363]: 22 Sep 22:08:21 - [info] Loading palette nodes
Sep 22 22:08:22 server Node-RED[237363]: Missing ENV var CONFIG_PATH
Sep 22 22:08:22 server Node-RED[237363]: 22 Sep 22:08:22 - [info] Dashboard version 2.30.0 started at /ui
Sep 22 22:08:22 server Node-RED[237363]: 22 Sep 22:08:22 - [info] Settings file  : /home/user1/.node-red/settings.js
Sep 22 22:08:22 server Node-RED[237363]: 22 Sep 22:08:22 - [info] HTTP Static    : /home/user1/.node-red
Sep 22 22:08:22 server Node-RED[237363]: 22 Sep 22:08:22 - [info] Context store  : 'default' [module=memory]
Sep 22 22:08:22 server Node-RED[237363]: 22 Sep 22:08:22 - [info] User directory : /home/user1/.node-red
Sep 22 22:08:22 server Node-RED[237363]: 22 Sep 22:08:22 - [warn] Projects disabled : editorTheme.projects.enabled=false
Sep 22 22:08:22 server Node-RED[237363]: 22 Sep 22:08:22 - [info] Flows file     : /home/user1/.node-red/flows.json
Sep 22 22:08:22 server Node-RED[237363]: 22 Sep 22:08:22 - [info] Server now running at http://127.0.0.1:1880/
Sep 22 22:08:22 server Node-RED[237363]: 22 Sep 22:08:22 - [warn]
Sep 22 22:08:22 server Node-RED[237363]: ---------------------------------------------------------------------

Does anyone know why this is happening?

I think you might have missed off the interesting parts of the log that would actually say what is causing the error?

Sorry, using forking is wrong, it should be simple :slight_smile:

All fixed!

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