Main process exited, code=exited, status=203/EXEC – systemd service ExecStart failure
0 reputation · 04 Apr 2021, 05:18 UTC
Main process exited, code=exited, status=203/EXEC in systemd unit
The goal is to determine whether a service that repeatedly fails with exit code 203 due to a missing or non‑executable ExecStart binary will be automatically restarted when Restart=on-failure is set, and whether the RestartPreventExitStatus= directive can reliably suppress those restarts without masking other genuine failures.
Uncertainty remains about how systemd interprets the 203/EXEC status in relation to its restart logic: the exit code maps to ENOENT, but it is not listed among the default “success” codes, so Restart=on-failure may trigger a restart loop if the underlying file‑system issue persists.
Questions:
- Does RestartPreventExitStatus=203 prevent the restart loop for this specific exec failure?
- If the binary becomes available after a restart, will systemd correctly transition to the active state?
- Are there any side‑effects of using RestartPreventExitStatus= for non‑failure exit codes?