Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-4189

"can't find self in new replset config" error when trying to run multiple mongod processes on the same machine

    • Type: Icon: Bug Bug
    • Resolution: Won't Fix
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 1.8.4, 2.0.1
    • Component/s: Usability
    • None
    • Environment:
      ubuntu linux 10.04.03, stock 1.8.4 debian build from the 10gen repository
    • ALL

      If I have a machine with multiple IPs, and I bind a mongod to each ip, I am unable to add the daemons to a replicate set. Attemtps to do a rs.add() or rs.addArb() fails with the "can't find self in new replset config" assertion error.

      Three test cases: (assume the mongo data directories are cleaned out before running the test)

      Case 1 - success, expected
      mongod1: ip1, port 27017
      mongod2: ip1, port 27018
      mongod3: ip1, port 27019

      mongod1:
      rs.initiate() -> success
      rs.add("ip1:27018") -> success
      rs.addArb("ip1:27019") -> success

      Case 2 - success, expected
      mongod1: ip1, 27017
      mongod2: ip2, 27018
      mongod3: ip3, 27019

      mongod1:
      rs.initiate() -> success
      rs.add("ip2:27018") -> success
      rs.addArb("ip3:27019") -> success

      Case 3 failure - unexpected
      mongod1: ip1, port 27017
      mongod2: ip2, port 27017
      mongod3: ip3, port 27017

      mongod1:
      rs.initiate() -> success
      rs.add("ip2:27017") -> failure
      rs.addArb("ip3:27017") -> failure

      error message

      {
      "assertion" : "can't find self in new replset config",
      "assertionCode" : 13433,
      "errmsg" : "db assertion failure",
      "ok" : 0
      }

      The error message is found in db/repl/rs_config.cpp 2.0.1 1.8.4

            Assignee:
            mathias@mongodb.com Mathias Stearn
            Reporter:
            pdwalker Paul D. Walker
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: