question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Runner listener exited and session duplicated

See original GitHub issue

Describe the bug Runner listener exited with error code null and when it started, a duplicated session preventing the process to connect to the runner. Eventually our GHA job failed after 20 minutes plus

To Reproduce Steps to reproduce the behavior:

  1. I’m not sure how to reproduce the issue. Probably we need to kill runner listener’s process
  2. See error

Expected behavior Runner listener re-launch should resume the existing session or create a new session. If the runner is not functional it should not receive new job from GHA.

Workaround We delete the faulty runner pod, and has no issue with the new runner pod.

Runner Version and Platform

2.284.0

OS: Ubuntu 20.04/ Docker container in Kubernetes (AWS EKS 1.19)

What’s not working?

Runner pod’s logs

2021-11-23 17:57:50Z: Running job: terraform-cd
Runner listener exited with error code null
Runner listener exit with undefined return code, re-launch runner in 5 seconds.
Starting Runner listener with startup type: service
Started listener process, pid: 6021

√ Connected to GitHub

A session for this runner already exists.
2021-11-23 17:58:25Z: Runner connect error: The actions runner rr-devops-7c676ff546-dxzvx already has an active session for owner rr-devops-7c676ff546-dxzvx.. Retrying until reconnected.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:1
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
gitcoscommented, Nov 16, 2022

We’re having the same problem on a self-hosted runner for a GitHub Enterprise, and I found this issue with a Google search.

Here’s what we get in the runner’s logs, mildly edited to anonymize:

[2022-11-16 16:50:12Z ERR  GitHubActionsService] POST request to https://github.OURDOMAIN.com/_services/pipelines/[long hash deleted from public post]/_apis/distributedtask/pools/7/sessions failed. HTTP Status: Conflict
[2022-11-16 16:50:12Z ERR  MessageListener] Catch exception during create session.
[2022-11-16 16:50:12Z ERR  MessageListener] GitHub.DistributedTask.WebApi.TaskAgentSessionConflictException: The actions runner HOSTNAME-ARM64 already has an active session for owner HOSTNAME.

I can’t figure out which of the troubleshooting docs @nikola-jokic linked to above are relevant to this issue. None of them seem to be.

We’ve had this happen in the past, and the problem goes away after an hour - I assume this is because the existing session expires so GHE allows a new session to be created. But it seems like there should be a better process for this than leaving the runner offline for an hour.

P.S. I would reopen this issue, but I don’t seem to have the ability to (or I don’t know where to find that option in the UI).

0reactions
gitcoscommented, Feb 22, 2023

Just commenting to say we’ve run into this again a couple of times recently, and still haven’t found any better answer.

Read more comments on GitHub >

github_iconTop Results From Across the Web

GitHub action self-host runner as service fails - linux
I have changed User=admin.user to User=uid in the /etc/systemd/system/actions.runner._services.Linux-Host01.service file and then executed
Read more >
PSM Service
PSMSR005I PSM listener ignored terminal services session <id> which was performed with user ... Internal error - failed to duplicate authentication token.
Read more >
Troubleshoot Self-Hosted Setup
It's possible (though atypical) to have multiple nodes running on a single machine. Cannot run a single-node CockroachDB cluster. Try running:.
Read more >
Kafka broker and controller configuration reference
Also unlike listeners , there can be duplicated ports in this property, so that one listener can be configured to advertise another listener's...
Read more >
Chapter 2 Server Error Message Reference
Message: Variable '%s' is a SESSION variable and can't be used with SET GLOBAL ... Message: The MySQL server is running with the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found