Why Did My systemd Service Fail?

Why did my systemd service fail? Paste the full systemctl status or journal output to turn systemd's result and exit status into a focused set of checks.

0 characters, 0 lines

Analysis runs entirely in this browser. Your pasted output is not uploaded or stored. Remove secrets before sharing the result anywhere else.

How the systemd failure analyzer works

systemd reports failures at several layers. It may fail before your program starts, while applying the configured identity or working directory, after the program exits, or after a restart policy triggers too many attempts. This analyzer looks for exact systemd result names and the surrounding messages so it can separate those stages.

Collect useful output

Start with full, untruncated status output and the journal for the current boot. The last line often says only that the unit failed. The decisive message is usually the first error before it.

systemctl status your-service.service --full --no-pager
journalctl -u your-service.service -b --no-pager -n 150
systemctl cat your-service.service

The final command matters because drop-in files can override the unit you think you are editing. systemctl cat shows the unit and its loaded overrides together.

What the Result word means

The Result: word in the status is systemd's short reason. The systemd.exec manual defines each one:

  • exit-code: the main process exited with a non-zero code.
  • signal or core-dump: a signal killed the main process, with or without a core dump.
  • timeout: a start, stop or reload step took too long.
  • oom-kill: the out-of-memory killer ended a process in the unit.
  • protocol: the service did not take the steps its Type= setting expects, such as writing a PID file.
  • resources: a system operation failed while systemd set up the service.
  • start-limit-hit: the unit failed too many times in a row, so systemd stopped retrying.

A service that never started because another unit broke first shows Dependency failed for instead. Run systemctl list-units --failed to find the unit that failed first, then paste its status here.

Failures before the application starts

Status values such as 203/EXEC, 200/CHDIR, 217/USER, and 216/GROUP are generated while systemd prepares the process. Application logs may be empty because the application never ran. Check the path, executable format, shebang, directory traversal permissions, configured identity, mount state, and security-policy denials before debugging application code.

Restart limits are usually secondary

Start request repeated too quickly means the service failed several times within the start-limit window. Increasing the limit can hide the symptom, but it does not correct the first exit. Read earlier journal entries, fix that failure, then use systemctl reset-failed before retrying.

Keep the diagnosis scoped

Avoid broad permission changes such as making a service executable world-writable or disabling SELinux. Verify the exact process identity and the exact denied operation, then make the smallest change that allows the intended service behavior.

When the service itself is fine

Some units only wrap another program. If the service runs a container that exits right away, check why the Docker container won't start. If the log shows a failed HTTPS call, the cURL HTTPS error analyzer finds the network stage that broke.

Hear about the next failure first

This analyzer explains a failure once you've found it. To find out the moment one happens, set up failure alerts for every service, or compare the ways to monitor systemd services.