
In which case, delete it sudo rm /lib/systemd/system/rvice It should return: /lib/systemd/system/rvice: symbolic link to /dev/null You can fix it like this:įirst check that the unit file is a symlink to /dev/null file /lib/systemd/system/rvice In this case, there is no real unit file. If you mask a service, then that creates a new symlink to /dev/null in /etc/systemd/system where systemd looks for unit files to load at boot. It seems the unmask command fails when there is no existing unit file in the system other than the symlink to /dev/null. Output of cat rvice - ĮxecStart=/usr/bin/java -classpath home/ubuntu/private-api/private-api-0.0.1-SNAPSHOT.jar =stage > home/ubuntu/private-api/private-api.The commands you are using are both correct. LoadError=.InvalidArgs "Invalid argument" RequiresMountsFor=/home/ubuntu/private-apiįragmentPath=/etc/systemd/system/rvice StartupBlockIOWeight=18446744073709551615ĬapabilityBoundingSet=18446744073709551615Īfter=network.target basic.target systemd-journald.socket sysinit.target network-online.target

Output of systemctl show rvice- Type=oneshot Refusing.Ĭan someone help me convert my current upstart. Refusing.Īpr 05 09:17:59 ip-10-10-1-153 systemd: Executable path is not absolute, ignoring: ExecStart=/usr/bin/java -classpath /home/ubuntu/private/astro-private-0.0.1-SNAPSHOT.jar =dev > /home/ubuntu/private/private.log 2>&1Īpr 05 09:17:59 ip-10-10-1-153 systemd: rvice: Service lacks both ExecStart= and ExecStop= setting. Refusing.Īpr 05 09:17:41 ip-10-10-1-153 systemd: Executable path is not absolute, ignoring: ExecStart=/usr/bin/java -classpath /home/ubuntu/private/astro-private-0.0.1-SNAPSHOT.jar =dev > /home/ubuntu/private/private.log 2>&1Īpr 05 09:17:41 ip-10-10-1-153 systemd: rvice: Service lacks both ExecStart= and ExecStop= setting. Refusing.Īpr 05 08:51:40 ip-10-10-1-153 systemd: Executable path is not absolute, ignoring: ExecStart=/usr/bin/java -classpath /home/ubuntu/private/astro-private-0.0.1-SNAPSHOT.jar =dev > /home/ubuntu/private/private.log 2>&1Īpr 05 08:51:40 ip-10-10-1-153 systemd: rvice: Service lacks both ExecStart= and ExecStop= setting. Refusing.Īpr 05 08:49:07 ip-10-10-1-153 systemd: Executable path is not absolute, ignoring: ExecStart=/usr/bin/java -classpath /home/ubuntu/private/astro-private-0.0.1-SNAPSHOT.jar =dev > private.log 2>&1Īpr 05 08:49:07 ip-10-10-1-153 systemd: rvice: Service lacks both ExecStart= and ExecStop= setting. I reloaded my Systemd service: sudo systemctl daemon-reloadīut when I check service status, I get absolute path errors: sudo systemctl status rviceĪpr 05 08:48:56 ip-10-10-1-153 systemd: Executable path is not absolute, ignoring: ExecStart=/usr/bin/java -classpath /home/ubuntu/private/astro-private-0.0.1-SNAPSHOT.jar =dev > private.log 2>&1Īpr 05 08:48:56 ip-10-10-1-153 systemd: rvice: Service lacks both ExecStart= and ExecStop= setting. WorkingDirectory=/home/ubuntu/private-apiĮxecStart=/usr/bin/java -classpath home/ubuntu/private-api/private-api-0.0.1-SNAPSHOT.jar =stage > home/ubuntu/private-api/private-api.log 2>&1


Here's what I've achieved so far using the above refs: Īfter=network.target network-online.target After which to run the systemd service following 2 commands need to be fired: sudo systemctl daemon-reload I found that in Ubuntu 16.04 Upstart isn't used and have moved to Systemd now, and that the Systemd file needs to be in the location - /etc/systemd/system, with the file extension. I get the following error when I do: initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused The next command I need to fire is: sudo initctl reload-configurationĪfter which I am supposed to run the service, using the following command: service private-api start/stop/restart/status #If it respawns more than 10 times in 5 seconds stopĬd /home/ubuntu/private-api & exec java -jar =stage private-api-SNAPSHOT.jar > private-api.log 2>&1 We have an Upstart job in /etc/init/nf, containing: # start when server starts
