Unable to connect to MongoDB Replica Set from other server using robo3T and in C#

微笑、不失礼 提交于 2020-08-23 06:45:08

问题



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

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


回答1:


Robo 3T seems to have problems to access replica sets with authenticated connections via "Authentication". Better activate the ssh-server on all members on 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.



来源:https://stackoverflow.com/questions/52945978/unable-to-connect-to-mongodb-replica-set-from-other-server-using-robo3t-and-in-c

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!