root@linux-lab/blog/ linux-service-troubleshooting

Linux Administration · 5 min read

A Repeatable Workflow for Linux Service Troubleshooting_

A practical sequence for checking service state, validating configuration, reading logs, and verifying recovery without restarting blindly.

PUBLISHED 23 OCTOBER 2026

When a Linux service becomes unavailable, start by collecting evidence. A disciplined sequence helps separate a service-state problem from an invalid configuration, a port conflict, or a resource issue.

1. Confirm the service state

Check the service status first and read the recent log entries. Avoid restarting repeatedly before understanding why the process stopped.

systemctl status nginx --no-pager
journalctl -u nginx -n 50 --no-pager

2. Validate configuration before restart

For Nginx, the configuration test identifies syntax errors and invalid directives. If validation fails, locate the file and line reported by the command, then correct that issue before attempting recovery.

sudo nginx -t
sudo systemctl cat nginx

3. Check listening ports and capacity

If the configuration is valid but the service is still unavailable, inspect listening sockets and basic system resources. The exact diagnostic path depends on the service and the evidence collected so far.

sudo ss -lntp
df -h
free -h

4. Apply one fix and verify

After correcting the identified cause, restart the service only when appropriate, check its state again, and test from the client side. Record the symptom, cause, change, and verification result in the incident note.

sudo nginx -t && sudo systemctl restart nginx
systemctl is-active nginx
curl -I --max-time 5 http://127.0.0.1
#systemd#journalctl#incident-response