actions-runner-controller: Pipeline gets stuck randomly with "Job is waiting for a runner from XXX to come online"
Checks
- I’ve already read https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners-with-actions-runner-controller/troubleshooting-actions-runner-controller-errors and I’m sure my issue is not covered in the troubleshooting guide.
- I am using charts that are officially provided
Controller Version
0.9.0
Deployment Method
Helm
Checks
- This isn’t a question or user support case (For Q&A and community support, go to Discussions).
- I’ve read the Changelog before submitting this issue and I’m sure it’s not due to any recently-introduced backward-incompatible changes
To Reproduce
1. Start a GitHub Actions pipeline
Describe the bug
Part of the pipeline works well, but at some point it gets stuck with the “Job is waiting for a runner from XXX to come online.”. Restarting the pipeline fixes it. We have started experiencing it roughly since last week while still being on 0.6.1 but the issue has persisted on 0.9.0
Describe the expected behavior
Pipeline does not get stuck
Additional Context
# values.yaml
arcOperator:
values:
replicaCount: 3
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchLabels:
app.kubernetes.io/name: gha-rs-controller
topologyKey: kubernetes.io/hostname
arcRunners:
values:
githubConfigUrl: "https://github.com/CareerLunch/career-lunch"
githubConfigSecret:
github_token: {{ requiredEnv "ARC_CHART_GITHUB_TOKEN" | quote }}
containerMode:
type: kubernetes
kubernetesModeWorkVolumeClaim:
accessModes: ["ReadWriteOnce"]
storageClassName: "career-lunch-bootstrap-aws-ebs-gp3"
resources:
requests:
storage: 10Gi
template:
metadata:
annotations:
karpenter.sh/do-not-evict: "true"
spec:
securityContext:
fsGroup: 123
nodeSelector:
workload: arc_runners_v1
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchLabels:
actions-ephemeral-runner: "True"
topologyKey: kubernetes.io/hostname
tolerations:
- key: workload
operator: Equal
value: arc_runners_v1
effect: NoSchedule
containers:
- name: runner
image: ghcr.io/actions/actions-runner:latest
command: ["/home/runner/run.sh"]
env:
- name: ACTIONS_RUNNER_REQUIRE_JOB_CONTAINER
value: "false"
- name: ACTIONS_RUNNER_CONTAINER_HOOK_TEMPLATE
value: /mnt/pod-template/pod-template.yml
volumeMounts:
- name: pod-template
mountPath: /mnt/pod-template
readOnly: true
resources:
requests:
memory: "250Mi"
cpu: "100m"
limits:
memory: "250Mi"
volumes:
- name: pod-template
configMap:
name: career-lunch-bootstrap-pod-template
---
# pod-template.yml
{{- $name := ( include "career-lunch-library.fullname" . ) }}
{{- $labels := ( include "career-lunch-library.labels" . ) }}
{{- /* See https://github.com/actions/runner-container-hooks/blob/main/docs/adrs/0096-hook-extensions.md */}}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ $name }}-pod-template
namespace: {{ .Values.arcRunners.namespace }}
labels:
{{ $labels | indent 4 }}
data:
pod-template.yml: |
{{- /*
Technically, we do not need a PodTemplate, see https://github.com/actions/runner-container-hooks/blob/main/examples/extension.yaml
But this communicates the intent better
*/}}
apiVersion: v1
kind: PodTemplate
metadata:
annotations:
karpenter.sh/do-not-evict: "true"
spec:
serviceAccountName: {{ include "career-lunch-library.fullname" . }}-arc-runners-sa
securityContext:
{{- /* Provides access to /home/runner/_work directory in ephemeral volume */}}
fsGroup: 123
nodeSelector:
workload: arc_runners_v1
tolerations:
- key: workload
operator: Equal
value: arc_runners_v1
effect: NoSchedule
containers:
{{- /* Overrides job container */}}
- name: $job
resources:
{{- /* Memory values are rather high, but we need them for webpack / Cypress jobs */}}
requests:
memory: 4Gi
cpu: 1
{{- /*
Best practice is to add limits too
However, we run these jobs in isolated instances and want them to use all resources available
Instance resources are configured via Karpenter
*/}}
Controller Logs
Controller: https://gist.github.com/wasd171/fdfda5ab0484782f0593eef4364e6811
Listener: https://gist.github.com/wasd171/113c7b11a876da64977170f09e878185
Runner Pod Logs
None, no runner pod gets created
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 5
- Comments: 29 (3 by maintainers)
Hey @mhuijgen, the issue is with the controller. So you can use 0.8.3 in the meantime. Again, sorry this has happened, I personally tested the new scaling process many times, and I couldn’t bump into this problem… 😞
I’m working on the fix right now.
I’m running version: 0.11.0
And I’m still running into runners randomly not picking up jobs
I’ll keep an eye on this issue after the next 0.9.1 release
Thank you all!
Hey everyone,
We have an update: The total number of assigned jobs is calculated live, while the assigned job is built up over time. If the job is scheduled and then cancelled, there might be an instance where we get the job assigned message, while the statistics are saying that no jobs are assigned to the scale set.
I’m not ruling out that it is not the issue on our end; I’m just trying to get as much information as possible to investigate this problem. Can any of you please send the full listener log and controller log around the time this is happening?
The original issue was related to ARC, but 0.9.3 shouldn’t be affected. We are thinking that it might be an issue on the backend side, but without these logs, we cannot properly trace what was going on around the time the listener didn’t pick up the message.
Hey @clementnero, @air-hand,
I reached out to the team and will update you about the progress on this.
@nikola-jokic, with version 0.10.1, an intermittent issue occurred between March 28th and March 31st, where listeners occasionally ignored the ‘Job Assigned’ message. Although the message was received, the assigned job count and runner count were not incremented as expected, resulting in the runner not being scheduled and the GitHub job not being picked up. This issue has not occurred since then.
Hey @air-hand,
This should work now, the bug has been fixed server-side.
We are using this issue to track this bug, so please, everyone, let us know there if you experience this issue again.
@nikola-jokic we’re experiencing the same issue as described here (randomly jobs get stuck waiting for a runner; killing listener pod unblocks it).
For us, it started yesterday on 0.9.0. So today we upgraded to 0.9.1. Unfortunately, we hit the same issue several times today with 0.9.1.
Do I understand correctly that the above issue should be fixed in 0.9.1? If so, is there any info I can share to support troubleshooting?
Not sure if this related, but I have the same issue on 0.9.0
The runner pod is created, but it’s immediately deleted, then the controller never recreates the runner pod, resulting in pipeline get stuck.
Most of the times, the error happens on runner initialization, one of them is:
Here’s full log from Loki https://bin.hzmi.xyz/sadoneponi.log
Hey @nikola-jokic
This is just one case, arc v0.8.3 on my laptop. https://gist.github.com/air-hand/ed9ab9ee47eee6513b30fd14e1a18f3e
Maybe the listener hungs some reasons between 2025-04-15 21:00 and 22:00(UTC), TotalAssignedJobs was 0 and there are many
job assignedmessages around 2025-04-15 22:03(UTC). In this case, the listener hung for an hour (GetMessage was not logged), so I think it gave up on the back-end side, but this is an extreme example, just for reference. I will share the another case via support team separately as well.After that, scaled the runners processing old queues when new queues coming, so new queues stuck.
Same symptoms with GKE
v1.29.1andgha-runner-scale-set-0.9.0I made the same observations as @mhuijgen and Hazmi35, and collected the runner and controller logs as well. Going a step further, here’s what I can say.
On the runner side, it fails when creating the session and quits immediately, indicating that the runner registration has been deleted from the server.
Runner
On the controller side, the ephemeral runner registration is created once as expected, but a second time immediately afterwards (which is not expected), resulting in a detected conflict (the runner with a same name exists in GitHub) and causing the controller to delete the existing ephemeral runner registration from GitHub (the one created in the first attempt) and requeue reconciliation. The next reconciliation ends up creating directly a new ephemeral runner secret for the JIT configuration (with the same registration that has just been deleted) and the runner pod, without recreating a new ephemeral runner registration first, thus resulting in immediate runtime failure for the runner.
First successful attempt to create an ephemeral runner registration:
Second unsuccessful attempt to create an ephemeral runner registration:
More interestingly, subsequently as the controller do not find the ephemeral runner (registration) in GitHub, it concludes immediately that the runner has finished, whereas it has failed.
Controller
In short, if I’m not mistaken:
Let’s consider this as an assumption for now, based on logs and source code. I have struggled a bit to reproduce it on a local setup, since the code base is relatively new to me and I lack time (I’ll be on vacation next week). Hope this will help solve the issue.