Linux Admin

Linux Systemd & Service Errors: Failed to start, Unit not found, dependency cycles

Part of pathway: Linux Troubleshooting: 150 Common Errors

Systemd and Service Errors

Systemd manages every service on a modern Linux system, and its error model is precise but unforgiving. A misplaced quote in a unit file, a forgotten daemon-reload, or a dependency cycle — any one of these will leave a service in a failed state with a cryptic message. The ten errors below are what you’ll see on a typical production server.

#041 Failed to start SERVICE.service

Solution: systemctl status SERVICE for short summary; journalctl -xeu SERVICE for the full log of the most recent failure. The error is almost always in there.

#042 Unit SERVICE.service not found

Description: systemctl can’t find the unit file.

Solution: systemctl list-unit-files | grep SERVICE; check spelling; if a custom unit, verify it’s in /etc/systemd/system/ and run systemctl daemon-reload.

#043 Job for SERVICE.service failed because the control process exited

Description: ExecStart returned non-zero.

Solution: journalctl -u SERVICE shows the actual exit code and stderr. Run the ExecStart= command manually as the service’s user to reproduce.

#044 Start request repeated too quickly

Description: Service crashed N times within StartLimitInterval; systemd refuses to keep restarting.

Solution: systemctl reset-failed SERVICE; fix the underlying crash; tune StartLimitBurst/StartLimitInterval in [Unit].

#045 Dependency cycle detected

Description: Two units depend on each other; systemd refuses to schedule.

Solution: systemctl list-dependencies SERVICE; remove one of the After= or Requires= lines.

#046 Unit is masked

Solution: systemctl unmask SERVICE. A masked unit is a symlink to /dev/null — refuses any start, even by dependency.

#047 ExecStart= bad value

Description: Bad escape, missing path, or relative-path command in unit.

Solution: Always absolute paths. systemd-analyze verify SERVICE.service validates syntax. Reload after fix: daemon-reload + start.

#048 systemctl returns “running” but service isn’t actually working

Description: Process is up but not serving requests; common with Type=simple services that don’t signal readiness.

Solution: Use Type=notify if your daemon supports sd_notify; or add ExecStartPost= with a health check; or use a systemd health= watchdog.

#049 Permission denied on socket

Description: Service tries to bind a low port (<1024) but runs as a non-root user.

Solution: Add AmbientCapabilities=CAP_NET_BIND_SERVICE to the unit (or use socket activation).

#050 daemon-reload required

Description: You edited the unit file and changes don’t take effect.

Solution: Always systemctl daemon-reload after editing unit files. Then systemctl restart SERVICE.

Conclusion

Five habits:

  1. journalctl -xeu SERVICE is THE command for systemd debugging. Memorize it.
  2. daemon-reload after every edit, before testing.
  3. systemd-analyze verify for syntax checks before deploy.
  4. Use /etc/systemd/system/ for overrides; never edit vendor units in /usr/lib/systemd/system/.
  5. systemctl reset-failed when you’ve fixed an issue and need to clear the failed state.

Related Linux Admin articles

Leave a Reply