Mongos error

219 views
Skip to first unread message

Sankaravelu S

unread,
Jun 9, 2012, 4:55:11 AM6/9/12
to mongod...@googlegroups.com
Hi,

I have 2 machines, one is windows 32 bit machine and another one is fedora 32 bit machine.

I am using mongodb version 2.0.6.


In windows i had one replica set and one config Server:

           set1 :

                  >  mongod.exe --shardsvr --replSet set1 --rest --port 27017 --dbpath "C:\db1"

                  >  mongod.exe --shardsvr --replSet set1 --rest --port 27018 --dbpath "C:\db2"

                  >  mongod.exe --shardsvr --replSet set1 --rest --port 27019 --dbpath "C:\db3"

           Config server :

                 > mongod.exe --configsvr --port 27020 --dbpath "C:\configdb"


In fedora i had two replica sets and two config servers and mongos server :


           set2 :

                >  ./mongod --shardsvr --replSet set2 --rest --port 27017 --dbpath /data/db

                >  ./mongod --shardsvr --replSet set2 --rest --port 27018 --dbpath /data/db1

                >  ./mongod --shardsvr --replSet set2 --rest --port 27019 --dbpath /data/db2


           set3 :

                >  ./mongod --shardsvr --replSet set3 --rest --port 27020 --dbpath /data/db3

                >  ./mongod --shardsvr --replSet set3 --rest --port 27021 --dbpath /data/db4

                >  ./mongod --shardsvr --replSet set3 --rest --port 27022 --dbpath /data/db5

           Config servers :

                >  ./mongod --configsvr --port 27023 --dbpath /data/configdb1/

                >  ./mongod --configsvr --port 27024 --dbpath /data/configdb2/



When attempt to run mongos some error will be displayed.

           Mongos server :

                > ./mongos --configdb 192.168.1.25:27023,192.168.1.25:27024,192.168.1.51:27020 --port 27025

                    Sat Jun  9 11:17:00 ./mongos db version v2.0.6, pdfile version 4.5 starting (--help for usage)
                    Sat Jun  9 11:17:00 git version: e1c0cbc25863f6356aa4e31375add7bb49fb05bc
                    Sat Jun  9 11:17:00 build info: Linux domU-12-31-39-01-70-B4 2.6.21.7-2.fc8xen #1 SMP Fri Feb 15 12:39:36                                  EST   2008 i686 BOOST_LIB_VERSION=1_41
                    Sat Jun  9 11:17:00 SyncClusterConnection connecting to [192.168.1.25:27020]
          Sat Jun  9 11:17:00 SyncClusterConnection connecting to [192.168.1.25:27024]
Sat Jun  9 11:17:00 SyncClusterConnection connecting to [192.168.1.51:27020]
Sat Jun  9 11:17:00 [websvr] admin web console waiting for connections on port 28025
Sat Jun  9 11:17:00 [mongosMain] waiting for connections on port 27025
Sat Jun  9 11:17:00 [Balancer] about to contact config servers and shards
Sat Jun  9 11:17:00 [Balancer] SyncClusterConnection connecting to [192.168.1.25:27020]
Sat Jun  9 11:17:00 [Balancer] SyncClusterConnection connecting to [192.168.1.25:27024]
Sat Jun  9 11:17:00 [Balancer] SyncClusterConnection connecting to [192.168.1.51:27020]
Sat Jun  9 11:17:00 [Balancer] config servers and shards contacted successfully
Sat Jun  9 11:17:00 [Balancer] balancer id: localhost.localdomain:27025 started at Jun  9 11:17:00
Sat Jun  9 11:17:00 [Balancer] created new distributed lock for balancer on 192.168.1.25:27020,192.168.1.25:27024,192.168.1.51:27020 ( lock timeout : 900000, ping interval : 30000, process : 0 )
Sat Jun  9 11:17:00 [Balancer] SyncClusterConnection connecting to [192.168.1.25:27020]
Sat Jun  9 11:17:00 [Balancer] SyncClusterConnection connecting to [192.168.1.25:27024]
Sat Jun  9 11:17:00 [Balancer] SyncClusterConnection connecting to [192.168.1.51:27020]
Sat Jun  9 11:17:00 [Balancer] SyncClusterConnection connecting to [192.168.1.25:27020]
Sat Jun  9 11:17:00 [Balancer] SyncClusterConnection connecting to [192.168.1.25:27024]
Sat Jun  9 11:17:00 [Balancer] SyncClusterConnection connecting to [192.168.1.51:27020]
Sat Jun  9 11:17:00 [Balancer] scoped connection to 192.168.1.25:27020,192.168.1.25:27024,192.168.1.51:27020 not being returned to the pool
Sat Jun  9 11:17:00 [Balancer] caught exception while doing balance: error checking clock skew of cluster 192.168.1.25:27020,192.168.1.25:27024,192.168.1.51:27020 :: caused by :: 13650 clock skew of the cluster 192.168.1.25:27020,192.168.1.25:27024,192.168.1.51:27020 is too far out of bounds to allow distributed locking.


I was trying to accomplish the multiple replica sets for last two weeks but no luck.

I would appreciate if anybody can help me on this.


Thanks in advance,
Sankaravelu.S

मैं एक भारतीय बेवकूफ हूँ

unread,
Jun 9, 2012, 5:50:35 AM6/9/12
to mongod...@googlegroups.com


Sankaravelu S wrote:
> Sat Jun 9 11:17:00 [Balancer] caught exception while doing balance:
> error checking clock skew of cluster 192.168.1.25:27020
> <http://192.168.1.25:27020>,192.168.1.25:27024
> <http://192.168.1.25:27024>,192.168.1.51:27020
> <http://192.168.1.51:27020> :: caused by :: 13650 clock skew of the
> cluster 192.168.1.25:27020
> <http://192.168.1.25:27020>,192.168.1.25:27024
> <http://192.168.1.25:27024>,192.168.1.51:27020
> <http://192.168.1.51:27020> is too far out of bounds to allow
> distributed locking.


Your clocks are cleary out of sync.


Spencer T Brody

unread,
Jun 11, 2012, 12:01:08 PM6/11/12
to mongod...@googlegroups.com
It looks like this error is due to the clock on some of your machines being out of sync.  We recommend running NTP or something similar to keep the clocks of all nodes in the cluster in sync.

It also looks like you may be mixing config servers and shard servers.  You need exactly 3 config servers for any production sharded cluster, it looks like you're giving your mongos 2 config servers and one server from set3.

Spencer T Brody

unread,
Jun 11, 2012, 1:00:29 PM6/11/12
to mongod...@googlegroups.com
Never mind about the config servers part, just realized you're using 2 config servers from fedora and one from windows, which should be fine.  The clock skew issue is still a problem though.

--
You received this message because you are subscribed to the Google
Groups "mongodb-user" group.
To post to this group, send email to mongod...@googlegroups.com
To unsubscribe from this group, send email to
mongodb-user...@googlegroups.com
See also the IRC channel -- freenode.net#mongodb

Reply all
Reply to author
Forward
0 new messages