我试图复制我的mongodb数据库,我在我的windows帐户上安装了2个VM。它们都是Ubuntu14.04。我已经在它们上打开了27017端口,并安装了mongodb最新版本。我开始使用芒果
mongod --port 27017 --dbpath /data/datadrive --replSet rs0在这两台机器上,并通过使用
Rs.add(“内部IP地址:27017”)
我一直收到一个错误,我有两个主服务器,我在一个论坛上读到它是由于/etc/mongodb.conf中的bind_ip配置而发生的,所以我将bind_ip更改为两个Vm上的其他VM私有网络ip,在试图添加服务器成员时,我得到了以下错误。
在“初级”方面:
[rsMgr] not electing self, 100.79.138.73:27017 would veto with 'I don't think reptester1:27017 is electable'
[rsHealthPoll] replset info 100.79.138.73:27017 thinks that we are down
[rsHealthPoll] replset info 100.79.138.73:27017 thinks that we are down在“次要”方面:
[rsHealthPoll] getaddrinfo("reptester1") failed: Name or service not known
[rsHealthPoll] couldn't connect to reptester1:27017: couldn't connect to server reptester1:27017 (0.0.0.0) failed, address resolved to 0.0.0.0
[rsHealthPoll] replset info reptester1:27017 just heartbeated us, but our heartbeat failed: , not changing state
[rsHealthPoll] getaddrinfo("reptester1") failed: Name or service not known知道我做错什么了吗?
发布于 2014-09-09 12:34:53
你能调试以下东西吗-
发布于 2014-09-11 11:25:51
这是一个dns prob,因为成员名是Reptest1,辅助服务器解析地址ad reptest,而不是ip地址或dns地址。我已经编辑了会员主机地址。他们开始互相联系。我是用
$conf = rs.conf()
$conf.members[0].host = "mongo.cloudapp.net:27017"
rs.reconfig($conf)https://stackoverflow.com/questions/25744397
复制相似问题