Troubleshoot a Linux service without guessing
A repeatable path from a failed systemd unit to useful evidence.
Start with the symptom
Confirm the host, unit name, time window, and user impact before changing anything. Record the last known working state. The examples here target a systemd-based Linux host; replace nginx.service with the unit you are investigating.
systemctl status nginx.service --no-pager -l
journalctl -u nginx.service --since "30 minutes ago" --no-pagerCheck dependencies and listeners
Read the first relevant error, then test that hypothesis. A service can be running while its upstream dependency is unavailable. Check disk capacity, bound ports, and the unit definition before restarting.
systemctl cat nginx.service
systemctl list-dependencies nginx.service
ss -lnt
df -h
df -iValidate before restarting
For Nginx, test configuration with sudo nginx -t. Other services have different validation commands. Save the current configuration and use an approved change window before applying a correction. A restart can interrupt active requests; do not use repeated restarts as a diagnostic shortcut.
Prove recovery
Repeat the original failing request from a representative client, inspect fresh journal entries, and verify monitoring. Write down the cause, correction, and rollback procedure. A green systemctl status alone does not demonstrate that users can reach the application.