MongoDB Timeout error while connecting with replicaset
If you are facing Timed out after 30000 ms while while waiting for a server, here are few solutions you need to check. check the docker configuration is proper check any other versions of mongo is running in your machine, if you installed community edition and its running it might fail in connecting replicaset check connection string proper If there is other mongo service running use below command to stop it and then try to connect to mongo brew services stop mongodb/brew/mongodb-community@6.0 Replica set configuration Add below script in docker-compose.yml file version: '1.0' services: mongo: hostname: mongo container_name: mongo-workflowforms image: mongo:4.2.0 volumes: - ~/mongors/data1:/mongodata/db - ./rs-init.sh:/scripts/rs-init.sh networks: - mongors-network ports: - "27017:27017" ...