systemd - My custom service exits with status code 216/GROUP

The name of the pictureThe name of the pictureThe name of the pictureClash 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)









share|improve this question





















  • .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










  • Tried ExecStart=/usr/bin/node /var/www/SpeedBot/server.js and same result.
    – medicengonzo
    Jun 30 '17 at 3:39














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)









share|improve this question





















  • .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










  • Tried ExecStart=/usr/bin/node /var/www/SpeedBot/server.js and same result.
    – medicengonzo
    Jun 30 '17 at 3:39












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)









share|improve this question













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






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jun 29 '17 at 19:52









medicengonzo

1612




1612











  • .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










  • Tried ExecStart=/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










  • 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















.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










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





share|improve this answer






















  • I tried it and it gives me the same error message.
    – medicengonzo
    Jun 30 '17 at 16:50

















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





share|improve this answer




















    Your Answer







    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "106"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: false,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













     

    draft saved


    draft discarded


















    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






























    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





    share|improve this answer






















    • I tried it and it gives me the same error message.
      – medicengonzo
      Jun 30 '17 at 16:50














    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





    share|improve this answer






















    • I tried it and it gives me the same error message.
      – medicengonzo
      Jun 30 '17 at 16:50












    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





    share|improve this answer














    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






    share|improve this answer














    share|improve this answer



    share|improve this answer








    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
















    • 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












    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





    share|improve this answer
























      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





      share|improve this answer






















        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





        share|improve this answer













        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






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jul 3 '17 at 17:35









        JdeBP

        29.7k461136




        29.7k461136



























             

            draft saved


            draft discarded















































             


            draft saved


            draft discarded














            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













































































            Popular posts from this blog

            How to check contact read email or not when send email to Individual?

            Displaying single band from multi-band raster using QGIS

            How many registers does an x86_64 CPU actually have?