// troubleshooting guide · cockroachdb

CockroachDB Connection Refused / Cannot Connect Fix

Status
Ongoing
platforms:
Self-hosted and CockroachDB Cloud
updated:
November 15, 2026
reports:
4
Method
how we research
Share

RUNBOOK · cockroachdb/connection-refused4 FIXES

// quick answer

CockroachDB 'connection refused' or 'cannot connect' errors usually mean the node is down, the wrong port or host is used, TLS certificates do not match, or a firewall blocks 26257.

Most likely fix: Check the node

How to fix it

// try these in order, the most common fix is first

  1. FIX 1Check the node

    1. 01Run cockroach node status --certs-dir=... or check the process and logs
    2. 02Restart a crashed node and check for OOM kills in system logs
    Did this fix it?
  2. FIX 2Check address and ports

    1. 01Confirm the connection string host, port 26257 and sslmode
    2. 02Verify --listen-addr and --advertise-addr are reachable from the client
    3. 03Open 26257 in firewalls and security groups
    Did this fix it?
  3. FIX 3Check certificates

    1. 01Verify CA and node certs with cockroach cert list
    2. 02Make sure the host name is in the node certificate SANs
    3. 03Renew expired certificates
    Did this fix it?
  4. FIX 4Cloud clusters

    1. 01Add your IP to the network allowlist or use a private connection
    2. 02Copy the connection string from the Cloud Console, including the cluster CA cert
    Did this fix it?

Symptoms

dial tcp connection refused; failed to connect to host; x509 certificate errors; client can reach the DB Console (8080) but not SQL (26257).

Why it happens

  • C-01Node or process not running or crashed (out of memory)
  • C-02Wrong host, port (SQL 26257, DB Console 8080) or --listen-addr/--advertise-addr
  • C-03Firewall, security group or load balancer blocking 26257
  • C-04TLS certificate expired or not valid for the host name used
  • C-05Cluster lost quorum so no node can serve requests
  • C-06Cloud: IP allowlist does not include your address

// this guide also covers

  • cockroachdb connection refused
  • cockroachdb cannot connect
  • cockroachdb x509 certificate error
  • cockroachdb port 26257
  • cockroachdb connection timeout

Still not working?

If CockroachDB keeps failing, you're not alone. See every CockroachDB problem users report or the alternatives people switch to.

Have an app idea? Our small team builds any software: web and mobile apps, games, desktop, AI tools. Price agreed together.

Talk to us

Watch CockroachDB Get an email when its price changes, it has an outage, or we publish a new fix. No spam.

Fixed it? Share this guide

The same problem in other apps

All not loading, error messages & connection guides →

Other CockroachDB errors