4


I have installed mongodb Replica Set, in the file mongod.conf has added BIND_IP as below

net:
  port: 27017
  bindIp: 127.0.0.1, 100.0.192.68

When I use robo3t to connect the "replica set" type the error, but when connected to the "Direct Connection" is successful.

error TYPE="Replica Set

enter image description here

Connection string C# "mongodb://100.0.192.68:27017,100.0.192.68:27017/databasename?safe=true&connect=replicaSet&replicaSet=r0"

VinothRaja
  • 1,405
  • 10
  • 21
Zizi
  • 61
  • 6
  • Were you able to solve it ? I am also facing same issue – PAA Apr 02 '20 at 05:42
  • I experience a similar problem. Linux is running my mongodb replication set. Using Robo 3T to connect from Windows 10 to the Linux replication set fails with "authentication failed". Testing the connection leads to "No chance to authorize". Mongodb is configured to authorization enabled and the user account has been created. Locally on the Linux server is can connect to the server with mongo -u username -p password. – Holger Schmeken Aug 21 '20 at 22:38
  • This looks a private IP , you might need to put SSH host server details in SSH section and also robo3T doesn't support replicaset over SSH , thus select "Direct Connection" in type option in "Connection" tab – Paras Patidar Jun 23 '21 at 16:17

3 Answers3

0

Robo 3T seems to have problems to access replica sets with authenticated connections via "Authentication". Better activate the ssh-server on all members of the replication set. Then in Robo 3T you add all members to the connection and select ssh with auth method password. This way I was able to get around this limitation.

Holger Schmeken
  • 605
  • 6
  • 16
0

In my case the problem was too short timeout (default 10 seconds) in Robo3T. To increase the timeout, I had to modify mongoTimeoutSec property in robo3t.json config file.

Depending on your OS, you can find robo3t.json config file in:

Windows
    C:\Users\<user>\.3T\robo-3t\1.1.1\robo3t.json

MAC
    /Users/<user>/.3T/robo-3t/1.1.1/robo3t.json

Linux
    /home/<user>/.3T/robo-3t/1.1.1/robo3t.json

Before modifying robo3t.json close Robo3T itself.

In this file, modify timeout to your needs:

"mongoTimeoutSec" : 30,

After this modification, save the file and start Robo3T.

pitagoras3
  • 1,988
  • 2
  • 14
  • 18
0

In my case it was that I had used hostnames to setup replica set while using IPs in connection string and in Robo 3T conn settings.

After adding hostnames to my win10's hosts file (for POC), I could connect from Win10/C# and Win10/Robo 3T using hostnames instead of IPs to my replica set on Linux.

tldrm
  • 1