mongodb常遇到的错误解决
mongodb常遇到的错误解决
在运行mongos命令时出现如下类似错误
config servers localhost:27017 and local
host:12000 differconfig servers localhost:27017 and localhost:12000 differconfig
servers localhost:27017 and localhost:12000 differconfig servers localhost:2701
7 and localhost:12000 differconfig servers not in sync! config servers localhost
:27017 and localhost:12000 differ
chunks: "d41d8cd98f00b204e9800998ecf8427e" EOO
databases: "0195c739c938fdafd9632279694ea64e" EOO
Wed Oct 09 15:36:42 [mongosMain] configServer connection startup check failed
说明你第一次实验参与集群的mongod服务与当前参与集群的mongod服务数量不一致。
解决方法是把第一次参与集群的mongod 数据目录下所有的config.0,config.1,config.ns 删除。
重新启动mongos即可。