开始mongos失败

时间:2013-03-19 05:46:43

标签: mongodb

我在不同的服务器上有三个mongod shard进程和三个mongod配置服务器。

部署:

服务器192.168.2.101上的ShardA,192.168.2.102,192.168.2.163,三个分片是副本集,192.168.2.102是Arbiters

配置: A. 192.168.2.101

XXXX@ubuntu:~$ ps aux | grep mongo
root     22651  0.2  2.5 899768 46944 ?        Sl   12:35   0:10 mongod -shardsvr -replSet shardA -port 27017 -dbpath /var/lib/mongodb/shardA1 -oplogSize 100 -logpath /var/log/mongodb/shardA1.log -logappend -fork
root     22710  0.2  2.5 236084 47512 ?        Sl   12:35   0:08 mongod -configsvr -dbpath /var/lib/mongodb/config -port 20000 -logpath /var/log/mongodb/config.log -logappend -fork

B中。的 192.168.2.102

XXXXX@ubuntu:~$ ps aux | grep mongo
root     10556  0.2  1.0 262468 38688 ?        Sl   13:07   0:04 mongod -shardsvr -replSet shardA -port 27017 -dbpath /var/lib/mongodb/shardA3 -oplogSize 100 -logpath /var/log/mongodb/shardA3.log -journal -logappend -fork
root     10583  0.2  0.5 113940 21848 ?        Sl   13:07   0:03 mongod -configsvr -dbpath /var/lib/mongodb/config -port 20000 -logpath /var/log/mongodb/config.log -logappend -fork

℃。的 192.168.2.163

XXXXX@ubuntu:~$ ps aux | grep mongo
root      5594  0.3  0.7 804604 30952 ?        Sl   10:45   0:21 mongod -shardsvr -replSet shardA -port 27017 -dbpath /var/lib/mongodb/shardA2 -oplogSize 100 -logpath /var/log/mongodb/shardA2.log -logappend -fork
root      5650  0.2  0.7 134652 29456 ?        Sl   10:45   0:19 mongod -configsvr -dbpath /var/lib/mongodb/config -port 20000 -logpath /var/log/mongodb/config.log -logappend -fork

我在服务器 192.168.2.102 上启动mongos,但启动失败

命令是:

sudo mongos -configdb 192.168.2.101:20000,192.168.2.163:20000,192.168.2.102:20000 -port 30000 -chunkSize 256 -logpath $LOGPATH/mongos.log -logappend -fork

日志输出为:

   XXXXX@ubuntu:~$ cat  /var/log/mongodb/mongos.log
    Tue Mar 19 13:10:16 [mongosMain] MongoS version 2.2.3 starting: pid=10666 port=30000 32-bit host=ubuntu (--help for usage)
    Tue Mar 19 13:10:16 [mongosMain] git version: f570771a5d8a3846eb7586eaffcf4c2f4a96bf08
    Tue Mar 19 13:10:16 [mongosMain] build info: Linux bs-linux32.10gen.cc 2.6.21.7-2.fc8xen #1 SMP Fri Feb 15 12:39:36 EST 2008 i686 BOOST_LIB_VERSION=1_49
    Tue Mar 19 13:10:16 [mongosMain] options: { chunkSize: 256, configdb: "192.168.2.101:20000,192.168.2.163:20000,192.168.2.102:20000", fork: true, logappend: true, logpath: "/var/log/mongodb/mongos.log", port: 30000 }
    Tue Mar 19 13:10:16 [mongosMain] ERROR: config servers 192.168.2.101:20000 and 192.168.2.163:20000 differ config servers 192.168.2.101:20000 and 192.168.2.163:20000 differ config servers 192.168.2.101:20000 and 192.168.2.163:20000 differ config servers 192.168.2.101:20000 and 192.168.2.163:20000 differ config servers not in sync! config servers 192.168.2.101:20000 and 192.168.2.163:20000 differ
    chunks: "d41d8cd98f00b204e9800998ecf8427e"  EOO
    databases: "0195c739c938fdafd9632279694ea64e"   EOO
    Tue Mar 19 13:10:16 [mongosMain] configServer connection startup check failed

错误信息是:配置服务器192.168.2.101:20000和192.168.2.163:20000不同,有什么用途?

谢谢!

0 个答案:

没有答案