mongodb - 在 MongoDB 中添加副本会引发错误

标签 mongodb replication database-replication

我正在尝试使用 rs.add("developer-ViratualBox:30103") 将节点添加到副本集,我收到以下错误消息:

{
"ok" : 0,
"errmsg" : "Quorum check failed because not enough voting nodes responded; required 2 but only the following 1 voting nodes responded: developer-VirtualBox:30101; the following nodes did not respond affirmatively: developer-ViratualBox:30103 failed with Failed attempt to connect to developer-ViratualBox:30103; couldn't initialize connection to host developer-ViratualBox, address is invalid",
"code" : 74
}

节点已经在运行,我使用 mongo shell 连接到它。可能是什么问题?

最佳答案

实际的错误是couldn't initialize connection to host developer-ViratualBox, address is invalid,就是主节点无法连接副节点。检查连接、防火墙,并检查与 mongo shell 的连接是否可以访问该端口。

关于mongodb - 在 MongoDB 中添加副本会引发错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30480021/

相关文章:

MongoDB多级$lookup排序不起作用

不同主要版本之间的 PostgreSQL 复制

sql-server - SQL Server 同步备选方案

javascript - MongoDb 对日期范围的唯一约束

javascript - 如何检索属性是给定参数的子字符串的所有文档?

c# - 使用 FindOneAndUpdateOptions 类 C# 驱动程序的 findAndModify 中的 MongoDB 映射属性 'new'

mysql - 如何通过触发器提取插入行中的uuid作为主键

sql-server - 更改 SQL Server 2008 R2 中的复制列。合并复制

Postgresql 10 逻辑复制不起作用

mongodb - 需要简单解释 Arbiter 在给定的 mongoDB 副本集中的角色