A program that runs as a service, for example a torrent client, a web server or your own app, sometimes does not start, or stops after a few seconds. Linux records the reason; two commands show it. The commands were tested on Ubuntu 26.04 LTS with a deliberately broken test service; run them as root. Below, replace myapp with the name of your service.


1. The State: systemctl status

systemctl status myapp

A broken service shows, for example:

× kb-myapp.service - KB test app
     Active: failed (Result: exit-code) since Sat 2026-11-28 03:36:17 UTC
    Process: 72480 ExecStart=/usr/local/bin/kb-myapp --port 8099 (code=exited, status=203/EXEC)
  • Active: failed: the service has stopped with an error; active (running) would be good.
  • status=… gives a first hint. 203/EXEC means the program itself could not be started; 1/FAILURE means it started and ended with an error.

Below that, the last lines of its log are shown. Often they are already enough.

2. The Whole Log: journalctl

journalctl -u myapp -b --no-pager | tail -30

-u selects the service, -b limits it to the time since the last start of the server. The log usually names the cause, for example:

  • Unable to locate executable '/usr/local/bin/kb-myapp': No such file or directory: the program is missing or the path in the service file is wrong.
  • Error: cannot open /srv/myapp/config.yml: Permission denied: a message of the app itself; here the service user may not read its settings file.
  • Start request repeated too quickly: the service crashed several times in a row and systemd gave up. The real cause is further up in the log.

3. Typical Causes and Where to Look

4. Start It Again

systemctl reset-failed myapp
systemctl start myapp
systemctl status myapp

reset-failed clears the failure counter after Start request repeated too quickly. If you changed the service file itself, run systemctl daemon-reload first. systemctl --failed lists every service that is currently in the failed state.

How services are set up: Keep a Program Running on Linux. All logs: Find Errors in the Logs of Your Linux Server: journalctl.


Related Guides

View all Linux guides

Was this answer helpful? 0 Users Found This Useful (0 Votes)