Services & systemd

A failed prerequisite prevents service activation

A service ends with a dependency result without running its own program. Trace required jobs and ordering before weakening dependencies or adding delays.

On this page
  1. Symptoms & scope
  2. Possible causes
  3. Diagnose safely
  4. Evidence-guided next steps
  5. References & review
  6. Related problems

Symptoms & scope

  • No new application startup message appears.
  • The start job ends with result dependency.

Relevant environment

systemd dependency jobs involving Requires, Wants, After and RequiresMountsFor.

Recognizable messages (synthetic examples)
systemd[1]: example.service: Job example.service/start failed with result 'dependency'.

This does not establish that the application executable crashed.

Possible causes

These are possible explanations, not a confirmed diagnosis. Several independent faults can coexist.

  • A required mount or daemon may have failed before this service was allowed to start.
  • An optional resource may be declared as required; After alone orders units but does not start them.

Diagnose safely

Run one command at a time in the relevant session. Read the explanation first. Uppercase placeholders need your own values; tools and privileges vary by distribution. These commands are displayed here and never executed by the website.

Check 1

Replace the target service; this only reads its dependency declarations.

systemctl show example.service -p Requires -p Wants -p After -p RequiresMountsFor

Interpret the result: Requires and Wants pull units into a transaction; After adds ordering. Match the failure to a specific prerequisite.

Check 2

Lists failed system units; use the corresponding user manager for user services.

systemctl --failed --no-pager

Interpret the result: A failed mount in the chain is relevant; unrelated failed units do not establish the cause.

Check 3

Replace prerequisite.service with the identified dependency; journal access may be restricted.

journalctl -b -u prerequisite.service --no-pager -n 80

Interpret the result: Resolve its first error before retrying the target. A healthy prerequisite suggests checking graph accuracy and ordering.

Evidence-guided next steps

Restore the actual prerequisite

If the service requires the failed mount or daemon, repair that unit and verify readiness first. For a data directory, verify the expected filesystem is mounted rather than merely that the directory exists.

Precautions: Starting on an empty mountpoint can create a second dataset on the root filesystem. Preserve the original dependency logs.

Recovery / rollback: Restore prerequisite configuration changes and keep the dependent service stopped until its required resource is valid.

Did this solution help you?

Share this solution#

Model an optional dependency correctly

If documentation confirms operation without that component, replace the unnecessary Requires relation with an appropriate Wants relation while retaining needed ordering. Check application behavior with the optional component absent.

Precautions: This changes failure propagation. Never weaken required database, secret or storage dependencies just to obtain an active state.

Recovery / rollback: Restore the original relation, reload units and start the complete prerequisite chain.

Did this solution help you?

Share this solution#

References & review

This guide was prepared from primary project or distribution sources and reviewed on the date shown. This is an editorial source check, not evidence that a fix was reproduced on your hardware. Diagnostic log examples are synthetic fixtures. Version-dependent details must be checked against your installed release.