IN local Db connection is working perfectly but in docker error (Error in DB connection MongoParse Error : URI malformed, cannot be parsed) in the DB connection
Hi @Nidhi_Savaliya and welcome to MongoDB community forum!!
It would be helpful to understand the issue further if you could help with the following details:
- The connection URI you are using for connecting to MongoDB
- The docker-compose.yaml file
- The MongoDB version you are using
- A more detailed error logs would be more helpful in understanding better.
As a general tip, if you are trying to connect to the localhost, please make sure if the localhost name has the
host.docker.internal in the
/etc/hosts file for the linux system