问题描述
我已经安装了 mongodb 副本集,在文件 mongod.conf 中添加了 BIND_IP 如下
当我使用robo3t连接副本集"时输入错误,但连接到直接连接"时成功.
error TYPE="副本集
连接字符串 C# "mongodb://100.0.192.68:27017,100.0.192.68:27017/databasename?safe=true&connect=replicaSet&replicaSet=r0"
Robo 3T 似乎无法通过身份验证"访问具有已验证连接的副本集.最好在复制集的所有成员上激活 ssh-server.然后在 Robo 3T 中,您将所有成员添加到连接并选择 ssh 并使用身份验证方法密码.这样我就能够绕过这个限制.
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.
Connection string C# "mongodb://100.0.192.68:27017,100.0.192.68:27017/databasename?safe=true&connect=replicaSet&replicaSet=r0"
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.
这篇关于无法使用 robo3T 和 C# 从其他服务器连接到 MongoDB 副本集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!