CONNECTION_TIMEOUT
cicd
network_error
ai_generated
true
Error: Failed to connect to github.com port 443: Connection timed out
ID: cicd/github-actions-connect-timeout
80%Fix Rate
85%Confidence
1Evidence
2023-05-12First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| GitHub Actions Runner 2.308.0 | active | — | — | — |
| Ubuntu 22.04 | active | — | — | — |
| Windows Server 2022 | active | — | — | — |
Root Cause
GitHub Actions runner cannot reach github.com due to DNS resolution failures, firewall rules, or proxy misconfiguration in the runner environment.
generic中文
GitHub Actions 运行器无法访问 github.com,原因是运行器环境中的 DNS 解析失败、防火墙规则或代理配置错误。
Official Documentation
https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/about-self-hosted-runners#communication-between-self-hosted-runners-and-githubWorkarounds
-
85% success Configure proxy environment variables on the runner: export http_proxy=http://proxy.example.com:8080; export https_proxy=http://proxy.example.com:8080; export no_proxy=localhost,127.0.0.1
Configure proxy environment variables on the runner: export http_proxy=http://proxy.example.com:8080; export https_proxy=http://proxy.example.com:8080; export no_proxy=localhost,127.0.0.1
-
75% success Update DNS resolver on the runner host: echo 'nameserver 8.8.8.8' > /etc/resolv.conf
Update DNS resolver on the runner host: echo 'nameserver 8.8.8.8' > /etc/resolv.conf
-
80% success Check firewall rules to allow outbound HTTPS (port 443) to github.com IP ranges: nslookup github.com; sudo ufw allow out on eth0 to any port 443 proto tcp
Check firewall rules to allow outbound HTTPS (port 443) to github.com IP ranges: nslookup github.com; sudo ufw allow out on eth0 to any port 443 proto tcp
中文步骤
Configure proxy environment variables on the runner: export http_proxy=http://proxy.example.com:8080; export https_proxy=http://proxy.example.com:8080; export no_proxy=localhost,127.0.0.1
Update DNS resolver on the runner host: echo 'nameserver 8.8.8.8' > /etc/resolv.conf
Check firewall rules to allow outbound HTTPS (port 443) to github.com IP ranges: nslookup github.com; sudo ufw allow out on eth0 to any port 443 proto tcp
Dead Ends
Common approaches that don't work:
-
Restarting the runner service without checking network connectivity
95% fail
The underlying network issue persists after restart; runner will hit the same timeout on next job.
-
Adding more retries via workflow configuration (e.g., 'retry-on-error: true')
90% fail
GitHub Actions retries only the step, not the underlying TCP connection; connection timeout is fatal and not recoverable by retrying the step.
-
Clearing runner cache and reinstalling the runner agent
85% fail
The runner agent itself is functional; the issue is at the network layer, not the agent software.