systemctl shows service file not-found, even though .service file is present

I know this is several months old, but for the record, also check the config file for the service. You can get this message because a dependency unit was not found. Systemd doesn't seem to give enough detail in the error message where it differentiates between the main unit you are starting and a dependent unit. Sometimes it will work around these issues at boot and then fail if you do it manually, which is quite maddening.


It may be that the service file was moved away while the service was running. You may need to run systemctl daemon-reload. Of course, verify the file /opt/app/daps-prod/resource-service/bin/resource-service-prod-prod.service is actually there.

[root@storage system]# systemctl status smb.service
● smb.service - Samba SMB Daemon
   Loaded: loaded (/usr/lib/systemd/system/smb.service; enabled; vendor preset: disabled)
...
[root@storage system]# systemctl daemon-reload
[root@storage system]# systemctl status smb.service
● smb.service
   Loaded: not-found (Reason: No such file or directory)
...
[root@storage system]# ln -s /opt/smb.service /usr/lib/systemd/system/smb.service
[root@storage system]# systemctl status smb.service
● smb.service
   Loaded: not-found (Reason: No such file or directory)
...
[root@storage system]# systemctl daemon-reload
[root@storage system]# systemctl status smb.service
● smb.service - Samba SMB Daemon
   Loaded: loaded (/opt/smb.service; enabled; vendor preset: disabled)