DEV Community

Alexandru Bucur
Alexandru Bucur

Posted on • Originally published at alexandrubucur.com on

2

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

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.
Enter fullscreen mode Exit fullscreen mode

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.

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay