MongoDB replica set IDs do not match

Source: Internet
Author: User
Tags redis

When building the replica set for MongoDB (version 3.2.9), use Rs.status () to view the state of the replica set and find a member exception: Replica set IDs do not match, details are:



"lastHeartbeatMessage" : "replica set IDs do not match, ours: xxx; remote node‘s: yyy",
 "stateStr" : "(not reachable/healthy)"

A variety of methods have been tried, and the member cannot be removed from the primary node, the replica set ID of the member cannot be synchronized by restarting the member's Mongod and forcing Primay to reconfigure.



--primary 
rs.remove("host:port")

--restart
use admin
db.shutdownServer()

--reconfigure
rs.reconfig(conf,{force:true})

The last trick, will kill the technology, the data file of the MongoDB instance all deleted, and then in the replica set primary node, re-add the member, and finally the replica set to build successfully.


Rs.add ("Host:port")

In MongoDB, the configuration information of replica set is stored in the System.replset collection of the local database, MongoDB cannot synchronize replica set ID, which is very tangled.

MongoDB replica set IDs do not match

Alibaba Cloud Hot Products

Elastic Compute Service (ECS) Dedicated Host (DDH) ApsaraDB RDS for MySQL (RDS) ApsaraDB for PolarDB(PolarDB) AnalyticDB for PostgreSQL (ADB for PG)
AnalyticDB for MySQL(ADB for MySQL) Data Transmission Service (DTS) Server Load Balancer (SLB) Global Accelerator (GA) Cloud Enterprise Network (CEN)
Object Storage Service (OSS) Content Delivery Network (CDN) Short Message Service (SMS) Container Service for Kubernetes (ACK) Data Lake Analytics (DLA)

ApsaraDB for Redis (Redis)

ApsaraDB for MongoDB (MongoDB) NAT Gateway VPN Gateway Cloud Firewall
Anti-DDoS Web Application Firewall (WAF) Log Service DataWorks MaxCompute
Elastic MapReduce (EMR) Elasticsearch

Alibaba Cloud Free Trail

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.