In addition to Weibo, there is also WeChat
Please pay attention

WeChat public account
Shulou
2025-11-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Add configsvr to sharding
MongoDB requires 1 or 3 configsver instances, otherwise it cannot be started
1. Export the config library from the original configuration service (21000) and import the new configuration service (21001mem21002):
# mongodump-- port 21000-d config # Export
# mongorestore-- port 21001-d configdump/config # Import
# mongorestore-- port 21002-d configdump/config # Import
Restart the mongos service:
Restart all shard service instances
Expansion completed
# #
Fragment reduction configsvr
There used to be three configdb, now only one is needed, the operation process:
When mongos starts, only one configsvrip and port need to be configured
Mongos-- configdb 192.168.13.11 port 21000-- port
Restart the mongos service:
Restart all shard service instances
# # #
Different config reported an error
Error: error: {
"$err": "setShardVersion failed shard:shard2:shard2/192.168.13.11:22002192.168.13.12:22002 {configdb: {stored:\" 192.168.13.11 configdb 21000192.168.13.12 stored 21000\, given:\ "192.168.13.11 configdb 21000\"}, ok: 0.0 Errmsg:\ "mongos specified adifferent config database string: stored: 192.168.13.11 stored 21000192.168.13.12 vs given 21000 vs given: 192.168.13.13 stored 21000\", $gleStats: {lastOpTime: Timestamp 0 | 0, electionId:ObjectId ('58255aae0182cbf39c07f16b')}} "
If you reduce and increase the config link mongo
The above error occurred in querying database tables and adding new database tables. The following methods will solve the problem.
Restart the mongos service:
Restart all shard service instances
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope





About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.