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

Error connecting to secondary when there is no member with _id: 1

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 2.12.2
    • Component/s: Connection Management
    • None
    • Environment:
      three member replica set with 1 arbiter
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      It looks as if the driver is unable to connect to secondary if the replica set member id's dont follow a continuous order from _id: 0. Sometimes I use a read preference of 'nearest' when calling the java driver.

      Through removal and addition of replica members, I found myself with the following replicaset config:

      "_id" : "rs0",
      "version" : 29,
      "members" : [

      { "_id" : 4, "host" : "54.209.160.30:27017" }

      ,

      { "_id" : 5, "host" : "54.186.49.236:27017", "priority" : 3 }

      ,

      { "_id" : 6, "host" : "54.187.243.162:27017", "arbiterOnly" : true }

      ]

      I noticed that in the logs of the primary, the continuous repetition of the following:

      2014-05-30T00:01:09.050+0000 [initandlisten] connection accepted from 54.209.160.30:59140 #523020 (18 connections now open)
      2014-05-30T00:01:09.293+0000 [conn523020] authenticate db: local

      { authenticate: 1, nonce: "xxx", user: "__system", key: "xxx" }

      2014-05-30T00:01:09.453+0000 [conn523020] replset couldn't find a slave with id 1, not tracking 53692f8a311b1b09a941a1c3
      2014-05-30T00:01:09.533+0000 [conn523020] end connection 54.209.160.30:59140 (17 connections now open)

      The logging statement are the only symptom of the issue. I have not noticed any connectivity problem from the java application. I dont knowif the driver is actually finding the 'nearest' replica member or just choosing primary due to this issue.

            Assignee:
            Unassigned Unassigned
            Reporter:
            bamaro bamaro
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              None
              None
              None
              None