actions / actions/runner

Workflow failure due to runner shutdown/stoppage

Open
#2,040 22 comments 16 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug needs-investigation Runner Bug
Dominant language
C#
Stars
6.3k
Forks
1.4k
Avg merge
1d 16h
Merged PRs (30d)
24

Description

Description

Since 30 July 2022, our workflow fails with the following message:

"The self-hosted runner: ***** lost communication with the server. Verify the machine is running and has a healthy network connection. Anything in your workflow that terminates the runner process, starves it for CPU/Memory, or blocks its network access can cause this error."

We run our workflow on an AWS EC2 instance which is always connected and has enough resources (CPU/memory). The above failure happens even for the parts of the workflow that don't require high utilization of CPU/memory.

It seems that runner loses communication with GitHub and does not continue running the job.

Log

[2022-08-05 09:05:47Z INFO JobServer] Caught exception during append web console line to websocket, let's fallback to sending via non-websocket call (total calls: 48, failed calls: 2, websocket state: Open).
[2022-08-05 09:05:47Z ERR JobServer] System.Net.WebSockets.WebSocketException (0x80004005): The remote party closed the WebSocket connection without completing the close handshake.
---> System.IO.IOException: Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host..
---> System.Net.Sockets.SocketException (10054): An existing connection was forcibly closed by the remote host.

Runner Version and Platform

Version 2.294.0 and runs on Windows Server 2016

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the provided JobServer WebSocketException log and the runner version and platform details: runner 2.294.0 on Windows Server 2016 in AWS EC2. Investigate the runner's communication path and reproduce or isolate the WebSocket disconnect; done means the workflow no longer loses runner communication or the failure has a documented root cause.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, csharp
Domain
ci-cd, cloud, infrastructure, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.