Format for MONGO_URL when connecting MongoDB Atlas to Galaxy

1.1k views Asked by At

Revising this question following more attempts:

I'm deploying a Meteor app on Galaxy for the first time and cannot connect to MongoDB Atlas.

I can connect to MongoDb through Mongo Shell using:

mongo "mongodb://host1:27017,host2:27017,host3:27017/<db_name>?replicaSet=<replica_set_name>" --ssl --authenticationDatabase admin  --username <username> --password <password>

I tried an equivalent for the Mongo URL in my settings.json:

mongodb://<username>:<password>@host1:27017,host2:27017,host3:27017/<db_name>?authSource=admin&replicaSet=<replace_set_name>

But when I deploy my app, I get:

Error: Could not locate any valid servers in initial seed list.

I've also tried using the connection string provided by Atlas:

mongodb+srv://<username>:<password>@<host>/<db_name>?retryWrites=true&w=majority

But this just returns:

Error: URL must be in the format mongodb://user:pass@host:port/dbname

I've tried every combination I can come up with but no luck.

RESOLVED, WITH HELP FROM MONGODB ATLAS SUPPORT: "MONGO_URL": "mongodb://:@host1:27017,host2:27017,host3:27017/?ssl=true&replicaSet=&authSource=admin&retryWrites=true&w=majority",

0

There are 0 answers