Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Self hosted runner service does not start automatically on Linux Mint #3286

Open
Edvinas01 opened this issue May 14, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@Edvinas01
Copy link

Edvinas01 commented May 14, 2024

Describe the bug
After configuring the runner as a service on Linux Mint, it doesn't automatically start after the system restarts.

To Reproduce
Steps to reproduce the behavior:

  1. Setup Linux Mint 21.3.
  2. Follow steps to install the runner as described here.
  3. Configure runner as a service as described here.
  4. Restart the system.
  5. Check journalctl logs, the runner fails with status=203/EXEC.
  6. Adjust service file to include /bin/bash in ExecStart.
  7. Run systemctl daemon-reload.
  8. Restart the system.
  9. Check journalctl logs, the runner fails with status=200/CHDIR.

Expected behavior
The runner service automatically restarts with the OS without any errors.

Runner Version and Platform

  • Version of your runner: 2.316.1
  • OS: Linux Mint 21.3

What's not working?

The runner does not start automatically on system boot when following this guide.

Logs

Here are the logs from journalctl -u actions.runner.ORG.USR.service (note, I replaced organization name with ORG, system name with SYS and username with USR).

Before modifying the service file:

-- Boot 37af18b73b884970900d8058454e90ae --
May 14 16:23:03 SYS systemd[1]: Started GitHub Actions Runner (ORG.SYS).
May 14 16:23:03 SYS systemd[967]: actions.runner.ORG.SYS.service: Failed to locate executable /home/USR/Software/actions-runner/runsvc.sh: No such file or directory
May 14 16:23:03 SYS systemd[967]: actions.runner.ORG.SYS.service: Failed at step EXEC spawning /home/USR/Software/actions-runner/runsvc.sh: No such file or directory
May 14 16:23:03 SYS systemd[1]: actions.runner.ORG.SYS.service: Main process exited, code=exited, status=203/EXEC
May 14 16:23:03 SYS systemd[1]: actions.runner.ORG.SYS.service: Failed with result 'exit-code'.

After modifying the service file to include /bin/bash in ExecStart:

-- Boot 182ab4bd9f0a4c4aabcad80f4161a2ed --
May 14 17:16:45 SYS systemd[1]: Started GitHub Actions Runner (ORG.SYS).
May 14 17:16:45 SYS systemd[1]: actions.runner.ORG.SYS.service: Main process exited, code=exited, status=200/CHDIR
May 14 17:16:45 SYS systemd[1]: actions.runner.ORG.SYS.service: Failed with result 'exit-code'.

More Info

  1. If I start the service manually via sudo ./svc.sh start it works fine, only when restarting the service doesn't boot up automatically.
  2. Service file created by svc.sh (note, I added /bin/bash to ExecStart):
[Unit]
Description=GitHub Actions Runner (ORG.SYS)
After=network.target

[Service]
ExecStart=/bin/bash /home/USR/Software/actions-runner/runsvc.sh
User=USR
WorkingDirectory=/home/USR/Software/actions-runner
KillMode=process
KillSignal=SIGTERM
TimeoutStopSec=5min

[Install]
WantedBy=multi-user.target
  1. This is a clean Linux Mint install with just the runner installed and nothing else.
@Edvinas01 Edvinas01 added the bug Something isn't working label May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant