【问题标题】:mongos error "mirrored config server connections are not supported"mongos 错误“不支持镜像配置服务器连接”
【发布时间】:2018-04-03 01:33:06
【问题描述】:

这有什么问题吗?

  $ sudo mongos --logpath "mongos-1.log" --configdb localhost:57040,localhost:57041,localhost:57042 --fork
    FailedToParse: mirrored config server connections are not supported; for config server replica sets be sure to use the replica set connection string
    try 'mongos --help' for more information

【问题讨论】:

  • 这个问题确实属于dba.stackexchange.com,这是用于数据库管理和配置问题的站点。 StackOverflow 仅用于编程主题,此问题不是。 请通过删除和重新发布将您的问题移至正确的网站。

标签: mongodb


【解决方案1】:

configdb 应该是这样的:

"your_replSetName/host:port,host:port,host:port"

【讨论】:

    【解决方案2】:

    只是@sylia-baraka 答案的附录...如果您使用的是 MongoDB 3.4 或更高版本,则需要使用 CSRS 而不是 SCCC,请阅读更多 here

    在 3.4 版中,MongoDB 移除了对 SCCC 配置服务器的支持。在将分片集群升级到 3.4 之前,您必须将配置服务器从 SCCC 转换为 CSRS。要转换为 CSRS,请按照将 3.2.x SCCC 更改为 3.2.x CSRS 的过程。

    【讨论】:

      【解决方案3】:

      我遇到了同样的问题,你只需要更新你的--configdb to "repSetConfigName/localhost:57040,localhost:57041,localhost:57042"

      这是一个例子:

      这是我的配置服务器配置:

      mongod --configsvr --dbpath cfg0 --replSet conf --port 27050 --fork --logpath log.cfg0 --logappend
      mongod --configsvr --dbpath cfg1 --replSet conf --port 27051 --fork --logpath log.cfg1 --logappend
      mongod --configsvr --dbpath cfg2 --replSet conf --port 27052 --fork --logpath log.cfg2 --logappend
      

      然后我用了

      # connect to any of the mongod process on port 27050, 27051, 27052
      mongo --port 27050
      
      rs.initiate(
        {
          _id: "conf",
          configsvr: true,
          members: [
            { _id : 0, host : "localhost:27050" },
            { _id : 1, host : "localhost:27051" },
            { _id : 2, host : "localhost:27052" }
          ]
        }
      )
      

      最后

      mongos --configdb "conf/localhost:27050,localhost:27051,localhost:27052" --fork --logpath log.mongos0 --port 27200
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2017-10-28
        • 2022-01-03
        • 2020-07-23
        • 2012-03-08
        • 2021-12-17
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多