Use it when systemctl status shows failed or activating (auto-restart).
Service Failure
A service failure is a systemd service that fails to start, exits, or restarts in a loop.
1. systemctl status <svc> — state and exit code.
2. journalctl -u <svc> -b -e — first error.
3. Config test (nginx -t, sshd -t …).
4. Port in use (ss -ltnp), permissions (namei -l), SELinux (ausearch -m avc -ts recent).
5. Fix, systemctl restart <svc>, verify.
unit starts → ExecStart runs → process stays up → service answers
For Linux Troubleshooting → Service Failure, continue with the first unproven Topic check: Inspect unit status, result, exit code, restart counters and same-attempt journal. If that boundary is healthy, advance to the adjacent check: Resolve effective unit file/drop-ins, environment, credentials, paths and dependency ordering. Preserve the same host/time/identity scope and rerun the original workload before accepting recovery.
Continue only after interpreting the current observation.Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
systemctl status <service> --no-pagerPrimary Commands
Configuration and operational commands for this Topic.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Operational evidence path Verify boundary
Healthy evidence: the exact service attempt has expected unit/dependency/process state, readiness/socket checks pass and the original client transaction succeeds after a targeted fix.
Step 2 Command read-back and what it shows Verify boundary
systemctl status <service> --no-pager is a bounded verification surface for Linux Troubleshooting → Service Failure. A healthy result is the unit is in its intended state, no new failure is emitted, and the original client/service request succeeds through its dependent path; a failed/degraded result is the unit remains failed/flapping, exits again, or the application remains unavailable despite active supervisor state. Re-run the original consumer/change criterion on the same scope and confirm an adjacent known-good path. systemctl status <service> --no-pager shows current systemd unit/process state and recent local context, but it does not show application-level readiness or remote dependency health. The result/status/state/value/configuration must expose a concrete discriminator; successful/healthy and failed/degraded outcomes remain separate from observed capture or external-source provenance.
Step 3 Commands Verify boundary
systemctl status app
journalctl -u app -n 100 --no-pager
systemctl cat app
Step 4 Verification and output interpretation Verify boundary
Existing fast checks for this Topic. - Inspect unit status, result, exit code, restart counters and same-attempt journal.
- Resolve effective unit file/drop-ins, environment, credentials, paths and dependency ordering.
- Verify process/socket/readiness and downstream dependencies separately from systemd active state.
- Apply the smallest fix, restart/reload only as required, then repeat the original client/workload test.
Step 5 Failure modes and next checks Narrow the fault
Suspicious evidence: restart loops are used as diagnosis, active state is treated as application health, wrong unit/drop-in is inspected, or logs from another boot/attempt are correlated.
Step 6 Observation-driven branch and next-check logic Narrow the fault
Freeze scope for Linux Troubleshooting → Service Failure: target, original failing operation and incident time. Inspect systemctl status <service> --no-pager. Decision path: if unit is failed/inactive with exit context, inspect the first process/config/dependency error; if dependency failed, troubleshoot that dependency first; if unit is active but original request fails, move to application logs/listener/backend health; if state flaps, inspect restart policy and resource/crash evidence. Preserve first-failure evidence before any restart, repair, cleanup or redeploy. An error, failed result, unexpected state, stale observation or missing object is evidence for the next branch, not automatic root cause.
Step 7 Common mistakes Narrow the fault
- Restarting repeatedly without reading the error.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
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.
journalctl -b -p err— errors this bootsystemctl --failed— failed unitsdf -h; df -i— space and inodesss -tulpn— listening socketsdmesg -T | tail— recent kernel messages
ReferenceWhat it is1 section · depth on demand
Core model
Pin the exact unit and invocation, then distinguish unit-file selection, dependencies/order, identity/environment, ExecStart result, process lifetime, socket/port/readiness and downstream dependency health. Use journal evidence from the same attempt.
ReferenceHow it works1 section · depth on demand
How it works
Effective state in Linux Troubleshooting → Service Failure spans systemd unit definition, dependency ordering, environment/credentials, executable/configuration validity, process lifecycle and any application-specific readiness/health endpoint behind the unit. Systemd loads the unit, resolves dependencies and conditions, starts the configured process and tracks its lifecycle; an active unit can still host an unhealthy application, while a failed unit can reflect dependency or execution errors. Adjacent dependencies are filesystem mounts, network/identity services, secrets, sockets/ports and application backends may fail independently before or after systemd considers the unit started. This matters because unit state is supervisor state, not end-to-end service health, and restarting can erase useful first-failure evidence without fixing configuration or dependency faults.
ReferenceImportant terms & boundaries4 sections · depth on demand
What this shows and what it does not
Service Failure owns cross-layer service isolation; systemd & Services owns unit semantics and the application branch owns application-specific configuration/protocol behavior.
In depth
Troubleshooting a failed service
When a service doesn't start, or keeps dying, systemd records most of what's needed to find out why. The systemctl(1) manual page describes the tools:
statusshows the state, the main PID, the last log lines and the exit code.catshows the unit as it is on disk, including drop-ins, which can differ from what's loaded if no daemon-reload has run.show -pgives exact properties for scripts.reset-failedclears the failed state and the start-rate counters.
Reading the failure
| Result / message | Meaning |
|---|---|
Result: exit-code + status=1/FAILURE | The program exited with an error; read its log |
status=203/EXEC | systemd couldn't execute ExecStart= (wrong path, not executable, wrong interpreter) |
status=217/USER | The User= doesn't exist |
status=226/NAMESPACE | A sandboxing setting failed (e.g. ReadWritePaths= to a missing directory) |
Result: signal (SEGV, ABRT) | The program crashed |
Result: timeout | Start-up exceeded TimeoutStartSec= |
Result: oom-kill | The kernel OOM killer, or a memory limit, killed it |
| "Start request repeated too quickly" | The restart rate limit was hit |
A checklist
| Check | Command |
|---|---|
| Status and recent log | systemctl status <unit> --no-pager -l |
| The full log of this boot | journalctl -u <unit> -b |
| What systemd actually loaded | systemctl cat <unit>; systemctl show <unit> -p ExecStart,User,Environment |
| Does it work by hand, as the same user? | sudo -u <user> <ExecStart command> |
| Port conflicts | ss -tlnp | grep :<port> |
| SELinux or AppArmor | ausearch -m AVC -ts recent, journalctl -k -g apparmor |
| Dependencies | systemctl list-dependencies <unit>; are the required units up? |
host$ systemctl status report-api --no-pager | sed -n '1,6p'
× report-api.service - Report API
Active: failed (Result: exit-code) since Sat 2026-11-28 15:50:02 CET
Process: 9921 ExecStart=/opt/reportapi/bin/reportapi (code=exited, status=203/EXEC)
host$ ls -l /opt/reportapi/bin/reportapi
-rw-r--r-- 1 deploy deploy 18231040 Nov 28 15:45 /opt/reportapi/bin/reportapi
host$ sudo chmod 755 /opt/reportapi/bin/reportapi
host$ sudo systemctl reset-failed report-api && sudo systemctl start report-api
host$ systemctl is-active report-api
active
Reading the example
status=203/EXEC means systemd couldn't execute the program at all, so the application never logged anything. The file listing shows why: the new deployment lost the execute bit. With exit codes in the 200 range, look at the unit and the file system, not the application's own log.
Documented example, not captured output.
How it works at runtime
Service Failure is part of Linux Troubleshooting → Service Failure. Service Failure isolates a Linux daemon or systemd unit that is failed, inactive, flapping or technically active while its socket, dependency, readiness or workload remains unusable.
Topic-specific state model. Service Failure isolates a Linux daemon or systemd unit that is failed, inactive, flapping or technically active while its socket, dependency, readiness or workload remains unusable.
Interpretation rule. - systemctl start accepted ≠ the service remained active.
- active (running) ≠ socket/readiness/workload is healthy.
- Restart success ≠ root cause or durable state is fixed.
- A journal error line ≠ causal unless it aligns with the failing invocation and boundary.
Method
Service failure investigation:
systemctl status app.service
journalctl -u app.service -b --no-pager | tail -50
systemctl cat app.service
systemd-analyze verify /etc/systemd/system/app.service
sudo -u appuser /opt/app/bin/app --config /etc/app.yml # run manually as the service user
| Result / status | Meaning |
|---|---|
exit-code 203/EXEC | Binary missing or not executable |
exit-code 217/USER | User does not exist |
exit-code 226/NAMESPACE | Sandboxing option failed (ProtectSystem, ReadWritePaths) |
start-limit-hit | Restarted too often — systemctl reset-failed after fixing |
timeout | Did not signal readiness (Type=notify/forking mismatch) |
oom-kill | Memory limit or system OOM |
ReferenceConfiguration & state1 section · depth on demand
Configuration, persistence and lifecycle
Distribution/platform context. Service Failure owns cross-layer service isolation; systemd & Services owns unit semantics and the application branch owns application-specific configuration/protocol behavior.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Linux Troubleshooting → Service Failure. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://docs.kernel.org/ · confidence 94%What changed and what may be affected
Recent technical edits are separated from ordinary page timestamps. Relationship impact is advisory: it identifies nearby canonical references to review, not automatic breakage.
Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Quick lookup tables
Service Failure operational reference
Topic-specific lookup boundaries, proof limits and next-step Evidence for Service Failure.
| Lookup boundary | Topic-specific reference | Operational use |
|---|---|---|
| Scope / effective state | Service Failure isolates a Linux daemon or systemd unit that is failed, inactive, flapping or technically active while its socket, dependency, readiness or workload remains unusable. | Establish exactly what this Topic owns before crossing into another subsystem. |
| Fast verification | Pin symptom + exact time + host/boot/user → define scope + expected baseline → preserve original failing test → collect targeted kernel/process/service/storage/network/security/log evidence → identify first divergent boundary → make one minimal reversible change → repeat original test → verify adjacent regressions and retain before/after evidence. | Use the shortest evidence path first; a fast check is a boundary test, not blanket proof. |
| Verification chain | symptom + exact time → scope + baseline → reproduce original failure → collect first-party evidence → identify first failed boundary → minimal controlled change → repeat original test → regression/posture check | Trace requested/configured state through effective state to the observed workload result. |
| Failure boundary | Service Failure troubleshooting is complete only when evidence localizes the first failed Linux boundary and the original failing workload passes after the smallest justified change; intermediate command success is not final proof. | Stop broad troubleshooting at the first boundary that is not supported by evidence. |
| Positive evidence | Correlated Linux troubleshooting evidence can establish this proof path: symptom + exact time → scope + baseline → reproduce original failure → collect first-party evidence → identify first failed boundary → minimal controlled change → repeat original test → regression/posture check | Use this observation only for the specific claim it actually supports. |
| Evidence limit | It does not independently prove behavior outside the captured host, boot, process/user, dependency, time or workload scope. Service Failure troubleshooting is complete only when evidence localizes the first failed Linux boundary and the original failing workload passes after the smallest justified change; intermediate command success is not final proof. | Do not promote a local success signal into end-to-end or adjacent-dependency proof. |
| Next troubleshooting check | Continue from the first unproven boundary: reproduce the exact original failure, collect the owning subsystem evidence at the same time, change only the proven cause or prerequisite, then repeat the original workload and regression checks. | Continue to the next unresolved boundary while preserving the original test condition. |
Service Failure · operational reference
Compact Linux state, persistence, verification and boundary reference for fast lookup.
| Reference boundary | Service Failure |
|---|---|
| Topic path | Linux Troubleshooting → Service Failure |
| Runtime state | Service Failure isolates a Linux daemon or systemd unit that is failed, inactive, flapping or technically active while its socket, dependency, readiness or workload remains unusable. |
| Fast checks | - Inspect unit status, result, exit code, restart counters and same-attempt journal. - Resolve effective unit file/drop-ins, environment, credentials, paths and dependency ordering. - Verify process/socket/readiness and downstream dependencies separately from systemd active state. - Apply the smallest fix, restart/reload only as required, then repeat the original client/workload test. |
| Verification chain | symptom + exact time → scope + baseline → reproduce original failure → collect first-party evidence → identify first failed boundary → minimal controlled change → repeat original test → regression/posture check Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return/regression → explicit Evidence boundary. Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return path or regression → explicit Evidence boundary. |
| Failure boundary | Service Failure troubleshooting is complete only when evidence localizes the first failed Linux boundary and the original failing workload passes after the smallest justified change; intermediate command success is not final proof. Boundary chain: unit config/drop-ins → dependency/order/condition → exec/process → readiness/active state → owned socket/file/device → dependent client/workload. |
| Persistence rule | Prove which configuration source owns the state, then prove that the running consumer loaded or generated the intended state. |