Failled to connect to MongoDB Atlas cluster

4,348 views
Skip to first unread message

Renee Rojas

unread,
Mar 16, 2017, 1:32:03 AM3/16/17
to ReactiveMongo - http://reactivemongo.org
Someone has successful connected to mongodb atlas cluster?

When i run it on a local instance v3.4.2 running on SSL it works fine, but when i try to connect to my atlas custer at same version it fails.

[ERROR] [03/16/2017 02:24:30.246] [reactivemongo-akka.actor.default-dispatcher-2] [akka://reactivemongo/user/Connection-2] CommandError[code=8000, errmsg=no SNI name sent, make sure using a MongoDB 3.4+ driver/shell., doc: {
  ok: BSONInteger(0),
  errmsg: "no SNI name sent, make sure using a MongoDB 3.4+ driver/shell.",
  code: BSONInteger(8000),
  codeName: "AtlasError"
}] (reactivemongo.api.commands.bson.DefaultBSONCommandError)
[ERROR] [03/16/2017 02:24:30.285] [reactivemongo-akka.actor.default-dispatcher-4] [akka://reactivemongo/user/Connection-2] CommandError[code=8000, errmsg=no SNI name sent, make sure using a MongoDB 3.4+ driver/shell., doc: {
  ok: BSONInteger(0),
  errmsg: "no SNI name sent, make sure using a MongoDB 3.4+ driver/shell.",
  code: BSONInteger(8000),
  codeName: "AtlasError"
}] (reactivemongo.api.commands.bson.DefaultBSONCommandError)

LOCAL URI
#mongodb.uri = "mongodb://localhost:27017/mr?sslEnabled=true&rm.tcpNoDelay=true&sslAllowsInvalidCert=true"
ATLAS URI
mongodb.uri = "mongodb://user:pa...@my-cluster-shard-00-00-ggnpd.mongodb.net:27017,my-cluster-shard-00-01-ggnpd.mongodb.net:27017,my-cluster-shard-00-02-ggnpd.mongodb.net:27017/test?authSource=admin&sslEnabled=true&sslAllowsInvalidCert=true"

Has some trick to use Atlas cluster?

i really don't know what is wrong, thanks.

Cédric Chantepie

unread,
Mar 24, 2017, 3:50:08 PM3/24/17
to ReactiveMongo - http://reactivemongo.org
There is no SSL/SNI support for now. You can create a feature request.

Charlie Liu

unread,
Apr 13, 2017, 1:53:57 AM4/13/17
to ReactiveMongo - http://reactivemongo.org
I had the same problem with MongoDB Atlas when the ssl=true was enclosed in the options.
Once I remove the ssl=true, the error changes to "server sandbox0-shard-00-01-xxxxx.mongodb.net:27017 sockets closed"

Any advice?

Renee Rojas

unread,
Apr 13, 2017, 9:33:17 AM4/13/17
to ReactiveMongo - http://reactivemongo.org
Hi Charlie Liu,

Acording to Lungang Fang from mongodb support, only atlas free requires SNI.

"Hi Renee,
 - For me the most strange that its connect locally using ssl in the same mongodb version.
The reason that it works locally but not on Atlas Free Tier is that local SSL does not require SNI to connect. In fact, Atlas M10 and above don't need SNI enabled either. Only Atlas Free requires SNI enabled."

Renee Rojas

unread,
Apr 13, 2017, 9:33:46 AM4/13/17
to ReactiveMongo - http://reactivemongo.org
Thanks Cédric, confirmed with mongodb support.

Jamous Georges

unread,
Apr 30, 2017, 10:12:10 AM4/30/17
to ReactiveMongo - http://reactivemongo.org
Hello i stumbled upon this during my search for answer  of connecting to Atlas Mongodb.
Is there a solution for this that you may know of ?



My mongo db atlas URI is  the following:

mongodb://USER:PASSWORD@
cluster.....-shard-00-00-d..j.mongodb.net:27017,
cluster.....-shard-00-01-d..j.mongodb.net:27017,
cluster.....-shard-00-02-d..j.mongodb.net:27017/DATABASENAME?
ssl=false&replicaSet=cluster.....-shard-0
&authSource=admin

Error i am getting is 
Unable to ensure uniqueness for usernames: MongoError: no valid replicaset members found


thank you.



On Thursday, March 16, 2017 at 7:32:03 AM UTC+2, Renee Rojas wrote:
Someone has successful connected to mongodb atlas cluster?

When i run it on a local instance v3.4.2 running on SSL it works fine, but when i try to connect to my atlas custer at same version it fails.

[ERROR] [03/16/2017 02:24:30.246] [reactivemongo-akka.actor.default-dispatcher-2] [akka://reactivemongo/user/Connection-2] CommandError[code=8000, errmsg=no SNI name sent, make sure using a MongoDB 3.4+ driver/shell., doc: {
  ok: BSONInteger(0),
  errmsg: "no SNI name sent, make sure using a MongoDB 3.4+ driver/shell.",
  code: BSONInteger(8000),
  codeName: "AtlasError"
}] (reactivemongo.api.commands.bson.DefaultBSONCommandError)
[ERROR] [03/16/2017 02:24:30.285] [reactivemongo-akka.actor.default-dispatcher-4] [akka://reactivemongo/user/Connection-2] CommandError[code=8000, errmsg=no SNI name sent, make sure using a MongoDB 3.4+ driver/shell., doc: {
  ok: BSONInteger(0),
  errmsg: "no SNI name sent, make sure using a MongoDB 3.4+ driver/shell.",
  code: BSONInteger(8000),
  codeName: "AtlasError"
}] (reactivemongo.api.commands.bson.DefaultBSONCommandError)

LOCAL URI
#mongodb.uri = "mongodb://localhost:27017/mr?sslEnabled=true&rm.tcpNoDelay=true&sslAllowsInvalidCert=true"
ATLAS URI

Cédric Chantepie

unread,
May 1, 2017, 7:44:12 AM5/1/17
to ReactiveMongo - http://reactivemongo.org
As this message is coming from the Atlas RS, I suggest you first check with its support.

Cédric Chantepie

unread,
Sep 1, 2017, 5:19:12 AM9/1/17
to ReactiveMongo - http://reactivemongo.org
You can try 0.12.7-SNAPSHOT for the SNI support.

Fernando Aspiazu

unread,
Sep 5, 2017, 4:43:14 AM9/5/17
to ReactiveMongo - http://reactivemongo.org
Hi Cédric,

from which repository the version 0.12.7-SNAPSHOT is resolved?

Is there any workaround to connect with Atlas?

Thanks in advance

Cédric Chantepie

unread,
Sep 5, 2017, 6:54:16 AM9/5/17
to ReactiveMongo - http://reactivemongo.org
Reply all
Reply to author
Forward
0 new messages