MongoServerSelectionError: Server selection timed out after 2000 ms
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 30/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- docker, mongodb, shell
- Domain
- database, devops, infrastructure
Research direction
Start by running bin/up and checking the Mongo container's health and startup output on the reported Ubuntu and Docker versions. Compare the timeout with the mongo container logs and the configuration used by bin/up. Done means the MongoDB container becomes healthy and bin/up completes without repeated server-selection timeouts.
Written by the indexing model from the issue text.
Description
commit:
3c5ef041a4d510d74cf8bc4a7ee871d125ab99fe
Timed out in connecting to the MongoDB server:
$ bin/up
Initiating Mongo replica set...
[+] Running 1/1
✔ Container mongo Started 0.3s
MongoServerSelectionError: Server selection timed out after 2000 ms
Waiting for Mongo...
MongoServerSelectionError: Server selection timed out after 2000 ms
Waiting for Mongo...
^Cexit status 130
The container is unhealthy:
$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
4e6f794868a0 mongo:8.0 "docker-entrypoint.s…" 8 minutes ago Up 8 minutes (unhealthy) 27017/tcp mongo
OS information:
$ uname -r
6.8.0-87-generic
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 24.04.3 LTS
Release: 24.04
Codename: noble
Docker version:
$ docker version
Client: Docker Engine - Community
Version: 28.5.1
API version: 1.51
Go version: go1.24.8
Git commit: e180ab8
Built: Wed Oct 8 12:17:26 2025
OS/Arch: linux/amd64
Context: default
Server: Docker Engine - Community
Engine:
Version: 28.5.1
API version: 1.51 (minimum version 1.24)
Go version: go1.24.8
Git commit: f8215cc
Built: Wed Oct 8 12:17:26 2025
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: v1.7.28
GitCommit: b98a3aace656320842a23f4a392a33f46af97866
runc:
Version: 1.3.0
GitCommit: v1.3.0-0-g4ca628d1
docker-init:
Version: 0.19.0
GitCommit: de40ad0
Has anyone encountered this problem? I don't know how to fix this.
- Dominant language
- Shell
- Stars
- 1.3k
- Forks
- 310
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 1
Getting set up
We have not checked this project's setup files yet. Start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from overleaf/toolkit
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
All issues in overleaf/toolkit
Similar issues
-
out-of-date
Difficulty 1/5 Under an hour Newbie friendliness 82/100
CachyOS/CachyOS-PKGBUILDS#1917 ·
Maintainers usually reply within 1 day
-
package-update
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
EmbarkStudios/cargo-about#323 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
vllm-project/vllm-metal#841 ·
Maintainers usually reply within 1 day