Node service Active (running) but unavailable

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












0














I have just managed to get my service status active via the help of yourselves, however it still appears that the node service is not actually running.



So put simply, I know my node app is running, but for all intensive purposes, it isn't acting as it should.



Service status



root@server:/etc/systemd/system# systemctl status parsoid.service 
● parsoid.service - MediaWiki Parsoid Server
Loaded: loaded (/etc/systemd/system/parsoid.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2018-12-15 21:18:06 GMT; 29s ago
Main PID: 18799 (node)
Tasks: 9
Memory: 34.8M
CPU: 1.449s
CGroup: /system.slice/parsoid.service
└─18799 /usr/bin/node /var/www/gwart/mediawiki/extensions/VisualEditor/parsoid/bin/server.js

Dec 15 21:18:06 server.live-servers.net systemd[1]: Started MediaWiki Parsoid Server.
Dec 15 21:18:07 server.live-servers.net node[18799]: "name":"parsoid","hostname":"server.live-servers.net","pid":18799,"level":30,"levelPath":"info/service-runner","msg":"master(18799) initializing 2 workers","time":"2018-12-15T21:18:07.189Z","v":0
Dec 15 21:18:07 server.live-servers.net node[18799]: "name":"parsoid","hostname":"server.live-servers.net","pid":18811,"level":60,"moduleName":"lib/index.js","levelPath":"fatal/service-runner/worker","msg":"Unexpected token ...","time":"2018-12-15T21:18:07.898Z","v":0
Dec 15 21:18:08 server.live-servers.net node[18799]: {"name":"parsoid","hostname":"server.live-servers.net","pid":18799,"level":40,"message":"first worker died during startup, continue startup","worker_pid":18811,"exit_code":1,"startup_attempt":1,"levelPath":"warn/service-runner/master","msg
Dec 15 21:18:09 server.live-servers.net systemd[1]: Started MediaWiki Parsoid Server.
lines 1-15/15 (END)


Looking for the port 8000



root@server:/etc/systemd/system# netstat -tulpn | grep 8000
root@server:/etc/systemd/system#


However I can see that the node application is running



root@server:/etc/systemd/system# ps ax | grep node
18799 ? Ssl 0:00 /usr/bin/node /var/www/gwart/mediawiki/extensions/VisualEditor/parsoid/bin/server.js
20820 pts/1 S+ 0:00 grep --color=auto node


Service file



[Unit]
Description=MediaWiki Parsoid Server

[Service]
ExecStart=/usr/bin/node /var/www/gwart/mediawiki/extensions/VisualEditor/parsoid/bin/server.js
Restart=always
User=root
Group=root
Environment=PATH=/usr/bin/node:/usr/local/bin
StandardOutput=syslog
StandardError=syslog
WorkingDirectory=/var/www/gwart/mediawiki/extensions/VisualEditor/parsoid

[Install]
WantedBy=multi-user.target


I believe it is related to this question:
Starting node application with node works but not when starting it with /usr/bin/node










share|improve this question























  • So it does not die when you run it with node? Then please post the output of whereis node as well as node -v and /usr/bin/node -v.
    – rudib
    Dec 15 at 22:09










  • Of course!! v4.2.6 for /usr/bin/node but other 6 for /root/.nvm/versions/node/v6.7.0/bin/node Let me test this out now :)
    – Jamie Hutber
    Dec 15 at 22:21










  • Yep, in that case ExecStart=/root/.nvm/versions/node/v6.7.0/bin/node [...] should do the trick. :)
    – rudib
    Dec 15 at 22:23










  • Ye, although I should really map my default nvm version to /usr/bin/node incase I ever upgrade it :D Amazing, may as well add that as the answer and I'll accept bud
    – Jamie Hutber
    Dec 15 at 22:23






  • 1




    Yes, wanted to add that. You should use a symlink as that location does not seem too permanent. :)
    – rudib
    Dec 15 at 22:24















0














I have just managed to get my service status active via the help of yourselves, however it still appears that the node service is not actually running.



So put simply, I know my node app is running, but for all intensive purposes, it isn't acting as it should.



Service status



root@server:/etc/systemd/system# systemctl status parsoid.service 
● parsoid.service - MediaWiki Parsoid Server
Loaded: loaded (/etc/systemd/system/parsoid.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2018-12-15 21:18:06 GMT; 29s ago
Main PID: 18799 (node)
Tasks: 9
Memory: 34.8M
CPU: 1.449s
CGroup: /system.slice/parsoid.service
└─18799 /usr/bin/node /var/www/gwart/mediawiki/extensions/VisualEditor/parsoid/bin/server.js

Dec 15 21:18:06 server.live-servers.net systemd[1]: Started MediaWiki Parsoid Server.
Dec 15 21:18:07 server.live-servers.net node[18799]: "name":"parsoid","hostname":"server.live-servers.net","pid":18799,"level":30,"levelPath":"info/service-runner","msg":"master(18799) initializing 2 workers","time":"2018-12-15T21:18:07.189Z","v":0
Dec 15 21:18:07 server.live-servers.net node[18799]: "name":"parsoid","hostname":"server.live-servers.net","pid":18811,"level":60,"moduleName":"lib/index.js","levelPath":"fatal/service-runner/worker","msg":"Unexpected token ...","time":"2018-12-15T21:18:07.898Z","v":0
Dec 15 21:18:08 server.live-servers.net node[18799]: {"name":"parsoid","hostname":"server.live-servers.net","pid":18799,"level":40,"message":"first worker died during startup, continue startup","worker_pid":18811,"exit_code":1,"startup_attempt":1,"levelPath":"warn/service-runner/master","msg
Dec 15 21:18:09 server.live-servers.net systemd[1]: Started MediaWiki Parsoid Server.
lines 1-15/15 (END)


Looking for the port 8000



root@server:/etc/systemd/system# netstat -tulpn | grep 8000
root@server:/etc/systemd/system#


However I can see that the node application is running



root@server:/etc/systemd/system# ps ax | grep node
18799 ? Ssl 0:00 /usr/bin/node /var/www/gwart/mediawiki/extensions/VisualEditor/parsoid/bin/server.js
20820 pts/1 S+ 0:00 grep --color=auto node


Service file



[Unit]
Description=MediaWiki Parsoid Server

[Service]
ExecStart=/usr/bin/node /var/www/gwart/mediawiki/extensions/VisualEditor/parsoid/bin/server.js
Restart=always
User=root
Group=root
Environment=PATH=/usr/bin/node:/usr/local/bin
StandardOutput=syslog
StandardError=syslog
WorkingDirectory=/var/www/gwart/mediawiki/extensions/VisualEditor/parsoid

[Install]
WantedBy=multi-user.target


I believe it is related to this question:
Starting node application with node works but not when starting it with /usr/bin/node










share|improve this question























  • So it does not die when you run it with node? Then please post the output of whereis node as well as node -v and /usr/bin/node -v.
    – rudib
    Dec 15 at 22:09










  • Of course!! v4.2.6 for /usr/bin/node but other 6 for /root/.nvm/versions/node/v6.7.0/bin/node Let me test this out now :)
    – Jamie Hutber
    Dec 15 at 22:21










  • Yep, in that case ExecStart=/root/.nvm/versions/node/v6.7.0/bin/node [...] should do the trick. :)
    – rudib
    Dec 15 at 22:23










  • Ye, although I should really map my default nvm version to /usr/bin/node incase I ever upgrade it :D Amazing, may as well add that as the answer and I'll accept bud
    – Jamie Hutber
    Dec 15 at 22:23






  • 1




    Yes, wanted to add that. You should use a symlink as that location does not seem too permanent. :)
    – rudib
    Dec 15 at 22:24













0












0








0







I have just managed to get my service status active via the help of yourselves, however it still appears that the node service is not actually running.



So put simply, I know my node app is running, but for all intensive purposes, it isn't acting as it should.



Service status



root@server:/etc/systemd/system# systemctl status parsoid.service 
● parsoid.service - MediaWiki Parsoid Server
Loaded: loaded (/etc/systemd/system/parsoid.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2018-12-15 21:18:06 GMT; 29s ago
Main PID: 18799 (node)
Tasks: 9
Memory: 34.8M
CPU: 1.449s
CGroup: /system.slice/parsoid.service
└─18799 /usr/bin/node /var/www/gwart/mediawiki/extensions/VisualEditor/parsoid/bin/server.js

Dec 15 21:18:06 server.live-servers.net systemd[1]: Started MediaWiki Parsoid Server.
Dec 15 21:18:07 server.live-servers.net node[18799]: "name":"parsoid","hostname":"server.live-servers.net","pid":18799,"level":30,"levelPath":"info/service-runner","msg":"master(18799) initializing 2 workers","time":"2018-12-15T21:18:07.189Z","v":0
Dec 15 21:18:07 server.live-servers.net node[18799]: "name":"parsoid","hostname":"server.live-servers.net","pid":18811,"level":60,"moduleName":"lib/index.js","levelPath":"fatal/service-runner/worker","msg":"Unexpected token ...","time":"2018-12-15T21:18:07.898Z","v":0
Dec 15 21:18:08 server.live-servers.net node[18799]: {"name":"parsoid","hostname":"server.live-servers.net","pid":18799,"level":40,"message":"first worker died during startup, continue startup","worker_pid":18811,"exit_code":1,"startup_attempt":1,"levelPath":"warn/service-runner/master","msg
Dec 15 21:18:09 server.live-servers.net systemd[1]: Started MediaWiki Parsoid Server.
lines 1-15/15 (END)


Looking for the port 8000



root@server:/etc/systemd/system# netstat -tulpn | grep 8000
root@server:/etc/systemd/system#


However I can see that the node application is running



root@server:/etc/systemd/system# ps ax | grep node
18799 ? Ssl 0:00 /usr/bin/node /var/www/gwart/mediawiki/extensions/VisualEditor/parsoid/bin/server.js
20820 pts/1 S+ 0:00 grep --color=auto node


Service file



[Unit]
Description=MediaWiki Parsoid Server

[Service]
ExecStart=/usr/bin/node /var/www/gwart/mediawiki/extensions/VisualEditor/parsoid/bin/server.js
Restart=always
User=root
Group=root
Environment=PATH=/usr/bin/node:/usr/local/bin
StandardOutput=syslog
StandardError=syslog
WorkingDirectory=/var/www/gwart/mediawiki/extensions/VisualEditor/parsoid

[Install]
WantedBy=multi-user.target


I believe it is related to this question:
Starting node application with node works but not when starting it with /usr/bin/node










share|improve this question















I have just managed to get my service status active via the help of yourselves, however it still appears that the node service is not actually running.



So put simply, I know my node app is running, but for all intensive purposes, it isn't acting as it should.



Service status



root@server:/etc/systemd/system# systemctl status parsoid.service 
● parsoid.service - MediaWiki Parsoid Server
Loaded: loaded (/etc/systemd/system/parsoid.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2018-12-15 21:18:06 GMT; 29s ago
Main PID: 18799 (node)
Tasks: 9
Memory: 34.8M
CPU: 1.449s
CGroup: /system.slice/parsoid.service
└─18799 /usr/bin/node /var/www/gwart/mediawiki/extensions/VisualEditor/parsoid/bin/server.js

Dec 15 21:18:06 server.live-servers.net systemd[1]: Started MediaWiki Parsoid Server.
Dec 15 21:18:07 server.live-servers.net node[18799]: "name":"parsoid","hostname":"server.live-servers.net","pid":18799,"level":30,"levelPath":"info/service-runner","msg":"master(18799) initializing 2 workers","time":"2018-12-15T21:18:07.189Z","v":0
Dec 15 21:18:07 server.live-servers.net node[18799]: "name":"parsoid","hostname":"server.live-servers.net","pid":18811,"level":60,"moduleName":"lib/index.js","levelPath":"fatal/service-runner/worker","msg":"Unexpected token ...","time":"2018-12-15T21:18:07.898Z","v":0
Dec 15 21:18:08 server.live-servers.net node[18799]: {"name":"parsoid","hostname":"server.live-servers.net","pid":18799,"level":40,"message":"first worker died during startup, continue startup","worker_pid":18811,"exit_code":1,"startup_attempt":1,"levelPath":"warn/service-runner/master","msg
Dec 15 21:18:09 server.live-servers.net systemd[1]: Started MediaWiki Parsoid Server.
lines 1-15/15 (END)


Looking for the port 8000



root@server:/etc/systemd/system# netstat -tulpn | grep 8000
root@server:/etc/systemd/system#


However I can see that the node application is running



root@server:/etc/systemd/system# ps ax | grep node
18799 ? Ssl 0:00 /usr/bin/node /var/www/gwart/mediawiki/extensions/VisualEditor/parsoid/bin/server.js
20820 pts/1 S+ 0:00 grep --color=auto node


Service file



[Unit]
Description=MediaWiki Parsoid Server

[Service]
ExecStart=/usr/bin/node /var/www/gwart/mediawiki/extensions/VisualEditor/parsoid/bin/server.js
Restart=always
User=root
Group=root
Environment=PATH=/usr/bin/node:/usr/local/bin
StandardOutput=syslog
StandardError=syslog
WorkingDirectory=/var/www/gwart/mediawiki/extensions/VisualEditor/parsoid

[Install]
WantedBy=multi-user.target


I believe it is related to this question:
Starting node application with node works but not when starting it with /usr/bin/node







services node.js






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 15 at 21:52

























asked Dec 15 at 21:30









Jamie Hutber

1021213




1021213











  • So it does not die when you run it with node? Then please post the output of whereis node as well as node -v and /usr/bin/node -v.
    – rudib
    Dec 15 at 22:09










  • Of course!! v4.2.6 for /usr/bin/node but other 6 for /root/.nvm/versions/node/v6.7.0/bin/node Let me test this out now :)
    – Jamie Hutber
    Dec 15 at 22:21










  • Yep, in that case ExecStart=/root/.nvm/versions/node/v6.7.0/bin/node [...] should do the trick. :)
    – rudib
    Dec 15 at 22:23










  • Ye, although I should really map my default nvm version to /usr/bin/node incase I ever upgrade it :D Amazing, may as well add that as the answer and I'll accept bud
    – Jamie Hutber
    Dec 15 at 22:23






  • 1




    Yes, wanted to add that. You should use a symlink as that location does not seem too permanent. :)
    – rudib
    Dec 15 at 22:24
















  • So it does not die when you run it with node? Then please post the output of whereis node as well as node -v and /usr/bin/node -v.
    – rudib
    Dec 15 at 22:09










  • Of course!! v4.2.6 for /usr/bin/node but other 6 for /root/.nvm/versions/node/v6.7.0/bin/node Let me test this out now :)
    – Jamie Hutber
    Dec 15 at 22:21










  • Yep, in that case ExecStart=/root/.nvm/versions/node/v6.7.0/bin/node [...] should do the trick. :)
    – rudib
    Dec 15 at 22:23










  • Ye, although I should really map my default nvm version to /usr/bin/node incase I ever upgrade it :D Amazing, may as well add that as the answer and I'll accept bud
    – Jamie Hutber
    Dec 15 at 22:23






  • 1




    Yes, wanted to add that. You should use a symlink as that location does not seem too permanent. :)
    – rudib
    Dec 15 at 22:24















So it does not die when you run it with node? Then please post the output of whereis node as well as node -v and /usr/bin/node -v.
– rudib
Dec 15 at 22:09




So it does not die when you run it with node? Then please post the output of whereis node as well as node -v and /usr/bin/node -v.
– rudib
Dec 15 at 22:09












Of course!! v4.2.6 for /usr/bin/node but other 6 for /root/.nvm/versions/node/v6.7.0/bin/node Let me test this out now :)
– Jamie Hutber
Dec 15 at 22:21




Of course!! v4.2.6 for /usr/bin/node but other 6 for /root/.nvm/versions/node/v6.7.0/bin/node Let me test this out now :)
– Jamie Hutber
Dec 15 at 22:21












Yep, in that case ExecStart=/root/.nvm/versions/node/v6.7.0/bin/node [...] should do the trick. :)
– rudib
Dec 15 at 22:23




Yep, in that case ExecStart=/root/.nvm/versions/node/v6.7.0/bin/node [...] should do the trick. :)
– rudib
Dec 15 at 22:23












Ye, although I should really map my default nvm version to /usr/bin/node incase I ever upgrade it :D Amazing, may as well add that as the answer and I'll accept bud
– Jamie Hutber
Dec 15 at 22:23




Ye, although I should really map my default nvm version to /usr/bin/node incase I ever upgrade it :D Amazing, may as well add that as the answer and I'll accept bud
– Jamie Hutber
Dec 15 at 22:23




1




1




Yes, wanted to add that. You should use a symlink as that location does not seem too permanent. :)
– rudib
Dec 15 at 22:24




Yes, wanted to add that. You should use a symlink as that location does not seem too permanent. :)
– rudib
Dec 15 at 22:24










1 Answer
1






active

oldest

votes


















0














/usr/bin/node seems to be the node executeable installed by the package manager and too old(v4.2.6) for parsoid.



The command node worked here because that command was linked to /root/.nvm/versions/node/v6.7.0/bin/node installed by nvm running v6.7.0.



To fix this, create a symlink to your current nvm version (in order to able to easily adjust when you update) and use that path in your .service file.



Note:
I wouldn't recommand deleting the symlink or file /usr/bin/node in order to place a symlink with that name there, as that might interfere withe the "stock" node installation.






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',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    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%2f489218%2fnode-service-active-running-but-unavailable%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    /usr/bin/node seems to be the node executeable installed by the package manager and too old(v4.2.6) for parsoid.



    The command node worked here because that command was linked to /root/.nvm/versions/node/v6.7.0/bin/node installed by nvm running v6.7.0.



    To fix this, create a symlink to your current nvm version (in order to able to easily adjust when you update) and use that path in your .service file.



    Note:
    I wouldn't recommand deleting the symlink or file /usr/bin/node in order to place a symlink with that name there, as that might interfere withe the "stock" node installation.






    share|improve this answer

























      0














      /usr/bin/node seems to be the node executeable installed by the package manager and too old(v4.2.6) for parsoid.



      The command node worked here because that command was linked to /root/.nvm/versions/node/v6.7.0/bin/node installed by nvm running v6.7.0.



      To fix this, create a symlink to your current nvm version (in order to able to easily adjust when you update) and use that path in your .service file.



      Note:
      I wouldn't recommand deleting the symlink or file /usr/bin/node in order to place a symlink with that name there, as that might interfere withe the "stock" node installation.






      share|improve this answer























        0












        0








        0






        /usr/bin/node seems to be the node executeable installed by the package manager and too old(v4.2.6) for parsoid.



        The command node worked here because that command was linked to /root/.nvm/versions/node/v6.7.0/bin/node installed by nvm running v6.7.0.



        To fix this, create a symlink to your current nvm version (in order to able to easily adjust when you update) and use that path in your .service file.



        Note:
        I wouldn't recommand deleting the symlink or file /usr/bin/node in order to place a symlink with that name there, as that might interfere withe the "stock" node installation.






        share|improve this answer












        /usr/bin/node seems to be the node executeable installed by the package manager and too old(v4.2.6) for parsoid.



        The command node worked here because that command was linked to /root/.nvm/versions/node/v6.7.0/bin/node installed by nvm running v6.7.0.



        To fix this, create a symlink to your current nvm version (in order to able to easily adjust when you update) and use that path in your .service file.



        Note:
        I wouldn't recommand deleting the symlink or file /usr/bin/node in order to place a symlink with that name there, as that might interfere withe the "stock" node installation.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Dec 15 at 22:32









        rudib

        622417




        622417



























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Unix & Linux Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f489218%2fnode-service-active-running-but-unavailable%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown






            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?