> db.csptest2.drop()
Fri Feb 22 08:48:24 uncaught exception: drop failed: {
"errmsg" : "exception: Error locking distributed lock for chunk drop. :: caused by :: 13651 error checking clock skew of cluster 10.0.0.1:39000,10.0.0.2:39000,10.0.0.3:39000 :: caused by :: 13650 clock skew of the cluster 10.0.0.1:39000,10.0.0.2:39000,10.0.0.3:39000
is too far out of bounds to allow distributed locking.",
"code" : 14022,
"ok" : 0
}
解决:
在mongo集群中,各个主机的时间需要一致,否则可能会提示以上错误。
将这台主机调整到和其他主机相差在十几秒后,即可执行成功:
> db.csptest2.drop()
true
>