claude-code - 💡(How to fix) Fix [BUG] Unable to connect to API : TCP shows ESTAB but app reports ConnectionRefused on prompt input

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

Error: Unable to connect to API (ConnectionRefused) despite established TCP connections

Error Messages/Logs

RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

Fedora 42, kernel 6.18 Was working, last use was several weeks ago 64GB RAM, no proxy, no VPN curl connects fine, ss shows ESTAB connections to 160.79.104.10:443 Auth token valid, login succeeds SELinux permissive makes no difference Both npm and standalone installer fail identically Error: Unable to connect to API (ConnectionRefused) despite established TCP connections

What Should Happen?

Claude should respond to prompt

Error Messages/Logs

Steps to Reproduce

launch claude enter Hello Claude --or any text

Claude Model

Sonnet (default)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

2.1.150

Platform

Anthropic API

Operating System

Other Linux

Terminal/Shell

Other

Additional Information

TCP is fully established — ss -tp shows 7 ESTAB connections to 160.79.104.10:443 while Claude Code reports ConnectionRefused. This rules out network/firewall as the cause and points to something in Bun's application layer above the socket. Direct API curl works — token is valid, API responds, TLS handshake succeeds. Environment:

Fedora 42, kernel 6.18.13-100.fc42 64GB RAM, no swap pressure No proxy, no VPN, no custom SSL certs SELinux set to Permissive — no change IPv6 disabled in /etc/hosts — no change Both npm install and standalone installer fail identically NODE_OPTIONS=--dns-result-order=ipv4first — no change CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1 — no change SSL_CERT_FILE=/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem — no change

Was working previously — stopped working on or around May 2026. No system changes on that date except earlyoom and Intel compute runtime/media driver installs (confirmed unrelated). Debug log shows:

CA certs: Config fallback - globalEnv keys: , settingsEnv keys: CLAUDE_CODE_ENABLE_TELEMETRY, CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC, CLAUDE_CODE_ATTRIBUTION_HEADER The CA cert fallback line may be significant — Bun may not be finding Fedora's CA bundle at /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem even when explicitly set via SSL_CERT_FILE.

Version: 2.1.150 standalone installer. Also tested 2.1.120 via npm — same failure.

The CA cert fallback is the most actionable lead for Anthropic — it's the one thing in the debug log that's anomalous and hasn't been fully explained.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING