systemctl relies on the definitions provided inside the
systemd script at
If, for any reason, any of these values don’t work for your existing environment, that would explain the failure. I’m assuming then, that you have an unchanged service file, so that also suggests to me that
systemctl start mineos never worked, correct?
Description=Start MineOS minecraft front-end
ExecStart=/usr/bin/node service.js start
ExecStop=/usr/bin/node service.js stop
ExecReload=/usr/bin/node service.js restart
My best guess, therefore, is that you have multiple versions of node available.
This is because
webui.js has as the shebang (first line of code):
Which is different from what the service file is invoking:
If you have multiple versions of node,
env will instead use your $PATH and find the first available
node binary, whereas the service file always will choose /usr/bin/node.
remove the system version of node (likely the version that doesn’t work) and replace
/usr/bin/node with a symlink to your existing, working
change the service file to point directly to the node version that does work. You can find out this path by typing
which node as
root, or by
echo $PATH and walking through each dir to find the first node binary.
Here’s more information on how env works: