# Error: The runner 'self-hosted-runner-01' is offline and cannot accept jobs. Ensure the runner is running and connected.

- **ID:** `cicd/github-actions-self-hosted-runner-offline`
- **Domain:** cicd
- **Category:** system_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

The self-hosted GitHub Actions runner has lost connection to GitHub due to network issues, stale runner process, or token expiration, preventing job assignment.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| GitHub Actions runner 2.300.0 | active | — | — |
| Ubuntu 22.04 | active | — | — |
| Windows Server 2022 | active | — | — |

## Workarounds

1. **Run the runner's config script with --replace to regenerate the token and reconnect: ./config.sh remove --token <token> && ./config.sh --url https://github.com/org/repo --token <new_token>** (85% success)
   ```
   Run the runner's config script with --replace to regenerate the token and reconnect: ./config.sh remove --token <token> && ./config.sh --url https://github.com/org/repo --token <new_token>
   ```
2. **Check runner logs at ~/actions-runner/_diag/Runner_*.log for specific errors (e.g., HTTP 401) and fix network or proxy settings accordingly.** (75% success)
   ```
   Check runner logs at ~/actions-runner/_diag/Runner_*.log for specific errors (e.g., HTTP 401) and fix network or proxy settings accordingly.
   ```

## Dead Ends

- **** — Restarting the runner service without checking logs may mask underlying issues like token expiry. (40% fail)
- **** — Uninstalling and re-installing the runner is overkill and loses configuration; often a simple reconnect suffices. (20% fail)
- **** — Killing the runner process and restarting may not fix token issues if the runner is not properly re-authenticated. (30% fail)
