Failed at step GROUP spawning /usr/bin/env: No such process

Hi,

I've been using node-red for a while now, and today I realized that I can't execute it from my laptop, and I can't find the reason.

I tried to uninstall it with these recommendations:

I installed it again with the command I usually do it:
https://nodered.org/docs/getting-started/raspberrypi

But this is what I get:

nodered.service: Failed to determine group credentials: No such process
nodered.service: Failed at step GROUP spawning /usr/bin/env: No such process
nodered.service: Main process exited, code=exited, status=216/GROUP
nodered.service: Failed with result 'exit-code'.
nodered.service: Scheduled restart job, restart counter is at 37.
Stopped Node-RED graphical event wiring tool.
Started Node-RED graphical event wiring tool.
nodered.service: Failed to determine group credentials: No such process
nodered.service: Failed at step GROUP spawning /usr/bin/env: No such process
nodered.service: Main process exited, code=exited, status=216/GROUP
nodered.service: Failed with result 'exit-code'.
nodered.service: Scheduled restart job, restart counter is at 38.

This is my output from lsb_release -a:

No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.3 LTS
Release: 20.04
Codename: focal

And if I run: sudo systemctl status nodered.service, this is the output. As you can see, it is constantly activating but it is never active.

● nodered.service - Node-RED graphical event wiring tool
Loaded: loaded (/lib/systemd/system/nodered.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Mon 2022-02-14 12:05:47 CET; 18s ago
Docs: Redirecting…
Process: 21874 ExecStart=/usr/bin/env node $NODE_OPTIONS red.js $NODE_RED_OPTIONS (code=exited, status=216/GROUP)
Main PID: 21874 (code=exited, status=216/GROUP)

Could you please help me?

Thank you!

Can you paste the file /lib/systemd/system/nodered.service here please?

Can you logon as the user you used to install node red and run the command
groups

The /lib/systemd/system/nodered.service content:

#systemd service file to start Node-RED

[Unit]
Description=Node-RED graphical event wiring tool
Wants=network.target
Documentation=Redirecting…

[Service]
Type=simple
#Run as normal pi user - change to the user name you wish to run Node-RED as
User=qmf
Group=qmf
WorkingDirectory=/home/qmf

Environment="NODE_OPTIONS=--max_old_space_size=2048"
#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

And the groups command shows:

openmote adm dialout cdrom sudo dip video plugdev lpadmin lxd sambashare docker

Were you logged in as user qmf then? There should generally be a group with the same name as the user. Either create the group qmf and add the user to it, or if the service file is wrong then change the user/group/working directory there as appropriate. The error you got means that the group is invalid.

Thank you! It works now!

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