Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-2285

Unable to reconnect to a replica set after a failover due to stale electionId

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • 3.2.0
    • None
    • None
    • mongodb 3.0.2 replica set, three nodes , java driver: 3.2.0, centos 7.0

    Description

      the java driver will try to connect to the replicate set infinitely when the replica set restart after the driver client starting.
      the driver's log:

      2016-08-22 07:55:25,238 [cluster-ClusterId{value='57b680b7c9e77c00067b4846', description='null'}-10.1.245.5:37017] INFO  org.mongodb.driver.cluster(71) - Monitor thread successfully connected to server with description ServerDescription{address=10.1.245.5:37017, type=REPLICA_SET_PRIMARY, state=CONNECTED, ok=true, version=ServerVersion{versionList=[3, 0, 3]}, minWireVersion=0, maxWireVersion=3, electionId=57baa776aa4cc97ba6377d74, maxDocumentSize=16777216, roundTripTimeNanos=370494, setName='rs0', canonicalAddress=10.1.245.5:37017, hosts=[10.1.245.6:37017, 10.1.245.5:37017], passives=[], arbiters=[10.1.245.7:37017], primary='10.1.245.5:37017', tagSet=TagSet{[]}}
      2016-08-22 07:55:25,238 [cluster-ClusterId{value='57b680b7c9e77c00067b4846', description='null'}-10.1.245.5:37017] INFO  org.mongodb.driver.cluster(71) - Invalidating potential primary 10.1.245.5:37017 whose election id 57baa776aa4cc97ba6377d74 is less than the max election id seen so far 57baa83768f8cf45a0d87054
      

      Attachments

        Activity

          People

            jeff.yemin@mongodb.com Jeffrey Yemin
            dude Dude Dou
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: