I am trying to provision spring-boot applications (developed by someone else - I'm not a java programmer) on Ubuntu 18.04. The developer had previously added symlinks in /etc/init.d
to enable the service - it starts fine at boot. However if the service subsequently fails, systemd still reports that it is running:
root@example.com:/var/log/apps# systemctl status crm-service
● crm-service.service - LSB: crm-service
Loaded: loaded (/etc/init.d/crm-service; generated)
Active: active (exited) since Wed 2020-04-15 12:27:15 BST; 3h 56min ago
Docs: man:systemd-sysv-generator(8)
Process: 8656 ExecStop=/etc/init.d/crm-service stop (code=exited, status=0/SUCCESS)
Process: 8703 ExecStart=/etc/init.d/crm-service start (code=exited, status=0/SUCCESS)
Apr 15 12:27:15 example.com systemd[1]: Starting LSB: crm-service...
Apr 15 12:27:15 example.com crm-service[8703]: /var/services/crm-service.conf: line 1: -Xms96M: command not found
Apr 15 12:27:15 example.com crm-service[8703]: Started [8747]
Apr 15 12:27:15 example.com systemd[1]: Started LSB: crm-service.
While I see the same systemd unit file for springboot posted all over the internet, I see nothing there which is likely to resolve this issue.
- How do I get systemd to see the true status of the service? (it will open a listening socket, but on a random high port)
- Is there a way to get systemd to try gently to restart a service it knows has failed?