Service Failure
Cheat sheet · https://pcornel.dk/topic.php?topic=2912
Answer
A service failure is a systemd service that fails to start, exits, or restarts in a loop.
Remember
Read the journal for the first error. Typical causes: config error, port in use, missing file or permission, wrong user, dependency not ready, SELinux denial.
First checks
journalctl -b -p err— errors this bootsystemctl --failed— failed unitsdf -h; df -i— space and inodesss -tulpn— listening socketsdmesg -T | tail— recent kernel messages
Commands
systemctl status <service> --no-pager- Bounded read-only observation/validation for unit load state, active/substate, process status, recent unit log lines an…
show -psystemctl status <unit> --no-pager -ljournalctl -u <unit> -bsystemctl cat <unit>systemctl show <unit> -p ExecStart,User,Environmentsudo -u <user> <ExecStart command>journalctl -k -g apparmorsystemctl list-dependencies <unit>systemctl reset-failed
Verify in this order
unit starts → ExecStart runs → process stays up → service answers
Where it usually breaks
First mismatch in persistent intent → provider/parser/generator → kernel/userspace runtime → dependency/security context → logs/counters → consumer-visible read-back; preserve identity/native diagnostic/pre-state before mutation.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=2912