Ubuntu 19.04 Hi, I have a bug with systemd I have a launch-server.service file that has
[Unit]
Description=LaunchServer
After=network.target
[Service]
WorkingDirectory=/home/aborigen/Launcher/LaunchServer/build/libs
Type=notify
User=aborigenserver
Group=sudo
NotifyAccess=all
Restart=always
ExecStart=/usr/bin/screen -DmS launchserver /usr/java/jdk1.8.0_221/bin/java -Xmx128M -javaagent:LaunchServer.jar -jar LaunchServer.jar
ExecStop=/usr/bin/screen -p 0 -S launchserver -X eval 'stuff "stop"\015'
[Install]
WantedBy=multi-user.target
The algorithm of my actions is as follows:
- aborigen@aborigenserver:/etc/systemd/system$
sudo nano launch-server.service
thereby creating this file and pasting the parameters above
- aborigen@aborigenserver:/etc/systemd/system$
sudo systemctl daemon-reload
- aborigen@aborigenserver:/etc/systemd/system$
sudo systemctl status launch-server.service
and in response:
● launch-server.service - LaunchServer Lost Paradise
Loaded: loaded (/etc/systemd/system/launch-server.service; disabled; vendor preset: enabled)
Active: inactive (dead)
- aborigen@aborigenserver:/etc/systemd/system$
sudo systemctl enable launch-server.service
Created symlink /etc/systemd/system/multi-user.target.wants/launch-server.service → /etc/systemd/system/launc h-server.service.
- aborigen@aborigenserver:/etc/systemd/system$
sudo systemctl status launch-server.service
● launch-server.service - LaunchServer Lost Paradise
Loaded: loaded (/etc/systemd/system/launch-server.service; enabled; vendor preset: enabled) Active: inactive (dead)
- aborigen@aborigenserver:/etc/systemd/system$
sudo systemctl start launch-server.service
Job for launch-server.service failed because the service did not take the steps required by its unit configuration. See "systemctl status launch-server.service" and "journalctl -xe" for details.
- aborigen@aborigenserver:/etc/systemd/system$
sudo systemctl status launch-server.service
aborigen@aborigenserver:/etc/systemd/system$ sudo systemctl status launch-server.service
● launch-server.service - LaunchServer Lost Paradise
Loaded: loaded (/etc/systemd/system/launch-server.service; enabled; vendor preset: enabled)
Active: failed (Result: protocol) since Mon 2019-07-29 12:45:50 EEST; 2h 49min ago
Main PID: 2496 (code=exited, status=0/SUCCESS)
июл 29 12:45:50 aborigenserver systemd[1]: launch-server.service: Service RestartSec=100ms expired, scheduling restart.
июл 29 12:45:50 aborigenserver systemd[1]: launch-server.service: Scheduled restart job, restart counter is at 5.
июл 29 12:45:50 aborigenserver systemd[1]: Stopped LaunchServer Lost Paradise.
июл 29 12:45:50 aborigenserver systemd[1]: launch-server.service: Start request repeated too quickly.
июл 29 12:45:50 aborigenserver systemd[1]: launch-server.service: Failed with result 'protocol'.
июл 29 12:45:50 aborigenserver systemd[1]: Failed to start LaunchServer Lost Paradise.
aborigen@aborigenserver:/etc/systemd/system$ chmod +x /home/aborigen/Server/start.sh
aborigen@aborigenserver:/etc/systemd/system$ sudo systemctl start start-server.service
aborigen@aborigenserver:/etc/systemd/system$ sudo systemctl reload start-server.service
Failed to reload start-server.service: Job type reload is not applicable for unit start-server.service.
- aborigen@aborigenserver:/etc/systemd/system$
journalctl -xe
eventually:
-- Назначен автоматический перезапуск юнита launch-server.service, так как для него был задан
-- параметр Restart=.
июл 29 12:45:50 aborigenserver systemd[1]: Stopped LaunchServer Lost Paradise.
-- Subject: Завершена остановка юнита launch-server.service.
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Процесс остановки юнита launch-server.service был завершен.
июл 29 12:45:50 aborigenserver systemd[1]: launch-server.service: Start request repeated too quickly.
июл 29 12:45:50 aborigenserver systemd[1]: launch-server.service: Failed with result 'protocol'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The unit launch-server.service has entered the 'failed' state with result 'protocol'.
июл 29 12:45:50 aborigenserver systemd[1]: Failed to start LaunchServer Lost Paradise.
-- Subject: Ошибка юнита launch-server.service
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Произошел сбой юнита launch-server.service.
--
-- Результат: failed.
I also have start-server.service
[Unit]
Description=Lost Paradise Server
After=network.target
After=launch-server.service
[Service]
WorkingDirectory=/home/aborigen/Server/
User=aborigenserver
Group=sudo
Restart=always
ExecStart=/home/aborigen/Server/start.sh
ExecStop=/usr/bin/screen -p 0 -S ServerAstrey -X eval 'stuff "stop"\015'
[Install]
WantedBy=multi-user.target
which accordingly:
aborigen@aborigenserver:/etc/systemd/system$ sudo systemctl status start-server.service
● start-server.service - Lost Paradise Server
Loaded: loaded (/etc/systemd/system/start-server.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2019-07-29 15:39:26 EEST; 20min ago
Process: 3427 ExecStart=/home/aborigen/Server/start.sh (code=exited, status=1/FAILURE)
Main PID: 3427 (code=exited, status=1/FAILURE)
июл 29 15:39:26 aborigenserver systemd[1]: start-server.service: Service RestartSec=100ms expired, scheduling restart.
июл 29 15:39:26 aborigenserver systemd[1]: start-server.service: Scheduled restart job, restart counter is at 5.
июл 29 15:39:26 aborigenserver systemd[1]: Stopped Lost Paradise Server.
июл 29 15:39:26 aborigenserver systemd[1]: start-server.service: Start request repeated too quickly.
июл 29 15:39:26 aborigenserver systemd[1]: start-server.service: Failed with result 'exit-code'.
июл 29 15:39:26 aborigenserver systemd[1]: Failed to start Lost Paradise Server.
Already the second day I pull the hair out of my head. I just need to run them on startup. Help please :)