2

I am trying to change my rocket chat to work with an Atlas DB, which is not sharded, but has a replica set of 3 nodes.

The rocket chat is installed on my EC2, and I don't understand how to access it through the rocketchat configuration.

Here's the relevant part in the Rocket chat's configuration file:

MONGO_URL="mongodb://[USER]:[PASSWORD]@[CLUSTER-NAME]-shard-00-00-[CLUSTER- 
ADDRESS]:27017,[CLUSTER-NAME]-shard-00-01-[CLUSTER-ADDRESS]:27017,[CLUSTER- 
NAME]-shard-00-02-[CLUSTER-ADDRESS]:27017/[COLLECTION-NAME]?replicaSet=[CLUSTER-NAME]-shard-0&ssl=true"
Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Yehuda
  • 73
  • 7

1 Answers1

1

I use connection string like this:

MONGO_URL="mongodb://[USER]:[PASSWORD]@[CLUSTER-NAME]-shard-00-00-abtx1.mongodb.net:27017,[CLUSTER-NAME]-shard-00-01-abtx1.mongodb.net:27017,[CLUSTER-NAME]-shard-00-02-abtx1.mongodb.net:27017/[DB-NAME]?ssl=true&replicaSet=[CLUSTER-NAME]-shard-0&authSource=admin&retryWrites=true"

To get the connection string just go to your atlas account in Web -> your cluster -> Command Line Tools -> Connect Instructions -> Connect Your Application -> I am using driver 3.4 or earlier.

YuriR
  • 1,251
  • 3
  • 14
  • 26