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.

Self-hosted Runner stuck in " Not configured" state

See original GitHub issue

Describe the bug After a restart self-hosted Runner randomly get stuck in “Not configured’” state. Possibly because of a failure to register with GH.

To Reproduce Error affects Runners seemingly at random. After the Runner tries to autoupdate and restarts it may or may not get stuck. We are running ~30 runners for the org.

Expected behavior Runner restarts and registers with GH

Runner Version and Platform

2.278.0 on Linux

What’s not working?

Starting Runner listener with startup type: service Started listener process An error occurred: Not configured Runner listener exited with error code 2 Runner listener exit with retryable error, re-launch runner in 5 seconds indefinitely

Runner and Worker’s Diagnostic Logs

[2021-04-23 17:20:03Z INFO HostContext] No proxy settings were found based on environmental variables (http_proxy/https_proxy/HTTP_PROXY/HTTPS_PROXY) [2021-04-23 17:20:03Z INFO HostContext] Well known directory ‘Bin’: ‘/runner/bin’ [2021-04-23 17:20:03Z INFO HostContext] Well known directory ‘Root’: ‘/runner’ [2021-04-23 17:20:03Z INFO HostContext] Well known config file ‘Credentials’: ‘/runner/.credentials’ [2021-04-23 17:20:03Z INFO Listener] Runner is built for Linux (X64) - linux-x64. [2021-04-23 17:20:03Z INFO Listener] RuntimeInformation: Linux 4.14.198-152.320.amzn2.x86_64 #1 SMP Wed Sep 23 23:57:28 UTC 2020. [2021-04-23 17:20:03Z INFO Listener] Version: 2.277.1 [2021-04-23 17:20:03Z INFO Listener] Commit: [2021-04-23 17:20:03Z INFO Listener] Culture: [2021-04-23 17:20:03Z INFO Listener] UI Culture: [2021-04-23 17:20:03Z INFO HostContext] Well known directory ‘Bin’: ‘/runner/bin’ [2021-04-23 17:20:03Z INFO HostContext] Well known directory ‘Root’: ‘/runner’ [2021-04-23 17:20:03Z INFO Listener] Validating directory permissions for: ‘/runner’ [2021-04-23 17:20:03Z INFO CommandLineParser] Parse [2021-04-23 17:20:03Z INFO CommandLineParser] Parsing 15 args [2021-04-23 17:20:03Z INFO CommandLineParser] parsing argument [2021-04-23 17:20:03Z INFO CommandLineParser] HasArgs: False [2021-04-23 17:20:03Z INFO CommandLineParser] Adding Command: configure [2021-04-23 17:20:03Z INFO CommandLineParser] parsing argument [2021-04-23 17:20:03Z INFO CommandLineParser] HasArgs: True [2021-04-23 17:20:03Z INFO CommandLineParser] arg: unattended [2021-04-23 17:20:03Z INFO CommandLineParser] parsing argument [2021-04-23 17:20:03Z INFO CommandLineParser] HasArgs: True [2021-04-23 17:20:03Z INFO CommandLineParser] arg: replace [2021-04-23 17:20:03Z INFO CommandLineParser] Adding flag: unattended [2021-04-23 17:20:03Z INFO CommandLineParser] parsing argument [2021-04-23 17:20:03Z INFO CommandLineParser] HasArgs: True [2021-04-23 17:20:03Z INFO CommandLineParser] arg: name [2021-04-23 17:20:03Z INFO CommandLineParser] Adding flag: replace [2021-04-23 17:20:03Z INFO CommandLineParser] parsing argument [2021-04-23 17:20:03Z INFO CommandLineParser] HasArgs: True [2021-04-23 17:20:03Z INFO CommandLineParser] Adding option ‘name’: ‘runners-hi-cpu-q6jhz-f45th’ [2021-04-23 17:20:03Z INFO CommandLineParser] parsing argument [2021-04-23 17:20:03Z INFO CommandLineParser] HasArgs: True [2021-04-23 17:20:03Z INFO CommandLineParser] arg: url [2021-04-23 17:20:03Z INFO CommandLineParser] parsing argument [2021-04-23 17:20:03Z INFO CommandLineParser] HasArgs: True [2021-04-23 17:20:03Z INFO CommandLineParser] Adding option ‘url’: ‘https://github.com/xxx-software’ [2021-04-23 17:20:03Z INFO CommandLineParser] parsing argument [2021-04-23 17:20:03Z INFO CommandLineParser] HasArgs: True [2021-04-23 17:20:03Z INFO CommandLineParser] arg: token [2021-04-23 17:20:03Z INFO CommandLineParser] parsing argument [2021-04-23 17:20:03Z INFO CommandLineParser] HasArgs: True [2021-04-23 17:20:03Z INFO CommandLineParser] Adding option ‘token’: ‘’ [2021-04-23 17:20:03Z INFO CommandLineParser] parsing argument [2021-04-23 17:20:03Z INFO CommandLineParser] HasArgs: True [2021-04-23 17:20:03Z INFO CommandLineParser] arg: runnergroup [2021-04-23 17:20:03Z INFO CommandLineParser] parsing argument [2021-04-23 17:20:03Z INFO CommandLineParser] HasArgs: True [2021-04-23 17:20:03Z INFO CommandLineParser] Adding option ‘runnergroup’: ‘’ [2021-04-23 17:20:03Z INFO CommandLineParser] parsing argument [2021-04-23 17:20:03Z INFO CommandLineParser] HasArgs: True [2021-04-23 17:20:03Z INFO CommandLineParser] arg: labels [2021-04-23 17:20:03Z INFO CommandLineParser] parsing argument [2021-04-23 17:20:03Z INFO CommandLineParser] HasArgs: True [2021-04-23 17:20:03Z INFO CommandLineParser] Adding option ‘labels’: ‘runners-hi-cpu’ [2021-04-23 17:20:03Z INFO CommandLineParser] parsing argument [2021-04-23 17:20:03Z INFO CommandLineParser] HasArgs: True [2021-04-23 17:20:03Z INFO CommandLineParser] arg: work [2021-04-23 17:20:03Z INFO CommandLineParser] parsing argument [2021-04-23 17:20:03Z INFO CommandLineParser] HasArgs: True [2021-04-23 17:20:03Z INFO CommandLineParser] Adding option ‘work’: '/runner/work’ [2021-04-23 17:20:03Z INFO Listener] Arguments parsed [2021-04-23 17:20:03Z INFO Runner] ExecuteCommand [2021-04-23 17:20:03Z INFO ConfigurationStore] currentAssemblyLocation: /runner/bin/Runner.Listener.dll [2021-04-23 17:20:03Z INFO HostContext] Well known directory ‘Bin’: ‘/runner/bin’ [2021-04-23 17:20:03Z INFO ConfigurationStore] binPath: /runner/bin [2021-04-23 17:20:03Z INFO HostContext] Well known directory ‘Bin’: ‘/runner/bin’ [2021-04-23 17:20:03Z INFO HostContext] Well known directory ‘Root’: ‘/runner’ [2021-04-23 17:20:03Z INFO ConfigurationStore] RootFolder: /runner [2021-04-23 17:20:03Z INFO HostContext] Well known directory ‘Bin’: ‘/runner/bin’ [2021-04-23 17:20:03Z INFO HostContext] Well known directory ‘Root’: ‘/runner’ [2021-04-23 17:20:03Z INFO HostContext] Well known config file ‘Runner’: ‘/runner/.runner’ [2021-04-23 17:20:03Z INFO ConfigurationStore] ConfigFilePath: /runner/.runner [2021-04-23 17:20:03Z INFO HostContext] Well known directory ‘Bin’: ‘/runner/bin’ [2021-04-23 17:20:03Z INFO HostContext] Well known directory ‘Root’: ‘/runner’ [2021-04-23 17:20:03Z INFO HostContext] Well known config file ‘Credentials’: ‘/runner/.credentials’ [2021-04-23 17:20:03Z INFO ConfigurationStore] CredFilePath: /runner/.credentials [2021-04-23 17:20:03Z INFO HostContext] Well known directory ‘Bin’: ‘/runner/bin’ [2021-04-23 17:20:03Z INFO HostContext] Well known directory ‘Root’: ‘/runner’ [2021-04-23 17:20:03Z INFO HostContext] Well known config file ‘MigratedCredentials’: ‘/runner/.credentials_migrated’ [2021-04-23 17:20:03Z INFO ConfigurationStore] MigratedCredFilePath: /runner/.credentials_migrated [2021-04-23 17:20:03Z INFO HostContext] Well known directory ‘Bin’: ‘/runner/bin’ [2021-04-23 17:20:03Z INFO HostContext] Well known directory ‘Root’: ‘/runner’ [2021-04-23 17:20:03Z INFO HostContext] Well known config file ‘Service’: ‘/runner/.service’ [2021-04-23 17:20:03Z INFO ConfigurationStore] ServiceConfigFilePath: /runner/.service [2021-04-23 17:20:03Z INFO CommandSettings] Flag ‘help’: ‘False’ [2021-04-23 17:20:03Z INFO CommandSettings] Flag ‘version’: ‘False’ [2021-04-23 17:20:03Z INFO CommandSettings] Flag ‘commit’: ‘False’ [2021-04-23 17:20:03Z INFO CommandSettings] Flag ‘check’: ‘False’ [2021-04-23 17:20:03Z INFO CommandSettings] Command ‘configure’: ‘True’ [2021-04-23 17:20:03Z INFO Terminal] WRITE LINE: [2021-04-23 17:20:03Z INFO Terminal] WRITE LINE: -------------------------------------------------------------------------------- [2021-04-23 17:20:03Z INFO Terminal] WRITE LINE: | ____ _ _ _ _ _ _ _ _ | [2021-04-23 17:20:03Z INFO Terminal] WRITE LINE: | / () || | | | | | / \ | |() ___ _ __ ___ | [2021-04-23 17:20:03Z INFO Terminal] WRITE LINE: | | | | | __| || | | | | ’ \ / _ \ / | | |/ _ | ’ / | | [2021-04-23 17:20:03Z INFO Terminal] WRITE LINE: | | || | | || _ | || | |) | / ___ \ (| || | () | | | _ \ | [2021-04-23 17:20:03Z INFO Terminal] WRITE LINE: | _||_|| ||_,|./ /_/ __|_||_/|| ||_/ | [2021-04-23 17:20:03Z INFO Terminal] WRITE LINE: | | [2021-04-23 17:20:03Z INFO Terminal] WRITE: | [2021-04-23 17:20:03Z INFO Terminal] WRITE: Self-hosted runner registration [2021-04-23 17:20:03Z INFO Terminal] WRITE LINE: | [2021-04-23 17:20:03Z INFO Terminal] WRITE LINE: | | [2021-04-23 17:20:03Z INFO Terminal] WRITE LINE: -------------------------------------------------------------------------------- [2021-04-23 17:20:03Z INFO ConfigurationManager] ConfigureAsync [2021-04-23 17:20:03Z INFO ConfigurationStore] IsConfigured() [2021-04-23 17:20:03Z INFO ConfigurationStore] IsConfigured: False [2021-04-23 17:20:03Z INFO ConfigurationManager] Is configured: False [2021-04-23 17:20:03Z INFO CommandSettings] Arg ‘url’: ‘https://github.com/xxx-software’ [2021-04-23 17:20:03Z INFO CommandSettings] Remove url from Arg dictionary. [2021-04-23 17:20:03Z INFO CommandSettings] Arg ‘token’: '’ [2021-04-23 17:20:03Z INFO CommandSettings] Remove token from Arg dictionary. [2021-04-23 17:20:13Z ERR Runner] System.Net.Http.HttpRequestException: Error while copying content to a stream. —> System.IO.IOException: The response ended prematurely. at System.Net.Http.HttpConnection.FillAsync() at System.Net.Http.HttpConnection.CopyToContentLengthAsync(Stream destination, UInt64 length, Int32 bufferSize, CancellationToken cancellationToken) at System.Net.Http.HttpConnection.ContentLengthReadStream.CompleteCopyToAsync(Task copyTask, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionResponseContent.SerializeToStreamAsync(Stream stream, TransportContext context, CancellationToken cancellationToken) at System.Net.Http.HttpContent.LoadIntoBufferAsyncCore(Task serializeToStreamTask, MemoryStream tempBuffer) — End of inner exception stack trace — at System.Net.Http.HttpContent.LoadIntoBufferAsyncCore(Task serializeToStreamTask, MemoryStream tempBuffer) at System.Net.Http.HttpClient.FinishSendAsyncBuffered(Task`1 sendTask, HttpRequestMessage request, CancellationTokenSource cts, Boolean disposeCts) at GitHub.Runner.Listener.Configuration.ConfigurationManager.GetTenantCredential(String githubUrl, String githubToken, String runnerEvent) at GitHub.Runner.Listener.Configuration.ConfigurationManager.ConfigureAsync(CommandSettings command) at GitHub.Runner.Listener.Runner.ExecuteCommand(CommandSettings command) [2021-04-23 17:20:13Z ERR Runner] ##################################################### [2021-04-23 17:20:13Z ERR Runner] System.IO.IOException: The response ended prematurely. at System.Net.Http.HttpConnection.FillAsync() at System.Net.Http.HttpConnection.CopyToContentLengthAsync(Stream destination, UInt64 length, Int32 bufferSize, CancellationToken cancellationToken) at System.Net.Http.HttpConnection.ContentLengthReadStream.CompleteCopyToAsync(Task copyTask, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionResponseContent.SerializeToStreamAsync(Stream stream, TransportContext context, CancellationToken cancellationToken) at System.Net.Http.HttpContent.LoadIntoBufferAsyncCore(Task serializeToStreamTask, MemoryStream tempBuffer) [2021-04-23 17:20:13Z ERR Terminal] WRITE ERROR: Error while copying content to a stream. [2021-04-23 17:20:13Z INFO Listener] Runner execution has finished with return code 1

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Puneeth-ncommented, May 26, 2021

@valeramaniukIHM Thanks for the reply. I was already on 0.18.2 of the controller. I figured this happens when we run out of API limits, Runners cannot join GitHub. I switched to purely webhook based scaling in https://github.com/summerwind/actions-runner-controller and that seems to have fixed the issue.

1reaction
valeramaniukIHMcommented, May 25, 2021

@Puneeth-n yep, updating to the latest version of https://github.com/summerwind/actions-runner-controller did the trick. Now the controller knows how to identify and restart stuck runners. Thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Monitoring and troubleshooting self-hosted runners
Check that your self-hosted runner has Docker installed and that the service is running.
Read more >
Troubleshoot self-hosted runner
No pod has been created in the Kuberenetes cluster. You will need to correct the task pod configuration as described on the Conatiner...
Read more >
Error "Waiting for a runner to pick up this job" using GitHub ...
This is a free repo so it was strange. After 3hrs I've cancelled the job and when I've re-ran it got a runner...
Read more >
Pipeline gets stuck in a job when a self-hosted runner ...
Summary Im launching a self-hosted runner using CML, that its picking a job of the pipeline shown below. If I disconnect...
Read more >
Runners are pending for a while (#27269) · Issues
I feel I'm missing something configuration-wise. Project timeout is 1h, there's no runner-specific timeout set. Any idea why that would happen, ...
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