Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

234
Views
ReplicaSetId conflict while adding node MongoDB

When I try to add a new node to my replicate set I get this message:

{ "ok" : 0, "errmsg" : "Our replica set ID of 5890ad86c92c6c88e8573df0 did not match that of 10.0.253.3:27017, which is 5890a6b137e1380d1e697f2a", "code" : 103, "codeName" : "NewReplicaSetConfigurationIncompatible" }

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

I had the same error and impossible to find out why ... I come back on the post to send the solution if others pass here.

Simply do not initialize the replicate on both servers:

I have two separate X and Y servers without mongodb, X and Y are IP addresses or domains.

  1. Install mongodb on both servers
  2. Edit the sudo nano /etc/mongod.conf configuration files on both servers
  3. [in file] Replace bindIp: 127.0.0.1 with bindIp: 127.0.0.1,X on the X server
  4. [in file] Replace bindIp: 127.0.0.1 with bindIp: 127.0.0.1,Y on the Y server
  5. [in file] Replace #replication: with replication: on both servers
  6. [in file] Add replSetName: "​​myReplicatName" line under replication: on both servers
  7. Launch mongo with the configuration file on both servers
  8. Only on server X run mongo and type commands

Mongo commands:

rs.initiate ({
  _id: "rs0",
  members: [{
    _id: 1,
    host: "X:27017"
  }]
});
rs.add("Y:YPORT");
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!