Skip to content

New Org Runner Not Picking Up Jobs #428

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

Closed
smashedr opened this issue Feb 28, 2025 · 8 comments
Closed

New Org Runner Not Picking Up Jobs #428

smashedr opened this issue Feb 28, 2025 · 8 comments

Comments

@smashedr
Copy link

smashedr commented Feb 28, 2025

I setup a new runner for an org using token authentication. The runner registers, connects, and is Idle waiting for jobs, but never picks up any jobs.

The runner shows online:

Image

But all the jobs sit idle.

Requested labels: self-hosted
...
Waiting for a runner to pick up this job...

With nothing in the logs:

Runner reusage is disabled
Obtaining the token of the runner
Configuring
--------------------------------------------------------------------------------
|        ____ _ _   _   _       _          _        _   _                      |
|       / ___(_) |_| | | |_   _| |__      / \   ___| |_(_) ___  _ __  ___      |
|      | |  _| | __| |_| | | | | '_ \    / _ \ / __| __| |/ _ \| '_ \/ __|     |
|      | |_| | | |_|  _  | |_| | |_) |  / ___ \ (__| |_| | (_) | | | \__ \     |
|       \____|_|\__|_| |_|\__,_|_.__/  /_/   \_\___|\__|_|\___/|_| |_|___/     |
|                                                                              |
|                       Self-hosted runner registration                        |
|                                                                              |
--------------------------------------------------------------------------------
# Authentication
√ Connected to GitHub
# Runner Registration
√ Runner successfully added
√ Runner connection is good
# Runner settings
√ Settings Saved.
Disable automatic registration: false
Random runner suffix: true
Runner name: swarm-aarch64
Runner workdir: /_work
Labels: default
Runner Group: Default
Github Host: github.com
Run as root:true
Start docker: false
Running ./bin/Runner.Listener run --startuptype service
√ Connected to GitHub
Current runner version: '2.322.0'
2025-02-28 08:29:03Z: Listening for Jobs

Compose file:

version: "3.8"

services:
  actions-runner:
    image: myoung34/github-runner:latest
    restart: always
    environment:
      RUNNER_NAME: swarm-aarch64
      RUNNER_SCOPE: org
      ORG_NAME: cssnr
      ACCESS_TOKEN: "${GH_PAT}"
      RUNNER_WORKDIR: /_work
      #LABELS: swarm-aarch64
      #RUNNER_GROUP: my-group
      DEBUG_OUTPUT: "true"
    deploy:
      replicas: 1
      resources:
        limits:
          cpus: "2.0"
          memory: 500M
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /data/docker/actions-runners:/_work

Token Permissions:

Image

I have this setup on another org, using App authentication and it works just fine. I just can't get token auth to work with an org.

EDIT:

I have noticed when I go to the Runners section in one of my org's repositories, the runner does not show up there. But does show up in the org as shown above. So there seems to be a disconnect somewhere because the one I setup with App Authentication does shows up int he org, and here...

Image

Reference Issue Repository/Org: https://github.com/cssnr/django5-boiler/actions/runners?tab=self-hosted

Reference App Auth Org (working): https://github.com/django-files/django-files/actions/runners?tab=self-hosted

@myoung34
Copy link
Owner

myoung34 commented Feb 28, 2025

Im not able to replicate this

I have an org runner for OctoKode defined here using ACCESS_TOKEN

It shows as an org runner

Image

And it picked up and tracked a job from here without issue

Current runner version: '2.322.0'
Runner name: 'actions-runner-548f7c65fb-q7ptw'
Runner group name: 'Default'
Machine name: 'actions-runner-5[4](https://github.com/OctoKode/test1/actions/runs/13593718812/job/38005735623#step:1:4)8f7c65fb-q7ptw'
$ kubectl -n actions-runner logs -f pod/actions-runner-548f7c65fb-q7ptw
Runner reusage is disabled
Obtaining the token of the runner
Configuring

--------------------------------------------------------------------------------
|        ____ _ _   _   _       _          _        _   _                      |
|       / ___(_) |_| | | |_   _| |__      / \   ___| |_(_) ___  _ __  ___      |
|      | |  _| | __| |_| | | | | '_ \    / _ \ / __| __| |/ _ \| '_ \/ __|     |
|      | |_| | | |_|  _  | |_| | |_) |  / ___ \ (__| |_| | (_) | | | \__ \     |
|       \____|_|\__|_| |_|\__,_|_.__/  /_/   \_\___|\__|_|\___/|_| |_|___/     |
|                                                                              |
|                       Self-hosted runner registration                        |
|                                                                              |
--------------------------------------------------------------------------------

# Authentication
√ Connected to GitHub
# Runner Registration
√ Runner successfully added
√ Runner connection is good
# Runner settings
√ Settings Saved.
√ Connected to GitHub

Current runner version: '2.322.0'
2025-02-28 18:44:25Z: Listening for Jobs
2025-02-28 18:44:34Z: Running job: test
2025-02-28 18:44:56Z: Job test completed with result: Succeeded

I'd post this on the upstream actions project, this is behaving as expected

@smashedr
Copy link
Author

Ok, so I added App Auth to the org, the runner again registers and shows up in the org, but not on the repository of the org.

@myoung34 I have been comparing the orgs side by side, is there a specific setting in the org I need to configure to enable this that I am missing? Terribly sorry if so...

Image

Image

Runner reusage is disabled
Obtaining access token for app_id 1162137 and login cssnr
Obtaining the token of the runner
Configuring
--------------------------------------------------------------------------------
|        ____ _ _   _   _       _          _        _   _                      |
|       / ___(_) |_| | | |_   _| |__      / \   ___| |_(_) ___  _ __  ___      |
|      | |  _| | __| |_| | | | | '_ \    / _ \ / __| __| |/ _ \| '_ \/ __|     |
|      | |_| | | |_|  _  | |_| | |_) |  / ___ \ (__| |_| | (_) | | | \__ \     |
|       \____|_|\__|_| |_|\__,_|_.__/  /_/   \_\___|\__|_|\___/|_| |_|___/     |
|                                                                              |
|                       Self-hosted runner registration                        |
|                                                                              |
--------------------------------------------------------------------------------
# Authentication
√ Connected to GitHub
# Runner Registration
√ Runner successfully added
√ Runner connection is good
# Runner settings
√ Settings Saved.
√ Connected to GitHub
Current runner version: '2.322.0'
2025-02-28 18:49:27Z: Listening for Jobs

https://github.com/cssnr/django5-boiler/actions/runners?tab=self-hosted

@myoung34
Copy link
Owner

Im unsure on settings, it could be a setting or network paths, or other things im not privvy to

All I can guarantee is that token auth works for org runners and just validated that.

@smashedr
Copy link
Author

smashedr commented Feb 28, 2025

Right, but now I cant get Token or App authentication to work on my org (as shown above) on NEW organizations. Works fine on old ones...

Obtaining access token for app_id 1162137 and login cssnr

Currently the runner is registering and showing in the organization as seen in the screenshots. But when I go to the individual repositories Actions tab and click the Runners there, their not showing up.

Are you saying you think this is an issue of self-hosed Origination runners not properly propagating to repositories, and should be reported to GitHub?

@smashedr smashedr changed the title Token Auth for Org Runner Not Picking Up Jobs New Org Runner Not Picking Up Jobs Feb 28, 2025
@myoung34
Copy link
Owner

All I can say is that I'm unable to replicate the issue

If you have a runner from an org and a repo that is set up to use it correctly you should see similar to below
Image

@smashedr
Copy link
Author

So as I said, it works fine on previously setup orgs:

Image

But I cant get it to work on a new org that has never has a self-hosted runner:

Image

And I can't find a difference between the org's configuration. Why I asked if maybe there is something I am missing. A this point I have tried token and app auth.

@smashedr
Copy link
Author

Ok, I figured it out. There is a setting. Under Runner Groups, it seems that "Allow public repositories" is disabled by default.

Enabling this fixes the issue. Maybe consider adding this to the wiki?

Image

@myoung34
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants