Reading systemd Service Failures
A failed unit is a summary, not a diagnosis. The fastest route to the cause is usually status, recent logs, the expanded unit, and then the program's own configuration check.
Use the same order every time
systemctl status example.service --no-pager
journalctl -u example.service -b -n 100 --no-pager
systemctl cat example.service
systemctl show example.service -p ExecStart -p User -p Environment
Read the first failure
Later messages often describe consequences: a restart limit, a closed socket, or a dependency failure. Scroll back to the first error from the process itself and note its exit status.
Check the execution context
- Does the configured user have access to every file and directory?
- Are relative paths being interpreted from the expected working directory?
- Is the port already in use?
- Did an environment file change?
After editing a unit file, run
systemctl daemon-reload. After editing only the application's configuration, a daemon reload is normally unnecessary.