Score:0

Systemd service sits in continuous reboot on start but works fine on manual start

us flag

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.

ma flag
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.
ma flag
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?
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.