Hi, I am having some issues with the nodered.service
Node-RED version: v1.3.5
Node.js version: v14.17.0
Linux 5.4.51+ arm LE
raspberry pi Zero W
I can start node-red-pi as user (2E3) without problems.
However when I wan to setup node red as a service through :
systemctl start nodered.service
I get this failure:
Failed to start nodered.service: Unit nodered.service has a bad unit file setting.
See system logs and 'systemctl status nodered.service' for details.
status says:
nodered.service - Node-RED graphical event wiring tool
Loaded: bad-setting (Reason: Unit nodered.service has a bad unit file setting.)
Active: inactive (dead) since Fri 2021-06-25 16:47:52 CEST; 28min ago
Docs: http://nodered.org/docs/hardware/raspberrypi.html
Main PID: 6020 (code=exited, status=0/SUCCESS)
/lib/systemd/system/nodered.service:8: Invalid user/group name or numeric ID: 2E3
My nodered.service files contains
systemd service file to start Node-RED
[Unit]
Description=Node-RED graphical event wiring tool
#After=syslog.target network.target
Wants=network.target
Documentation=http://nodered.org/docs/hardware/raspberrypi.html
[Service]
Type=simple
Run as normal pi user - change to the user name you wish to run Node-RED as
User=2E3 ---> ERROR ????
Group=2E3
WorkingDirectory=/home/2E3/.node-red
Environment="NODE_OPTIONS=--max_old_space_size=256"
uncomment and edit next line if you need an http proxy
#Environment="HTTP_PROXY=my.httpproxy.server.address"
uncomment the next line for a more verbose log output
#Environment="NODE_RED_OPTIONS=-v"
uncomment next line if you need to wait for time sync before starting
#ExecStartPre=/bin/bash -c '/bin/journalctl -b -u systemd-timesyncd | /bin/grep -q "systemd-timesyncd.* Synchronized to time server"'
ExecStart=/usr/bin/env node-red-pi $NODE_OPTIONS $NODE_RED_OPTIONS
#ExecStart=/usr/bin/env node $NODE_OPTIONS red.js $NODE_RED_OPTIONS
Use SIGINT to stop
KillSignal=SIGINT
Auto restart on crash
Restart=on-failure
RestartSec=20
Tag things in the log
SyslogIdentifier=Node-RED
#StandardOutput=syslog
[Install]
WantedBy=multi-user.target
I can not find a solution
Any ideas ?
Thx
2E3