Systemctl shows service file Not Found even though .service file is present

coolgoose profile image Alexandru Bucur Originally published at alexandrubucur.com on ・1 min read

Hi All,

I'm writing a step by step setup for a self hosted gitea instance (on CentOS 7) and hit the stupidest bug (if you can call it that) of systemd.
After writing the gitea service file I was getting the following error:

[root@gitea ~]# systemctl start giteaselfhost
Failed to start giteaselfhost.service: Unit not found.

After a few hours of maddening permission checks and debugging, the problem was that I had a Requires dependency to a service file that wasn't there.

Removing the broken dependency made the service work, so hopefully at some point systemd will give nicer errors when missing dependencies.

Posted on by:

coolgoose profile

Alexandru Bucur


Programmer, Manager and a jack of all trades. Making things work since the dawn of time.


markdown guide