Robert Swartchick
Robert Swartchick

Reputation: 41

Github self-hosted runner fails to run as a service on RH Linux

I installed a GitHub self-hosted runner on a RH Linux EC2 instance. It runs fine in interactive mode: ./run.sh

But when trying to run it as a service. (sudo ./svc.sh start), it fails to start.

Active: failed runsvc.sh (code=exited, status=203/EXEC)

Any ideas on how to get around this?

Upvotes: 2

Views: 2994

Answers (2)

Joy Dingenen
Joy Dingenen

Reputation: 11

After running the chcon command, I could run the start but it crashed instantly with a status=1/failure. So i ran the chcon command on the run.sh command and in the service file found in systemd I put run.sh instead of svc.sh start.

Now it starts without problems and i can get the status of the service.

Active: active (running) since Fri 2023-02-10 11:59:14 CET; 6s ago
Main PID: 2065992 (run.sh)

Upvotes: 1

Mikail Cayoglu
Mikail Cayoglu

Reputation: 179

I am running an Oracle Linux 8 instance on the Oracle Cloud and had the same issue, exactly the same error output. Very likely you have SELinux running. This is blocking your service to start. This command helped me to solve the issue:

chcon system_u:object_r:usr_t:s0 runsvc.sh

Upvotes: 14

Related Questions