Mongodb Problem Summary

Source: Internet
Author: User
Tags mongodb


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




Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.