Ant-Media-Server icon indicating copy to clipboard operation
Ant-Media-Server copied to clipboard

Cluster dosen't start when passing username and password with -u and -p flags

Open Mohit-3196 opened this issue 3 years ago • 1 comments
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

  1. Create an Atlas database with mongodb+srv URI
  2. 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.

Mohit-3196 avatar Jun 13 '22 13:06 Mohit-3196

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

muratugureminoglu avatar Sep 05 '22 05:09 muratugureminoglu