systemd doesn't start my custom service and logs "Cannot add dependency job ... Unit not found"
Issue
-
Upon boot, my custom service
custom.service
doesn't start automatically, although enabled, andjournalctl -b
shows the following linesystemd[1]: Cannot add dependency job for unit custom.service, ignoring: Unit not found.
-
After booting, performing a
systemctl
operation 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, tools, and much more.