Ant-Media-Server
Ant-Media-Server copied to clipboard
Cluster dosen't start when passing username and password with -u and -p flags
trafficstars
Short description
When using mongodb+srv URI to start AMS in cluster mode with ./start.sh by passing -u username and -p password filed, the cluster doesn't start and gives Bootstrap exception.
Environment
- Ant Media Server version: v2.4.3
Steps to reproduce
- Create an Atlas database with mongodb+srv URI
- Run the ./start.sh script with sudo ./start.sh -m cluster -h mongodb+srv://<URL> -u username -p password
Expected behavior
Server should start in cluster mode.
Actual behavior
Server gives Bootstrap exception and doesn't start in cluster mode.
Hi @Mohit-3196 When I test it, it works properly when I use mongodb+srv://<username>:<password>@<url> cluster URL like this. This is how the cluster URL should be used in MongoDB Atlas.
It would be better if you also share the ant-media-server.log file.
./start.sh -m cluster -h mongodb+srv://<username>:<password>@<url>
sudo ./change_server_mode.sh cluster mongodb+srv://<username>:<password>@<url>
Reference URL: https://resources.antmedia.io/docs/using-mongodb-atlas-with-mongodbsrv-uri