systemd doesn't start my custom service and logs "Cannot add dependency job ... Unit not found"
Issue
-
Upon boot, my custom service
custom.servicedoesn't start automatically, although enabled, andjournalctl -bshows the following linesystemd[1]: Cannot add dependency job for unit custom.service, ignoring: Unit not found. -
After booting, performing a
systemctloperation on the service fails# systemctl status custom.service Unit custom.service could not be found.
Environment
- Red Hat Enterprise Linux 7 and later
- systemd
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
