← Problem Library
Linux L4 LINUX-005 · 20 min

A missing WorkingDirectory problem that puts a systemd service into a restart loop

A situation where the application itself is fine but a wrong unit-file path setting kills the service.

LinuxFoundation OpsLevel 4Free20 min
Scenario

A scenario that narrows down the root cause, centered on reading the application logs together with the unit config file, in the situation of a missing WorkingDirectory putting a systemd service into a restart loop.

What to check first
  • Identify the primary failure signal in the Systemd Debug scenario.
  • Separate visible symptoms from the underlying technical dependency.
  • Describe the safest recovery path and the follow-up prevention work.
Checking checklist
  1. Summarize the current impact and the last known change.
  2. Collect direct evidence from logs, runtime state, and configuration before changing anything.
  3. Separate immediate recovery from permanent prevention work.
Recovery and prevention

Choose the smallest safe recovery action first, then record the prevention work that reduces repeat incidents.

Questions worth viewing together
Why does a service start manually but fail under systemd?

Interactive shells and service units do not inherit the same working directory, environment, or startup ordering assumptions.