can't able to connect config server via mongos

449 views
Skip to first unread message

Sankaravelu S

unread,
Jun 9, 2012, 1:52:59 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

Eliot Horowitz

unread,
Jun 10, 2012, 12:59:22 AM6/10/12
to mongod...@googlegroups.com
See the last line.
Looks like the clocks in the cluster aren't synchronized.
> --
> 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

Tim

unread,
Nov 8, 2012, 3:36:42 PM11/8/12
to mongod...@googlegroups.com, el...@10gen.com
how did you solve that problem?

Thomas Rueckstiess

unread,
Nov 18, 2012, 11:54:46 PM11/18/12
to mongod...@googlegroups.com, el...@10gen.com
Tim, you can use the NTP service to synchronize the clocks on your machines: http://en.wikipedia.org/wiki/Network_Time_Protocol
Reply all
Reply to author
Forward
0 new messages