Pcornel
Browse topics
Options
Recent
Favorites
Linux · Technical reference

Service Failure

Direct answer

A service failure is a systemd service that fails to start, exits, or restarts in a loop.

When to use this

Use it when systemctl status shows failed or activating (auto-restart).

First 30 seconds

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.

Operational verification

unit starts → ExecStart runs → process stays up → service answers

Evidence · next step

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
Platform / version applicability
linux
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

Platformlinux · Linux / systemd
Key commandsystemctl status <service> --no-pager
Scope / prerequisiteUse it when systemctl status shows failed or activating (auto-restart).
Reference · 1
What next?3 suggested next steps
Catalog command links1
Evidence1
On this pageJump to a specific section
Linux command reference

Primary Commands

Configuration and operational commands for this Topic.

Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

7 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

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 references

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.

observation · 1
Key points

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.

Key checks
  • journalctl -b -p err — errors this boot
  • systemctl --failed — failed units
  • df -h; df -i — space and inodes
  • ss -tulpn — listening sockets
  • dmesg -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:

  • status shows the state, the main PID, the last log lines and the exit code.
  • cat shows the unit as it is on disk, including drop-ins, which can differ from what's loaded if no daemon-reload has run.
  • show -p gives exact properties for scripts.
  • reset-failed clears the failed state and the start-rate counters.

Reading the failure

Result / messageMeaning
Result: exit-code + status=1/FAILUREThe program exited with an error; read its log
status=203/EXECsystemd couldn't execute ExecStart= (wrong path, not executable, wrong interpreter)
status=217/USERThe User= doesn't exist
status=226/NAMESPACEA sandboxing setting failed (e.g. ReadWritePaths= to a missing directory)
Result: signal (SEGV, ABRT)The program crashed
Result: timeoutStart-up exceeded TimeoutStartSec=
Result: oom-killThe kernel OOM killer, or a memory limit, killed it
"Start request repeated too quickly"The restart rate limit was hit

A checklist

CheckCommand
Status and recent logsystemctl status <unit> --no-pager -l
The full log of this bootjournalctl -u <unit> -b
What systemd actually loadedsystemctl cat <unit>; systemctl show <unit> -p ExecStart,User,Environment
Does it work by hand, as the same user?sudo -u <user> <ExecStart command>
Port conflictsss -tlnp | grep :<port>
SELinux or AppArmorausearch -m AVC -ts recent, journalctl -k -g apparmor
Dependenciessystemctl 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.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

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 / statusMeaning
exit-code 203/EXECBinary missing or not executable
exit-code 217/USERUser does not exist
exit-code 226/NAMESPACESandboxing option failed (ProtectSystem, ReadWritePaths)
start-limit-hitRestarted too often — systemctl reset-failed after fixing
timeoutDid not signal readiness (Type=notify/forking mismatch)
oom-killMemory limit or system OOM
Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
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
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor doclinux current

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%
Technical changelog & impact

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.

Terminology layer

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.

Aliases that resolve here
linux service failuresystemd service faileddaemon troubleshootingservice active but not working
Embedded reference data

Quick lookup tables

Service Failure operational reference

Topic-specific lookup boundaries, proof limits and next-step Evidence for Service Failure.

Lookup boundaryTopic-specific referenceOperational use
Scope / effective stateService 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 verificationPin 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 chainsymptom + exact time → scope + baseline → reproduce original failure → collect first-party evidence → identify first failed boundary → minimal controlled change → repeat original test → regression/posture checkTrace requested/configured state through effective state to the observed workload result.
Failure boundaryService 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 evidenceCorrelated 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 checkUse this observation only for the specific claim it actually supports.
Evidence limitIt 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 checkContinue 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 boundaryService Failure
Topic pathLinux Troubleshooting → Service Failure
Runtime stateService 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 chainsymptom + 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 boundaryService 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 ruleProve which configuration source owns the state, then prove that the running consumer loaded or generated the intended state.
Confirmation

Confirm action

Continue?