Error map

No primary found in replica set / ReplicaSetNoPrimary MongoServerSelectionError: Server selection timed out after 30000 ms — topology type ReplicaSetNoPrimary

MongoDB · layer 5, Data

Open the full error page →

Centre: this error. First ring: errors it is linked with (9). Outer ring: what those are linked with. Colours show the layer of a request each error belongs to. Click any dot to re-centre the map on it; hover to follow its connections. The centre dot opens the error page.

No primary found in replica set / ReplicaSetNoPrimary — MongoServerSelectionError: Server selection timed out after 30000 ms — topology type ReplicaSetNoPrimary (MongoDB)No primary …MongoServerSelectionError — MongooseServerSelectionError: connect ECONNREFUSED 127.0.0.1:27017 (Node.js)MongoServerSelectio…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…AlreadyInitialized: already initialized — MongoServerError: already initialized (rs.initiate on a configured replica set) (MongoDB)AlreadyInitialized:…MongoNetworkError: connect ECONNREFUSED 127.0.0.1:27017 — MongoDB: MongoServerSelectionError: connect ECONNREFUSED 127.0.0.1:27017 (MongoDB)MongoNetworkError: …Secondary too stale to catch up (RECOVERING) — MongoDB: We are too stale to use X as a sync source / replSet too stale to catch up — member in RECOVERING state (MongoDB)Secondary too stale…Transaction numbers are only allowed on a replica set member or mongos — MongoServerError: Transaction numbers are only allowed on a replica set member or mongos (MongoDB)Transaction numbers…NotWritablePrimary: not primary and secondaryOk=false — MongoServerError: not primary and secondaryOk=false / NotWritablePrimary: not master (MongoDB)NotWritablePrimary:…CursorNotFound: cursor id not found — MongoServerError: cursor id 1234567890 not found (CursorNotFound) (MongoDB)CursorNotFound: cur…rs.initiate failed: member not reachable / no host described in new configuration — 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 (MongoDB)rs.initiate failed:…ECONNREFUSED — Error: connect ECONNREFUSED 127.0.0.1:5432 (Node.js)ECONNREFUSEDbuffering timed out — MongooseError: Operation `users.find()` buffering timed out after 10000ms (Node.js)buffering timed outCastError ObjectId — CastError: Cast to ObjectId failed for value "x" (type string) at path "_id" (Node.js)CastError ObjectIdSort/Group exceeded memory limit of 100 MB (allowDiskUse) — MongoServerError: Exceeded memory limit for $group, but didn't allow external sort. Pass allowDiskUse:true to opt in (MongoDB)Sort/Group exceeded…bad auth : Authentication failed — MongoDB: MongoServerError: bad auth : Authentication failed (code 8000 / 18) (MongoDB)bad auth : Authenti…MongoParseError — MongoDB: MongoParseError: Invalid scheme, expected connection string to start with "mongodb://" or "mongodb+srv://" (MongoDB)MongoParseErrorCan'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 …Unclean shutdown: mongod.lock not empty / repair needed — MongoDB: Detected unclean shutdown - /var/lib/mongodb/mongod.lock is not empty (MongoDB)Unclean shutdown: m…WiredTiger: No space left on device — MongoDB: WiredTiger error (28) [...] No space left on device / Fatal assertion 28558 ... disk full (MongoDB)WiredTiger: No spac…WriteConflict: Write conflict during plan execution — MongoServerError: WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction (MongoDB)WriteConflict: Writ…NoSuchTransaction: Transaction was aborted or expired — MongoServerError: Transaction 1 has been aborted / NoSuchTransaction: transaction has expired (transactionLifetimeLimitSeconds) (MongoDB)NoSuchTransaction: …READONLY You can't write against a read only replica — Redis: READONLY You can't write against a read only replica (Redis)READONLY You can't …MongoDB Atlas: connection timed out — IP not whitelisted — MongoServerSelectionError: Could not connect to any servers in your MongoDB Atlas cluster. One common reason is that you're trying to access the database from an IP that isn't whitelisted (MongoDB)MongoDB Atlas: conn…Atlas: bad auth: Authentication failed — MongoServerError: bad auth : Authentication failed. (Atlas user / special characters in password) (MongoDB)Atlas: bad auth: Au…BSONObj size is invalid / exceeds maximum document size (16MB) — MongoServerError: BSONObj size: 17825792 (0x1100000) is invalid. Size must be between 0 and 16793600(16MB) (MongoDB)BSONObj size is inv…CannotPullContainerError — ECS task stopped: CannotPullContainerError: pull image manifest has been retried ... / ref pull has been retried (AWS)CannotPullContainer…network not found — Error response from daemon: network X not found (Docker)network not foundPool overlaps — Error response from daemon: Pool overlaps with other one on this address space (Docker)Pool overlaps

Directly related (9)

MongoServerSelectionErrorNode.js

MongooseServerSelectionError: connect ECONNREFUSED 127.0.0.1:27017

The MongoDB driver couldn’t find a reachable server for the connection string.

Could not find host matching read preferenceMongoDB

MongoServerSelectionError: Could not find host matching read preference { mode: "secondary" } for set rs0

The requested read preference (secondary, nearest with tags) matches no available member.

AlreadyInitialized: already initializedMongoDB

MongoServerError: already initialized (rs.initiate on a configured replica set)

`rs.initiate()` was called on a node that already has a replica set configuration.

MongoNetworkError: connect ECONNREFUSED 127.0.0.1:27017MongoDB

MongoDB: MongoServerSelectionError: connect ECONNREFUSED 127.0.0.1:27017

The driver couldn't connect to a MongoDB server on localhost:27017 — nothing is listening there.

Secondary too stale to catch up (RECOVERING)MongoDB

MongoDB: We are too stale to use X as a sync source / replSet too stale to catch up — member in RECOVERING state

A secondary fell so far behind that the primary's oplog no longer covers the gap, so it can't resync by replaying.

Transaction numbers are only allowed on a replica set member or mongosMongoDB

MongoServerError: Transaction numbers are only allowed on a replica set member or mongos

You started a transaction (or used retryWrites) on a standalone MongoDB server, which doesn't support them.

NotWritablePrimary: not primary and secondaryOk=falseMongoDB

MongoServerError: not primary and secondaryOk=false / NotWritablePrimary: not master

A write (or read without secondary preference) hit a secondary — the primary changed or you connected directly to a secondary.

CursorNotFound: cursor id not foundMongoDB

MongoServerError: cursor id 1234567890 not found (CursorNotFound)

A cursor you were iterating timed out or was killed on the server, so the next batch fails.

rs.initiate failed: member not reachable / no host described in new configurationMongoDB

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.

Two steps away (18)

ECONNREFUSEDNode.js

Error: connect ECONNREFUSED 127.0.0.1:5432

Nothing is listening at that host:port — the target service is down or you’re connecting to the wrong address.

buffering timed outNode.js

MongooseError: Operation `users.find()` buffering timed out after 10000ms

Mongoose queued a query waiting for a connection that never opened.

CastError ObjectIdNode.js

CastError: Cast to ObjectId failed for value "x" (type string) at path "_id"

A value that isn’t a valid 24-hex-character ObjectId was used in an _id query.

Sort/Group exceeded memory limit of 100 MB (allowDiskUse)MongoDB

MongoServerError: Exceeded memory limit for $group, but didn't allow external sort. Pass allowDiskUse:true to opt in

An aggregation stage needed more than 100 MB of RAM and spilling to disk wasn't enabled.

bad auth : Authentication failedMongoDB

MongoDB: MongoServerError: bad auth : Authentication failed (code 8000 / 18)

MongoDB (often Atlas) rejected the username/password in the connection string.

MongoParseErrorMongoDB

MongoDB: MongoParseError: Invalid scheme, expected connection string to start with "mongodb://" or "mongodb+srv://"

The connection string is missing, malformed, or the environment variable holding it is undefined.

Can't connect from another host (bindIp 127.0.0.1)MongoDB

MongoDB: connection refused / timed out from a remote host — mongod bindIp defaults to 127.0.0.1

MongoDB only listens on localhost by default, so remote clients can't connect.

Unclean shutdown: mongod.lock not empty / repair neededMongoDB

MongoDB: Detected unclean shutdown - /var/lib/mongodb/mongod.lock is not empty

MongoDB wasn't shut down cleanly (crash/power loss), so it warns or refuses to start without recovery.

WiredTiger: No space left on deviceMongoDB

MongoDB: WiredTiger error (28) [...] No space left on device / Fatal assertion 28558 ... disk full

MongoDB ran out of disk space on the data volume and stopped or refuses writes.

WriteConflict: Write conflict during plan executionMongoDB

MongoServerError: WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction

Two operations tried to modify the same document at once; one was aborted with a transient error.

NoSuchTransaction: Transaction was aborted or expiredMongoDB

MongoServerError: Transaction 1 has been aborted / NoSuchTransaction: transaction has expired (transactionLifetimeLimitSeconds)

A transaction ran longer than the allowed lifetime (60 s default) or was aborted, so later operations fail.

READONLY You can't write against a read only replicaRedis

Redis: READONLY You can't write against a read only replica

The client is connected to a replica (or a failed-over node) and tried to write.

MongoDB Atlas: connection timed out — IP not whitelistedMongoDB

MongoServerSelectionError: Could not connect to any servers in your MongoDB Atlas cluster. One common reason is that you're trying to access the database from an IP that isn't whitelisted

Atlas rejects connections from IP addresses that aren't in the project's Network Access list.

Atlas: bad auth: Authentication failedMongoDB

MongoServerError: bad auth : Authentication failed. (Atlas user / special characters in password)

Atlas rejected the username/password in the connection string.

BSONObj size is invalid / exceeds maximum document size (16MB)MongoDB

MongoServerError: BSONObj size: 17825792 (0x1100000) is invalid. Size must be between 0 and 16793600(16MB)

A single document (or an aggregation result row) grew past MongoDB's 16 MB limit.

CannotPullContainerErrorAWS

ECS task stopped: CannotPullContainerError: pull image manifest has been retried ... / ref pull has been retried

The ECS task couldn’t pull its image — no network route to the registry, missing ECR permissions, or a wrong image tag.

network not foundDocker

Error response from daemon: network X not found

The container or Compose project refers to a Docker network that doesn’t exist (any more).

Pool overlapsDocker

Error response from daemon: Pool overlaps with other one on this address space

Docker tried to create a network whose subnet clashes with an existing Docker network (or a VPN/host route).