I’m having some troubles connecting to mongo using a srv.
I have this docker-compose file to create a mongo instance:
version: '3.7' services: mongo: image: mongo:4.4.3-bionic restart: always ports: - 27017:27017 environment: - MONGO_INITDB_DATABASE=dev - MONGO_INITDB_ROOT_USERNAME=admin - MONGO_INITDB_ROOT_PASSWORD=admin
After raising up the image, everything seems to work. If I try to conect to mongo on Robot3 for example by specifying the user, everything seems to work:
If I’m not wrong the SRV of that connection should be:
However when I try to use it, it fails:
I’m using Robo 3T just for clarify the problem. But the objective is to get the proper SRV, to be able to use it on mongose for a nodeJS aplication.
Leave an answer