systemd - My custom service exits with status code 216/GROUP
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
I installed the following unit file for an Nodejs Express Server:
[Unit]
Description=Server for SpeedBot
After=network.target
[Service]
ExecStart=/var/www/SpeedBot/server.js
Restart=always
User=nobody
Group=nobody
Environment=PATH=/usr/bin:/usr/local/bin
Environment=NODE_ENV=production
WorkingDirectory=/home/pi/SpeedBot/server.js
[Install]
WantedBy=multi-user.target
When I run it and do: service speedbotserver status
i get:
â speedbotserver.service - Server for SpeedBot
Loaded: loaded (/etc/systemd/system/speedbotserver.service; disabled)
Active: failed (Result: start-limit) since Thu 2017-06-29 01:31:18 UTC; 18h ago
Process: 19189 ExecStart=/var/www/SpeedBot/server.js (code=exited, status=216/GROUP)
Main PID: 19189 (code=exited, status=216/GROUP)
linux systemd webserver daemon node.js
add a comment |Â
up vote
1
down vote
favorite
I installed the following unit file for an Nodejs Express Server:
[Unit]
Description=Server for SpeedBot
After=network.target
[Service]
ExecStart=/var/www/SpeedBot/server.js
Restart=always
User=nobody
Group=nobody
Environment=PATH=/usr/bin:/usr/local/bin
Environment=NODE_ENV=production
WorkingDirectory=/home/pi/SpeedBot/server.js
[Install]
WantedBy=multi-user.target
When I run it and do: service speedbotserver status
i get:
â speedbotserver.service - Server for SpeedBot
Loaded: loaded (/etc/systemd/system/speedbotserver.service; disabled)
Active: failed (Result: start-limit) since Thu 2017-06-29 01:31:18 UTC; 18h ago
Process: 19189 ExecStart=/var/www/SpeedBot/server.js (code=exited, status=216/GROUP)
Main PID: 19189 (code=exited, status=216/GROUP)
linux systemd webserver daemon node.js
.js
file does not execute. Let me know how thisserver.js
normally run in your system? I mean, is there any other program that runsserver.js
i. e.node server.js
something like that
â Sourav
Jun 29 '17 at 20:28
This particular instance uses the#!/usr/bin/env node
line at the start and I made the file executable usingchmod +x
. Will tryExecStart=/usr/local/bin/node /var/www/SpeedBot/server.js
â medicengonzo
Jun 30 '17 at 3:26
TriedExecStart=/usr/bin/node /var/www/SpeedBot/server.js
and same result.
â medicengonzo
Jun 30 '17 at 3:39
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I installed the following unit file for an Nodejs Express Server:
[Unit]
Description=Server for SpeedBot
After=network.target
[Service]
ExecStart=/var/www/SpeedBot/server.js
Restart=always
User=nobody
Group=nobody
Environment=PATH=/usr/bin:/usr/local/bin
Environment=NODE_ENV=production
WorkingDirectory=/home/pi/SpeedBot/server.js
[Install]
WantedBy=multi-user.target
When I run it and do: service speedbotserver status
i get:
â speedbotserver.service - Server for SpeedBot
Loaded: loaded (/etc/systemd/system/speedbotserver.service; disabled)
Active: failed (Result: start-limit) since Thu 2017-06-29 01:31:18 UTC; 18h ago
Process: 19189 ExecStart=/var/www/SpeedBot/server.js (code=exited, status=216/GROUP)
Main PID: 19189 (code=exited, status=216/GROUP)
linux systemd webserver daemon node.js
I installed the following unit file for an Nodejs Express Server:
[Unit]
Description=Server for SpeedBot
After=network.target
[Service]
ExecStart=/var/www/SpeedBot/server.js
Restart=always
User=nobody
Group=nobody
Environment=PATH=/usr/bin:/usr/local/bin
Environment=NODE_ENV=production
WorkingDirectory=/home/pi/SpeedBot/server.js
[Install]
WantedBy=multi-user.target
When I run it and do: service speedbotserver status
i get:
â speedbotserver.service - Server for SpeedBot
Loaded: loaded (/etc/systemd/system/speedbotserver.service; disabled)
Active: failed (Result: start-limit) since Thu 2017-06-29 01:31:18 UTC; 18h ago
Process: 19189 ExecStart=/var/www/SpeedBot/server.js (code=exited, status=216/GROUP)
Main PID: 19189 (code=exited, status=216/GROUP)
linux systemd webserver daemon node.js
linux systemd webserver daemon node.js
asked Jun 29 '17 at 19:52
medicengonzo
1612
1612
.js
file does not execute. Let me know how thisserver.js
normally run in your system? I mean, is there any other program that runsserver.js
i. e.node server.js
something like that
â Sourav
Jun 29 '17 at 20:28
This particular instance uses the#!/usr/bin/env node
line at the start and I made the file executable usingchmod +x
. Will tryExecStart=/usr/local/bin/node /var/www/SpeedBot/server.js
â medicengonzo
Jun 30 '17 at 3:26
TriedExecStart=/usr/bin/node /var/www/SpeedBot/server.js
and same result.
â medicengonzo
Jun 30 '17 at 3:39
add a comment |Â
.js
file does not execute. Let me know how thisserver.js
normally run in your system? I mean, is there any other program that runsserver.js
i. e.node server.js
something like that
â Sourav
Jun 29 '17 at 20:28
This particular instance uses the#!/usr/bin/env node
line at the start and I made the file executable usingchmod +x
. Will tryExecStart=/usr/local/bin/node /var/www/SpeedBot/server.js
â medicengonzo
Jun 30 '17 at 3:26
TriedExecStart=/usr/bin/node /var/www/SpeedBot/server.js
and same result.
â medicengonzo
Jun 30 '17 at 3:39
.js
file does not execute. Let me know how this server.js
normally run in your system? I mean, is there any other program that runs server.js
i. e. node server.js
something like thatâ Sourav
Jun 29 '17 at 20:28
.js
file does not execute. Let me know how this server.js
normally run in your system? I mean, is there any other program that runs server.js
i. e. node server.js
something like thatâ Sourav
Jun 29 '17 at 20:28
This particular instance uses the
#!/usr/bin/env node
line at the start and I made the file executable using chmod +x
. Will try ExecStart=/usr/local/bin/node /var/www/SpeedBot/server.js
â medicengonzo
Jun 30 '17 at 3:26
This particular instance uses the
#!/usr/bin/env node
line at the start and I made the file executable using chmod +x
. Will try ExecStart=/usr/local/bin/node /var/www/SpeedBot/server.js
â medicengonzo
Jun 30 '17 at 3:26
Tried
ExecStart=/usr/bin/node /var/www/SpeedBot/server.js
and same result.â medicengonzo
Jun 30 '17 at 3:39
Tried
ExecStart=/usr/bin/node /var/www/SpeedBot/server.js
and same result.â medicengonzo
Jun 30 '17 at 3:39
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
0
down vote
You can try with the below unit configuration:
[Unit]
Description=Server for SpeedBot
After=network.target
[Service]
ExecStart=/bin/sh -c "exec /usr/bin/node /var/www/SpeedBot/server.js"
Restart=always
User=nobody
Group=nobody
Environment=PATH=/usr/bin:/usr/local/bin
Environment=NODE_ENV=production
WorkingDirectory=/var/www/SpeedBot
[Install]
WantedBy=multi-user.target
I tried it and it gives me the same error message.
â medicengonzo
Jun 30 '17 at 16:50
add a comment |Â
up vote
0
down vote
Group=nobody
When the error message tells you that there's a problem setting the group that the service runs as, which is what that status code is doing, really your first thought should be "Have I configured a valid group for this service?"
Do not run services as nobody
, by the way. This is a bad idea that the world learned not to do in the 1990s. nobody
has a specific usage relating to NFS that means that it is the (apparent) owner of (possibly many) things in the filesystem. It is not suitable for running dæmon processes, whose user accounts should generally only own a limited amount of things in the filesystem that are directly related to their operation.
Run your service as a dedicated user account that is specific to the service.
Further reading
- https://askubuntu.com/a/674397/43344
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
You can try with the below unit configuration:
[Unit]
Description=Server for SpeedBot
After=network.target
[Service]
ExecStart=/bin/sh -c "exec /usr/bin/node /var/www/SpeedBot/server.js"
Restart=always
User=nobody
Group=nobody
Environment=PATH=/usr/bin:/usr/local/bin
Environment=NODE_ENV=production
WorkingDirectory=/var/www/SpeedBot
[Install]
WantedBy=multi-user.target
I tried it and it gives me the same error message.
â medicengonzo
Jun 30 '17 at 16:50
add a comment |Â
up vote
0
down vote
You can try with the below unit configuration:
[Unit]
Description=Server for SpeedBot
After=network.target
[Service]
ExecStart=/bin/sh -c "exec /usr/bin/node /var/www/SpeedBot/server.js"
Restart=always
User=nobody
Group=nobody
Environment=PATH=/usr/bin:/usr/local/bin
Environment=NODE_ENV=production
WorkingDirectory=/var/www/SpeedBot
[Install]
WantedBy=multi-user.target
I tried it and it gives me the same error message.
â medicengonzo
Jun 30 '17 at 16:50
add a comment |Â
up vote
0
down vote
up vote
0
down vote
You can try with the below unit configuration:
[Unit]
Description=Server for SpeedBot
After=network.target
[Service]
ExecStart=/bin/sh -c "exec /usr/bin/node /var/www/SpeedBot/server.js"
Restart=always
User=nobody
Group=nobody
Environment=PATH=/usr/bin:/usr/local/bin
Environment=NODE_ENV=production
WorkingDirectory=/var/www/SpeedBot
[Install]
WantedBy=multi-user.target
You can try with the below unit configuration:
[Unit]
Description=Server for SpeedBot
After=network.target
[Service]
ExecStart=/bin/sh -c "exec /usr/bin/node /var/www/SpeedBot/server.js"
Restart=always
User=nobody
Group=nobody
Environment=PATH=/usr/bin:/usr/local/bin
Environment=NODE_ENV=production
WorkingDirectory=/var/www/SpeedBot
[Install]
WantedBy=multi-user.target
edited Jun 30 '17 at 6:39
answered Jun 30 '17 at 6:34
Sourav
4321511
4321511
I tried it and it gives me the same error message.
â medicengonzo
Jun 30 '17 at 16:50
add a comment |Â
I tried it and it gives me the same error message.
â medicengonzo
Jun 30 '17 at 16:50
I tried it and it gives me the same error message.
â medicengonzo
Jun 30 '17 at 16:50
I tried it and it gives me the same error message.
â medicengonzo
Jun 30 '17 at 16:50
add a comment |Â
up vote
0
down vote
Group=nobody
When the error message tells you that there's a problem setting the group that the service runs as, which is what that status code is doing, really your first thought should be "Have I configured a valid group for this service?"
Do not run services as nobody
, by the way. This is a bad idea that the world learned not to do in the 1990s. nobody
has a specific usage relating to NFS that means that it is the (apparent) owner of (possibly many) things in the filesystem. It is not suitable for running dæmon processes, whose user accounts should generally only own a limited amount of things in the filesystem that are directly related to their operation.
Run your service as a dedicated user account that is specific to the service.
Further reading
- https://askubuntu.com/a/674397/43344
add a comment |Â
up vote
0
down vote
Group=nobody
When the error message tells you that there's a problem setting the group that the service runs as, which is what that status code is doing, really your first thought should be "Have I configured a valid group for this service?"
Do not run services as nobody
, by the way. This is a bad idea that the world learned not to do in the 1990s. nobody
has a specific usage relating to NFS that means that it is the (apparent) owner of (possibly many) things in the filesystem. It is not suitable for running dæmon processes, whose user accounts should generally only own a limited amount of things in the filesystem that are directly related to their operation.
Run your service as a dedicated user account that is specific to the service.
Further reading
- https://askubuntu.com/a/674397/43344
add a comment |Â
up vote
0
down vote
up vote
0
down vote
Group=nobody
When the error message tells you that there's a problem setting the group that the service runs as, which is what that status code is doing, really your first thought should be "Have I configured a valid group for this service?"
Do not run services as nobody
, by the way. This is a bad idea that the world learned not to do in the 1990s. nobody
has a specific usage relating to NFS that means that it is the (apparent) owner of (possibly many) things in the filesystem. It is not suitable for running dæmon processes, whose user accounts should generally only own a limited amount of things in the filesystem that are directly related to their operation.
Run your service as a dedicated user account that is specific to the service.
Further reading
- https://askubuntu.com/a/674397/43344
Group=nobody
When the error message tells you that there's a problem setting the group that the service runs as, which is what that status code is doing, really your first thought should be "Have I configured a valid group for this service?"
Do not run services as nobody
, by the way. This is a bad idea that the world learned not to do in the 1990s. nobody
has a specific usage relating to NFS that means that it is the (apparent) owner of (possibly many) things in the filesystem. It is not suitable for running dæmon processes, whose user accounts should generally only own a limited amount of things in the filesystem that are directly related to their operation.
Run your service as a dedicated user account that is specific to the service.
Further reading
- https://askubuntu.com/a/674397/43344
answered Jul 3 '17 at 17:35
JdeBP
29.7k461136
29.7k461136
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f374273%2fsystemd-my-custom-service-exits-with-status-code-216-group%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
.js
file does not execute. Let me know how thisserver.js
normally run in your system? I mean, is there any other program that runsserver.js
i. e.node server.js
something like thatâ Sourav
Jun 29 '17 at 20:28
This particular instance uses the
#!/usr/bin/env node
line at the start and I made the file executable usingchmod +x
. Will tryExecStart=/usr/local/bin/node /var/www/SpeedBot/server.js
â medicengonzo
Jun 30 '17 at 3:26
Tried
ExecStart=/usr/bin/node /var/www/SpeedBot/server.js
and same result.â medicengonzo
Jun 30 '17 at 3:39