runner icon indicating copy to clipboard operation
runner copied to clipboard

Self hosted runner not starting up as a service.

Open ppmgitrepo opened this issue 2 years ago • 5 comments

Describe the bug A clear and concise description of what the bug is. We are trying to startup a self hosted runner as a service and are following the instructions on https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/configuring-the-self-hosted-runner-application-as-a-service

However even though the service starts, the runner is still showing as offline

To Reproduce Steps to reproduce the behavior: Details of the service starting spool

================ console log ====================
[root@omcscbbiglfmtv actions-runner]# ./svc.sh status

/etc/systemd/system/actions.runner.OCIApps-TechOpsCICD.ppm-prod-runner1.service
● actions.runner.OCIApps-TechOpsCICD.ppm-prod-runner1.service - GitHub Actions Runner (OCIApps-TechOpsCICD.ppm-prod-runner1)
Loaded: loaded (/etc/systemd/system/actions.runner.OCIApps-TechOpsCICD.ppm-prod-runner1.service; enabled; vendor preset: disabled)
Active: active (running) since Fri 2023-06-09 13:17:39 UTC; 2min 18s ago
Main PID: 2190 (runsvc.sh)
Tasks: 24
Memory: 40.0M
CGroup: /system.slice/actions.runner.OCIApps-TechOpsCICD.ppm-prod-runner1.service
├─2190 /bin/bash /orpppmp1/ppmapp/ppm/OG_deploy_stage/git-runners/ppm-prod-runner1/actions-runner/runsvc.sh
├─2192 ./externals/node16/bin/node ./bin/RunnerService.js
└─2200 /u01/orpppmp1/ppmapp/ppm/OG_deploy_stage/git-runners/ppm-prod-runner1/actions-runner/bin/Runner.Listener run --startuptype service

Jun 09 13:17:39 omcscbbiglfmtv systemd[1]: Started GitHub Actions Runner (OCIApps-TechOpsCICD.ppm-prod-runner1).
Jun 09 13:17:39 omcscbbiglfmtv runsvc.sh[2190]: .path=/u01/Prod_Download/jdk/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbi....3.0/bin
Jun 09 13:17:39 omcscbbiglfmtv runsvc.sh[2190]: Starting Runner listener with startup type: service
Jun 09 13:17:39 omcscbbiglfmtv runsvc.sh[2190]: Started listener process, pid: 2200
Jun 09 13:17:39 omcscbbiglfmtv runsvc.sh[2190]: Started running service
Hint: Some lines were ellipsized, use -l to show in full.
[root@omcscbbiglfmtv actions-runner]#

Expected behavior After starting the service on the runners page https://github.com/OCIApps/TechOpsCICD/settings/actions/runners It should show the status as idle and it should pickup jobs as they get submitted. However no jobs are getting picked.

Runner Version and Platform

Version of your runner?

Current runner version: '2.304.0'

Manual startup spool

[oracle@omcscbbiglfmtv actions-runner]$ ./run.sh

√ Connected to GitHub

Current runner version: '2.304.0'
2023-06-12 15:50:19Z: Listening for Jobs
2023-06-12 16:03:50Z: Runner connect error: The HTTP request timed out after 00:01:00.. Retrying until reconnected.
2023-06-12 16:05:07Z: Runner reconnected.

OS of the machine running the runner? OSX/Windows/Linux/... Linux

What's not working?

All the messages are listed above.

Job Log Output

If applicable, include the relevant part of the job / step log output here. All sensitive information should already be masked out, but please double-check before pasting here.

[root@omcscbbiglfmtv actions-runner]# ./svc.sh status

/etc/systemd/system/actions.runner.OCIApps-TechOpsCICD.ppm-prod-runner1.service
● actions.runner.OCIApps-TechOpsCICD.ppm-prod-runner1.service - GitHub Actions Runner (OCIApps-TechOpsCICD.ppm-prod-runner1)
Loaded: loaded (/etc/systemd/system/actions.runner.OCIApps-TechOpsCICD.ppm-prod-runner1.service; enabled; vendor preset: disabled)
Active: active (running) since Fri 2023-06-09 13:17:39 UTC; 2min 18s ago
Main PID: 2190 (runsvc.sh)
Tasks: 24
Memory: 40.0M
CGroup: /system.slice/actions.runner.OCIApps-TechOpsCICD.ppm-prod-runner1.service
├─2190 /bin/bash /orpppmp1/ppmapp/ppm/OG_deploy_stage/git-runners/ppm-prod-runner1/actions-runner/runsvc.sh
├─2192 ./externals/node16/bin/node ./bin/RunnerService.js
└─2200 /u01/orpppmp1/ppmapp/ppm/OG_deploy_stage/git-runners/ppm-prod-runner1/actions-runner/bin/Runner.Listener run --startuptype service

Jun 09 13:17:39 omcscbbiglfmtv systemd[1]: Started GitHub Actions Runner (OCIApps-TechOpsCICD.ppm-prod-runner1).
Jun 09 13:17:39 omcscbbiglfmtv runsvc.sh[2190]: .path=/u01/Prod_Download/jdk/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbi....3.0/bin
Jun 09 13:17:39 omcscbbiglfmtv runsvc.sh[2190]: Starting Runner listener with startup type: service
Jun 09 13:17:39 omcscbbiglfmtv runsvc.sh[2190]: Started listener process, pid: 2200
Jun 09 13:17:39 omcscbbiglfmtv runsvc.sh[2190]: Started running service
Hint: Some lines were ellipsized, use -l to show in full.
[root@omcscbbiglfmtv actions-runner]#

Runner and Worker's Diagnostic Logs

n/a

ppmgitrepo avatar Jun 12 '23 16:06 ppmgitrepo

Is there any update on this ticket ? I am also attaching the diagnostics logging after re-starting a fresh runner. _diag.zip

ppmgitrepo avatar Jun 16 '23 05:06 ppmgitrepo

Hi everyone! I'd like to add that have exactly the same issue as described above, but run.sh works perfectly, svc.sh - doesn't. actions-runner-linux-x64-2.305.0

stsotsko avatar Jun 29 '23 15:06 stsotsko

same here, on mac svc.sh started by it still shows offine actions-runner-osx-arm64-2.305.0

Svision avatar Jul 03 '23 02:07 Svision

Hi guys! I've managed to resolve my issue with adding all the needed environment variables to the runner .env file, picture this:

[user@runner-vm01 actions-runner]$ cat .env
https_proxy=http://proxy.intranet.com:8080
http_proxy=http://proxy.intranet.com:8080
no_proxy=127.0.0.1,localhost
LANG=en_US.UTF-8
NODE_EXTRA_CA_CERTS=/etc/rootcerts.pem

As I might understand, interactive launch sees the host environment variables, but service looks only to this .env file. In my case the problem was that runner couldn't communicate with github endpoints by reason it is behind the proxy server.

stsotsko avatar Jul 26 '23 10:07 stsotsko

This issue is stale because it has been open 365 days with no activity. Remove stale label or comment or this will be closed in 15 days.

github-actions[bot] avatar Sep 23 '24 00:09 github-actions[bot]

This issue was closed because it has been stalled for 15 days with no activity.

github-actions[bot] avatar Oct 14 '24 00:10 github-actions[bot]