Self hosted runners failing with WRITE ERROR: A session for this runner already exists
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 6.3k
- Forks
- 1.4k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 24
Description
We are using self-hosted ephimeral runners for our github jobs. Recently we are seeing jobs failing randomly with the error This job failed on the UI. On further digging we found out that it's trying to run the job on a runner which is already in Active state instead of Idle. We also saw the following logs.
ERR Terminal] WRITE ERROR: A session for this runner already exists
It gets stuck in this process for long and then fails. Ex:
Waiting for a runner to pick up this job...
Job is about to start running on the runner: ip-10-0-87-43 (organization)
We even tried upgrading the action agent to v2.319.1 , but the issue still persists.
All of our runners have the same labels hence the job could easily pickup any runner in Idle state, but instead its trying to pickup a runner which is in Active state.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the self-hosted ephemeral runner behavior around the reported v2.319.1 agent and the WRITE ERROR: A session for this runner already exists logs. Reproduce the job assignment with runners sharing labels, then compare runner states and session logs; done means jobs select an idle runner and no longer remain stuck or fail with this error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, github-actions
- Domain
- ci-cd
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100