Linux Labs

Packages, services, and logs / Stage 7 of 13

Diagnosing a failed service

Not running Starting usually ~20 s
Leave the lesson

Step 8 of 8 · summary · 2 min

Summary

  • A start failure is read in order: systemctl status (Result and the code), the journal of the attempt sudo journalctl -u <service> -b, the unit file systemctl cat.
  • A code from 200 up means systemd could not start the program: 203/EXEC — no program, 217/USER — no user. A code below 200 came from the program, and its cause is in the program's messages and settings.
  • After a change to a unit file you need sudo systemctl daemon-reload, then the start. Recovery is confirmed by the service at work: a process running as the right user, the site's response.
  • At the start of the lesson lab-worker would not start because of the typo sleeeep in ExecStart: systemd did not find the program and returned 203/EXEC.
Ubuntu 24.04
Loading…