MongoDB 集群 - CSRS 无法启动
MongoDB cluster - CSRS failing to start
我正在尝试在本地环境中使用 docker 配置 mongo 分片集群,遵循 this guide 并卡在第一步。问题是配置服务器副本集无法正确启动。
我已经尝试 to disable enableMajorityReadConcern 但没有成功。看起来配置服务器必须将此设置为 true。
这些对我来说很奇怪:
*2018-11-14T16:55:38.669+0000 I REPL [initandlisten] Did not find local replica set configuration document at startup; NoMatchingDocument: Did not find replica set configuration document in local.system.replset*
*2018-11-14T16:55:38.669+0000 I CONTROL
[LogicalSessionCacheRefresh] Failed to create config.system.sessions:
Cannot create config.system.sessions until there are shards, will try
again at the next refresh interval*
*2018-11-14T16:55:38.669+0000 I
CONTROL [LogicalSessionCacheRefresh] Sessions collection is not set
up; waiting until next sessions refresh interval: Cannot create
config.system.sessions until there are shards*
我已经尝试了 3 个容器实例方案 - 所有 3 个都显示与单个容器方案相同的日志输出。欢迎任何想法!
问题已解决。当 CSRS 第一次启动时——这是一种预期的行为。 rs.init() 命令(部署指南中的第 3 步) 必须通过 mongo shell 执行才能最终配置和启动 CSRS。命令可以在CSRS的任何单个节点上执行。
我正在尝试在本地环境中使用 docker 配置 mongo 分片集群,遵循 this guide 并卡在第一步。问题是配置服务器副本集无法正确启动。
我已经尝试 to disable enableMajorityReadConcern 但没有成功。看起来配置服务器必须将此设置为 true。 这些对我来说很奇怪:
*2018-11-14T16:55:38.669+0000 I REPL [initandlisten] Did not find local replica set configuration document at startup; NoMatchingDocument: Did not find replica set configuration document in local.system.replset*
*2018-11-14T16:55:38.669+0000 I CONTROL
[LogicalSessionCacheRefresh] Failed to create config.system.sessions:
Cannot create config.system.sessions until there are shards, will try
again at the next refresh interval*
*2018-11-14T16:55:38.669+0000 I
CONTROL [LogicalSessionCacheRefresh] Sessions collection is not set
up; waiting until next sessions refresh interval: Cannot create
config.system.sessions until there are shards*
我已经尝试了 3 个容器实例方案 - 所有 3 个都显示与单个容器方案相同的日志输出。欢迎任何想法!
问题已解决。当 CSRS 第一次启动时——这是一种预期的行为。 rs.init() 命令(部署指南中的第 3 步) 必须通过 mongo shell 执行才能最终配置和启动 CSRS。命令可以在CSRS的任何单个节点上执行。