com.mongodb.MongoException: not talking to master and retries used up

JIRA | Vincent Sevel | 4 years ago
  1. 0

    a client using the java driver encounters exceptions when reading from a server that gets restarted gracefully, although another node is up and available for reads. I use a topology of 2 nodes, with one being set as a fixed primary for my tests. on the client side I use read mode primaryPreferred. during the test, I constantly query a collection while repeatdly restarting the primary using the windows service. the expectation is that a read never fails because: 1) the primary is gracefully restarted and 2) the secondary is always up and running. during the course of running the test, I get exceptions on the client side from time to time. so far I identified these 2: {code} java.lang.NullPointerException at com.mongodb.DBTCPConnector$MyPort.error(DBTCPConnector.java:470) at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:281) at com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:290) at com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:275) at com.mongodb.DBCollection.findOne(DBCollection.java:727) at com.mongodb.DBCollection.findOne(DBCollection.java:669) at com.lodh.arte.test.robustmongo.ReproducerPrimaryPreferredSystemTest.readSecondary(ReproducerPrimaryPreferredSystemTest.java:87) {code} {code} com.mongodb.MongoException: not talking to master and retries used up at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:304) at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:306) at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:306) at com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:290) at com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:275) at com.mongodb.DBCollection.findOne(DBCollection.java:727) at com.mongodb.DBCollection.findOne(DBCollection.java:669) at com.lodh.arte.test.robustmongo.ReproducerPrimaryPreferredSystemTest.readSecondary(ReproducerPrimaryPreferredSystemTest.java:87) {code}

    JIRA | 4 years ago | Vincent Sevel
    com.mongodb.MongoException: not talking to master and retries used up
  2. 0

    [mongodb-user] db error [not master]

    Google Groups | 7 years ago | Zsombor
    com.mongodb.MongoException: not talking to master and retries used up
  3. 0

    Error using $elemMatch

    GitHub | 3 years ago | ubiquitousthey
    com.mongodb.MongoException: invalid parameter: expected an object ($elemMatch)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Problem reading from primary using Java driver and TaggedReadPreference

    Google Groups | 5 years ago | Bryan Hunt
    com.mongodb.MongoException: Could not find any valid secondaries with the supplied tags ('{ "locale" : "sc"}'
  6. 0

    Does the Java Driver support $slice operator?

    Google Groups | 6 years ago | Stuart King
    com.mongodb.MongoException: invalid operator: $slice

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. com.mongodb.MongoException

      not talking to master and retries used up

      at com.mongodb.DBTCPConnector.call()
    2. MongoDB Java Driver
      DBCollection.findOne
      1. com.mongodb.DBTCPConnector.call(DBTCPConnector.java:304)
      2. com.mongodb.DBTCPConnector.call(DBTCPConnector.java:306)
      3. com.mongodb.DBTCPConnector.call(DBTCPConnector.java:306)
      4. com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:290)
      5. com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:275)
      6. com.mongodb.DBCollection.findOne(DBCollection.java:727)
      7. com.mongodb.DBCollection.findOne(DBCollection.java:669)
      7 frames
    3. com.lodh.arte
      ReproducerPrimaryPreferredSystemTest.readSecondary
      1. com.lodh.arte.test.robustmongo.ReproducerPrimaryPreferredSystemTest.readSecondary(ReproducerPrimaryPreferredSystemTest.java:87)
      1 frame