无法使用 robo3T 和 C# 从其他服务器连接到 MongoDB 副本集 [英] Unable to connect to MongoDB Replica Set from other server using robo3T and in C#

查看:51
本文介绍了无法使用 robo3T 和 C# 从其他服务器连接到 MongoDB 副本集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我已经安装了 mongodb 副本集,在文件 mongod.conf 中添加了 BIND_IP 如下

<预> <代码>净:端口:27017bindIp: 127.0.0.1, 100.0.192.68

当我使用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.

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"

解决方案

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 副本集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆