Hello,
I tried to install a self-hosted runner in my environment on Ubuntu 22. I followed Self-Hosted Runners documentation. Unfortunately, when trying to enable circleci.service I’m getting “Failed to enable unit: Unit file /lib/systemd/system/circleci.service is masked.”
Can you help me, please?
‘masked’ is the third state of a systemd service, one below disabled. It is unclear how you could have got your service into such a state.
The following blog gives details on the steps needed to unmask a service
I followed instructions contained in “Install a Self-Hosted Runner”. Step by step, with no exceptions. Service is masked even after running systemctl unmasek circleci.service command. Removing (rm) service from /lib/systemd/system makes service missing (can’t be enabled, started, unmasked)
When you remove /lib/systemd/system/circleci.service you are removing a link, which was likely to be pointing to /dev/null as that is the state that it is set to when a service is masked.
If you created a /usr/lib/systemd/system/circleci.service file with the correct owner and rights this should have been relinked systemctl daemon-reload
If not then something is not right with the overall setup, which will be very hard to work out by exchanging messages here (made even harder by my limited understanding of systemd when it does not work as expected).