Article 54813 Debugging systemctl start hang

Debugging systemctl start hang

by
MALDATA
from LinuxQuestions.org on (#54813)
I have an application that needs to run as a service. So, I threw together a quick service file (myapp.service) that looks like this:

Code:[Unit]
Description=My application
After=multi-user.target

[Service]
ExecStart=/usr/local/bin/MyApp
Type=simple
User=myuser
WorkingDirectory=/home/myuser
Restart=always
RestartSec=5
TimeoutStartSec=30

[Install]
WantedBy=multi-user.targetWhen I log in as myuser and run /usr/local/bin/MyApp from /home/myuser, it runs fine.

When I do "systemctl start myapp" however, it hangs until I ctrl-c. It doesn't print any output, and nothing goes to journalctl. It just sits there, well past the 30 second timeout. When I boot the system and SSH into it, the service is always listed as enabled but dead.

Anyone have some tips to debug this?

Here's the added weirdness... without getting too far into the weeds, this system gets created from a disk image. When I take that image and run it, this app and service file work fine! But if I take that image and run it through mender-convert, then the service behaves this way. So, I know the app and the service file are fine... but I have no way of debugging to figure out what systemctl is choking on in the mender image...latest?d=yIl2AUoC8zA latest?i=H7LYOj_9wOE:3DvLpUMxYy4:F7zBnMy latest?i=H7LYOj_9wOE:3DvLpUMxYy4:V_sGLiP latest?d=qj6IDK7rITs latest?i=H7LYOj_9wOE:3DvLpUMxYy4:gIN9vFwH7LYOj_9wOE
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments