[BUG] Claude Code 2.1.193 on Linux: getaddrinfo EREFUSED on all Anthropic domains
Open 💬 1 comment Opened Jun 27, 2026 by moswil
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Description:
Claude Code 2.1.193 fails to connect to any Anthropic service with getaddrinfo EREFUSED errors, but system curl works fine.
Environment:
- OS: Linux
- Location: Kenya
- Claude Code version: 2.1.193
- Commit: a1938d2a07a2
- Platform: linux-x64
Errors:
Failed to connect to api.anthropic.com: EREFUSED
Failed to connect to platform.claude.com: EREFUSED
Failed to fetch version from https://downloads.claude.ai/claude-code-releases/latest: getaddrinfo EREFUSED downloads.claude.ai
What works:
ping 8.8.8.8— succeedscurl -v https://api.anthropic.com— succeeds (HTTP/2 404)curl -v https://downloads.claude.ai— succeeds (HTTP/2 403)
What fails:
claude login— getaddrinfo EREFUSED api.anthropic.comclaude auth login— getaddrinfo EREFUSED platform.claude.comclaude update— getaddrinfo EREFUSED downloads.claude.ai
Diagnosis:
Claude Code's bundled DNS resolver fails on Anthropic domains, but the system resolver (used by curl) works. This suggests a compatibility issue with Claude Code's DNS library in this network environment.
Output of claude doctor:
Diagnostics ✔
├ Currently running: native (2.1.193)
├ Commit: a1938d2a07a2
├ Platform: linux-x64
├ Path: /home/moswil/snap/code/247/.local/share/claude/versions/2.1.193
├ Config install method: native
└ Search: OK (bundled)
Updates ⚠
├ Auto-updates: enabled
├ Auto-update channel: latest
├ Last update attempt: failed (install_failed) — 2026-06-27
└ Failed to fetch versions
Background server ◯
├ Mode: ephemeral
└ See claude daemon status for details
Remote Control ⚠
├ Remote Control requires a claude.ai subscription. Run claude auth login to sign in with your claude.ai account.
├ Not signed in to claude.ai
├ claude.ai subscription auth not active
├ Sign-in is missing the user:profile scope
└ Organization not resolved
Version locks ✔
└ 2.1.193: PID 853212 (running)
What Should Happen?
Successful login
Error Messages/Logs
Steps to Reproduce
claudeclaude auth login
Claude Model
None
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.195 (Claude Code)
Platform
Other
Operating System
Ubuntu/Debian Linux
Terminal/Shell
VS Code integrated terminal
Additional Information
_No response_
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗