Skip to content

CodeBuild-based GitHub runner failed to receive only running action from GitHub

0

We have a GitHub actions workflow with only one job which successfully starts GitHub runners with on-demand EC2 aws/codebuild/standard:7.0 Ubuntu, and it's generally working, even if a few builds run at the same time.

We encountered a problem with a build, Correlation ID: 922a9c92-8853-4d13-a7f4-efb3979896ee. It was the only build running at the time - there's a clear 10-15 minutes with no other activity in the queue, for the only repo in the organisation (though the account has more organisations).

This build started the runner in CodeBuild, and the CodeBuild log showed the action's URL-path then reported '√ Connected to GitHub // Current runner version: '2.328.0' // 2025-09-23 17:20:48Z: Listening for Jobs', but GitHub's action just reported

2 errors
Internal server error. Correlation ID: 922a9c92-8853-4d13-a7f4-efb3979896ee
The job was not acquired by Runner of type self-hosted even after multiple attempts
build
Started 14h 12m 33s ago (2025-09-23 18:23 GMT+1)

Amazon Q excitedly claimed that this sort of thing is common, but that sounds quite strange.

  1. Is Q correct?
  2. What sort of failure rate are most people seeing? (I'll scan our logs to see whether this has happened before, but I don't think it has)
  3. Are there debugging things we can enable? Like... getting the nature of the connection failure from GitHub's end.

I notice that there are (somehow) multiple webhooks registered to CodeBuild for this repo, and for this particular build only one made it through. (The other hooks reported {"message":"Project name in label -redacted- did not match actual project name"} so I'm guessing they're ). Since the GitHub task continued to run for 8m18s, I'm guessing that the delivery failures on the other hooks didn't actually cause problems, but I'll pursue identifying and removing them anyway and I'll follow-up if we see a similar failure after that.

The only other coincidence I notice is that one completely unrelated action (different branch) completed just as the new one started:

  • 2025-09-23 18:20:33 9bf61e00-98a1-11f0-9851-efee99ea19f3 workflow_job.completed
  • 2025-09-23 18:20:33 9bd77270-98a1-11f0-87f1-ed8f27761fbd workflow_job.queued

Maybe there's a race condition of some sort in GitHub? Also seems a bit unlikely.

1 Answer
0

This issue with CodeBuild GitHub runners failing to connect with GitHub Actions jobs does occur occasionally and is a known problem.

Based on the information provided, there are several potential causes for your specific failure:

  1. Webhook configuration issues: You mentioned multiple webhooks registered to CodeBuild for the same repository, with some reporting errors like "Project name in label did not match actual project name." This mismatch can cause connection problems between GitHub and CodeBuild.

  2. Label configuration problems: When GitHub routes self-hosted jobs, it requires exact label matching. If there's any inconsistency in how your labels are configured, this can cause jobs to hang with the "not acquired by Runner" error you're seeing.

  3. Race condition: Your observation about the timing of the completed and queued workflow jobs could indicate a race condition. When one job completes just as another is queued, there might be issues with resource allocation or webhook processing.

Regarding your specific questions:

  1. Yes, this type of issue does occur with CodeBuild GitHub runners, particularly when there are multiple jobs or label configuration issues.

  2. Failure rates vary by setup, but some users report intermittent failures even after periods of stability. The issue can appear randomly, making it difficult to predict.

  3. For debugging:

  • Review webhook delivery logs in GitHub to check for specific error messages
  • Ensure consistent label configurations across all jobs
  • Verify that your CodeBuild project has proper permissions
  • Check for any build queue limits in your AWS account
  • Examine the GitHub webhook response logs for error messages

The correlation ID you provided (922a9c92-8853-4d13-a7f4-efb3979896ee) would be useful for AWS Support if you need to escalate the issue.

Cleaning up the duplicate webhooks is a good first step. Also, ensure that your runner labels are consistently applied and that you don't have any conflicting configurations between jobs.
Sources
Codebuild as Github Actions Runner - Error when extracting the runner | AWS re:Post
CodeBuild GitHub runners are randomly failing | AWS re:Post
Troubleshoot the webhook - AWS CodeBuild

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.