Environment: CentOS 6.0 mongodb2.4.13
1. Cannot delete after collection of shards:
Mongos> Db.table.drop ()
Tue Apr 18:40:30.943 drop failed: {
"code": 14022,
"OK": 0,
"errmsg": "Ex" Ception:error locking distributed lock for Chunk drop. :: Caused by:: 13651 error checking clock skew of cluster 192.168.100.201:21000,192.168.100.202:21000,192.168.100.204:21 : Caused by:: 13650 clock skew of the cluster 192.168.100.201:21000,192.168.100.202:21000,192.168.100.204:21000 is T Oo far out of bounds to allow distributed locking. "
} At src/mongo/shell/collection.js:383
Cause: The host time is not unified, modify the unified OK.
Sync with Network time:
cp/usr/share/zoneinfo/asia/shanghai/etc/localtime//Modify time zone
Yum install-y ntpdate
ntpdate us.pool.ntp.org//Sync time
mongos> db.table.drop ()
true
mongos>
2.mongos Cluster does not start
./mongos --configdb 192.168.100.201:21000,192.168.100.202:21000,192.168.100.204:21000 --port 20000 - -logpath /data/mongodbtest/mongos/log/mongos.log--fork about
to fork child process, waiting until server is Ready for connections.
Forked process:4394
Error:child process failed, exited with ERROR number 1
View the log as follows:
Error upgrading config Database to V6:: Caused by:: distributedclockskewed clock skew of the cluster 192.168.100.201:210 00,192.168.100.202:21000, 192.168.100.204:21000 is too far out of the bounds to allow
distributed locking.
Cause: There is a difference in the clock between the hosts, about hundreds of milliseconds. Re-sync OK. Refer to question 1.
./mongos --configdb 192.168.100.201:21000,192.168.100.202:21000,192.168.100.204:21000 --port 20000 - -logpath /data/mongodbtest/mongos/log/mongos.log--fork about
to fork child process, waiting until server is Ready for connections.
Forked process:5200 Child
process started successfully, parent exiting