Get the App
SLTechnology News&Howtos  ›  Database  › 

MongoDB replica set sharding cluster one shard config library host power outage causes the shard config library to fail to start

Shulou Source: shulou.com Published: 2022-05-31 14:30:50 10月03日 Update

This article is about the MongoDB replica set shard cluster a shard config library host power outage caused the shard config library can not start what to do. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

Due to the unexpected power outage in the data center, the config library cannot be started due to the power outage of a shard config server. The related error is as follows:

Key error message:

2018-01-22T15:18:43.863+0800 I-[initandlisten] Detected data file in D:\ mongodata\ cfg created by the 'wiredTiger' storage

Engine,so setting the active storage engine to 'wiredTiger'.

2018-01-22T15:18:43.865+0800 W-[initandlisten] Detected unclean shutdown-D:\ mongodata\ cfg\ mongod.lock is not empty.

2018-01-22T15:18:43.866+0800 w STORAGE [initandlisten] Recovering data from the last clean checkpoint.

According to the processing methods found on the Internet:

1. Close the startup window

2. Delete D:\ mongodata\ cfg\ mongod.lock

3. Perform the repair operation: d:\ MongoDB\ Server\ 3.2\ bin\ mongod-- configsvr-- replSet configReplSet-- port 27001

-- dbpath D:\ mongodata\ cfg-- repair

2018-01-22T15:46:50.530+0800 I STORAGE [initandlisten] Repairing collection loc

Al.system.replset

2018-01-22T15:46:50.531+0800 I STORAGE [initandlisten] Verify succeeded on uri

Table:collection-4--3441646246172970043. Not salvaging.

2018-01-22T15:46:50.545+0800 I INDEX [initandlisten] build index on: local.sy

Stem.replset properties: {v: 1, key: {_ id: 1}, name: "_ id_", ns: "local.syste

M.replset "}

2018-01-22T15:46:50.545+0800 I INDEX [initandlisten] building index

Using bulk method

2018-01-22T15:46:50.569+0800 I STORAGE [initandlisten] finished checking dbs

2018-01-22T15:46:50.569+0800 I CONTROL [initandlisten] now exiting

2018-01-22T15:46:50.569+0800 I NETWORK [initandlisten] shutdown: going to close

Listening sockets...

2018-01-22T15:46:50.570+0800 I NETWORK [initandlisten] shutdown: going to flush

Diaglog...

2018-01-22T15:46:50.570+0800 I NETWORK [initandlisten] shutdown: going to close

Sockets...

2018-01-22T15:46:50.571+0800 I STORAGE [initandlisten] WiredTigerKVEngine shutt

Ing down

2018-01-22T15:46:50.769+0800 I STORAGE [initandlisten] shutdown: removing fs lo

Ck...

2018-01-22T15:46:50.770+0800 I CONTROL [initandlisten] dbexit: rc: 0

4. There is no obvious error in the repair operation. Restart the config library, and the problem still exists. The error report is consistent with the log mentioned above.

Because it is a replica slicing cluster, and the config library is only a slice config library, the replica slicing cluster has a total of three config libraries, so it is decided to delete the config library.

All the data files under the data directory D:\ mongodata\ cfg are resynchronized from other nodes in the cluster, and the config library returns to normal after resynchronizing the data.

Thank you for reading! On "MongoDB replica set shard cluster a shard config library host power outage caused by the shard config library can not start what to do" this article is shared here, I hope the above content can be of some help to you, so that you can learn more knowledge, if you think the article is good, you can share it out for more people to see it!

Tags: Clusters replicas hosts what to do content data more articles synchronization good practical obvious consistent unexpected information key just files articles methods Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Linux Microsoft Docker OPPO Reno macOS