rs.initiate failed: member not reachable / no host described in new configuration MongoDB Origin: Data OSI layer 7 · Application Last updated 5 Nov 2026

MongoDB: replSetInitiate quorum check failed: Could not connect to mongo2:27017 / No host described in new configuration 1 for replica set rs0 maps to this node

rs.initiate()/rs.add() couldn't reach a listed member or the config doesn't include the current node's hostname.

Exact message you may see replSetInitiate quorum check failed because not all proposed set members responded affirmativelyNo host described in new configuration for replica set maps to this nodeMongoServerError: replSetInitiate quorum check failedNodeNotFound: Quorum check failed because not enough voting nodes respondedCould not connect to mongo2:27017 rs.initiate
Seen on: MongoDB Docker

Meaning

Each host in the config must resolve and be reachable from every other member (and listed exactly as it will be addressed). In Docker use service names on one network, not localhost. Ensure bindIp allows the interface, firewalls permit 27017, and the host in config matches what the node thinks it is (--bind_ip_all in containers).

Common causes

  • Hostname not resolvable between members
  • bindIp excludes the interface
  • localhost used in config
  • Firewall blocks 27017
  • Member not running yet

⚡ Quick fix

  1. Use resolvable hostnames/service names in rs.initiate
  2. Start all members and verify nc -vz host 27017 from each
  3. Set --bind_ip_all in containers

Detailed fix by platform

mongosh

  1. rs.initiate({ _id: "rs0", members: [{ _id: 0, host: "mongo1:27017" }, { _id: 1, host: "mongo2:27017" }] })

How to diagnose

  1. DNS — Resolvable?
  2. Reachability — Port open?
  3. Hostnames — Match config?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Data. Errors that are often confused with or caused by this one (click to open):

AlreadyInitialized: already initialized — MongoServerError: already initialized (rs.initiate on a configured replica set) (MongoDB)AlreadyInitialized: a…Can't connect from another host (bindIp 127.0.0.1) — MongoDB: connection refused / timed out from a remote host — mongod bindIp defaults to 127.0.0.1 (MongoDB)Can't connect from an…CannotPullContainerError — ECS task stopped: CannotPullContainerError: pull image manifest has been retried ... / ref pull has been retried (AWS)CannotPullContainerEr…Could not find host matching read preference — MongoServerSelectionError: Could not find host matching read preference { mode: "secondary" } for set rs0 (MongoDB)Could not find host m…default backend - 404 — Ingress returns "404 Not Found" / "default backend - 404" (ingress-nginx) (Kubernetes)default backend - 404DNS in pod — DNS not working inside a Kubernetes pod (could not resolve host / nslookup: can't resolve) (Kubernetes)DNS in podFailedCreatePodSandBox — Failed to create pod sandbox: plugin type="calico" failed (add): ... (FailedCreatePodSandBox) (Kubernetes)FailedCreatePodSandBoxiptables: No chain/target/match — driver failed programming external connectivity on endpoint: iptables: No chain/target/match by that name (Docker)iptables: No chain/ta…rs.initia…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.