0

We have an application that at one point worked on one of our ubuntu VMs. Recently, it has shut down. I noticed that the application, when i execute systemctl start application, it starts normally, begins the application boot stage properly, then abruptly stops, then restarts, then stops, and so forth in the same cycle.

What's interesting is, if i disable the service, systemctl disable application.service, then manually sudo into the application user, and run the application manually, it works fine.

I cannot determine for the life of me why in systemd it won't work, but using the exact same arguments on a manual command it works just fine.

Here's my service file:

[Unit]
Description=Application
After=network.target

[Service]
ExecStart=/home/application/application/application start
ExecStop=/home/application/application/application stop
Type=simple
PIDFile=/home/application/application/tmp/application.pid
User=application
WorkingDirectory=/home/application/application
#TimeoutStartSec=3600
TimeoutStartSec=500
#Restart=always
#RestartSec=5

[Install]
WantedBy=default.target

There aren't even any relevant logs, it just says on syslog

Starting Application...
Stopping Application...

At this point, i think its something beyond the application service that's causing a reboot, maybe an issue with systemd internally.

I really don't know what to do at this point for diagnosis and root cause

Any help of what to investigate or a possible solution would be great.

  • Note that `network.target` (your `After=`) only signifies that “network functionality is available” in some vague sense, not necessarily that the system is “online”. You might want `network-online.target` instead, though that can require enabling some additional services; see https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget. – Lucas Werkmeister Dec 19 '21 at 13:00
  • What happens if you disable the service, but then start it manually with `systemctl start application.service` instead of sudoing into the user and directly running the command? – Lucas Werkmeister Dec 19 '21 at 13:00

0 Answers0