2

I have created a free Atlas account and setup a cluster. I am trying to connect to the atlas cluster from the Robo 3T GUI. I have made the following configuration,

In the connection tab, I have specified all the cluster nodes with the type set to Replica Set enter image description here

In the Authentication tab I have provided the credentials of the admin user.

SSH is not checked

TLS is set to use with the self signed certificate. enter image description here

No changes are made in the Adbanced tab.

But when I try to connect, it is failing with the following error,

6:03:06 PM  Info: Settings saved to: /Users/sandeshaj/.3T/robo-3t/1.4.1/robo3t.json
6:03:06 PM  Info: Connecting to digify [Replica Set]cluster0-shard-00-02.hfjr8.mongodb.net:27017...
6:03:06 PM  Info: Settings saved to: /Users/sandeshaj/.3T/robo-3t/1.4.1/robo3t.json
6:03:24 PM  Info: Settings saved to: /Users/sandeshaj/.3T/robo-3t/1.4.1/robo3t.json
6:03:24 PM  Info: Replica set's cached set name cleared. Using user entered set name.
6:06:14 PM  Error: Establish connection failed. TLS tunnel failure: Network is unreachable or TLS connection rejected by server. Reason: Connect failed. Connection: digify
6:06:14 PM  Warning: Failed to ping the server. Could not find host matching read preference { mode: "primary", tags: [ {} ] } for set cluster0-shard-00-00

enter image description here

In the Atlas account, I have given access to all the IPs, enter image description here

What else should I do to connect to Atlas DB from the Robo3T GUI.

PS: I even tried with unchecking TLS. Also, tried by giving the set name as cluster0-shard-0 as suggested in the setup I am doing for the app https://github.com/digifi-io/loan-origination-system

Thanks in advance.

Naanavanalla
  • 1,412
  • 2
  • 27
  • 52

2 Answers2

0

Actually, the replica set name in Atlas was different than what I was feeding in Robo 3T. When I did db.runCommand( { isMaster: 1 } ) on the shell, it gave the following output,

{
    "hosts" : [
        "cluster0-shard-00-00.hfjr8.mongodb.net:27017",
        "cluster0-shard-00-01.hfjr8.mongodb.net:27017",
        "cluster0-shard-00-02.hfjr8.mongodb.net:27017"
    ],
    "setName" : "atlas-n8lsue-shard-0",
    "setVersion" : 2,
    "ismaster" : true,
    "secondary" : false,
    "primary" : "cluster0-shard-00-02.hfjr8.mongodb.net:27017",
    "tags" : {
        "provider" : "AWS",
        "nodeType" : "ELECTABLE",
        "workloadType" : "OPERATIONAL",
        "region" : "US_EAST_1"
    },
    "me" : "cluster0-shard-00-02.hfjr8.mongodb.net:27017",
    "electionId" : ObjectId("7fffffff0000000000000006"),
    "lastWrite" : {
        "opTime" : {
            "ts" : Timestamp(1603813903, 3),
            "t" : NumberLong(6)
        },
        "lastWriteDate" : ISODate("2020-10-27T15:51:43Z"),
        "majorityOpTime" : {
            "ts" : Timestamp(1603813903, 3),
            "t" : NumberLong(6)
        },
        "majorityWriteDate" : ISODate("2020-10-27T15:51:43Z")
    },
    "maxBsonObjectSize" : 16777216,
    "maxMessageSizeBytes" : 48000000,
    "maxWriteBatchSize" : 100000,
    "localTime" : ISODate("2020-10-27T15:51:47.854Z"),
    "logicalSessionTimeoutMinutes" : 30,
    "connectionId" : 643442,
    "minWireVersion" : 0,
    "maxWireVersion" : 8,
    "readOnly" : false,
    "ok" : 1,
    "$clusterTime" : {
        "clusterTime" : Timestamp(1603813903, 3),
        "signature" : {
            "hash" : BinData(0,"ZQK/mzsowFmDfsrDc4kfXBAXIl4="),
            "keyId" : NumberLong("6875773608992440322")
        }
    },
    "operationTime" : Timestamp(1603813903, 3)
}

So I changed the set name to atlas-n8lsue-shard-0 from Cluster-shard-0 and the connection is success now

Naanavanalla
  • 1,412
  • 2
  • 27
  • 52
-1

Try these:

  1. Go to Atlas > Clusters
  2. Click the "Connect" button
  3. Connect using Mongo Compass
  4. And you will see mongodb+srv://... connection string.
  5. Copy/Past your Robo3T From Srv

Also you can try MongoDB Compass, it is a powerful tool more than Robo3T.

Yunus UYANIK
  • 249
  • 2
  • 13