Skip to content

[Docs] Troubleshooting section "Runner pods terminate immediately after starting" added #3916

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion TROUBLESHOOTING.md
Original file line number Diff line number Diff line change
@@ -327,4 +327,20 @@ spec:
spec:
dockerVarRunVolumeSizeLimit: 50M
env: []
```
```

### Runner pods terminate immediately after starting

**Problem**

If your runner-controller-listener pods are functioning correctly but the runner pods terminate immediately after starting, you may need to debug the issue using the default Docker image. Use the ghcr.io/actions/actions-runner:latest image and check the runner logs before the pods terminate.

You can use the following command as a boilerplate to retrieve the logs:`kubectl logs $(kubectl get pods --namespace=<your-namespace> | grep '<pod-name-prefix>' | awk '{print $1}') --namespace=<your-namespace>`

If you see anything like this `POST request to https://pipelinesghubeus23.actions.githubusercontent.com/#TOKEN#/_apis/oauth2/token failed. HTTP Status: BadRequest` this may apply.

**Solution**

Ensure that the system time on all individual Kubernetes nodes is synchronized. The GitHub API that creates the JIT tokens checks the HTTP headers' time, and even a 10-minute clock skew can cause the API to fail.

You can synchronize the time on your nodes using `timedatectl set-ntp yes`. This command will enable NTP (Network Time Protocol) on your node, ensuring that the system time is accurate.