JIRA | gomil | 3 years ago
  1. 0

    Setup: ReplicaSet with two nodes (node30, node31) I use the java-driver (V2.11.2) with the constructor below (via Spring-Data's MongoFactoryBean) {code} new public Mongo( List<ServerAddress> seeds , MongoOptions options ) {code} If the master (node30) goes down, all further write-attempts fail: {noformat} Aug 16, 2013 11:52:30 AM com.mongodb.ConnectionStatus$UpdatableNode update WARNING: Server seen down: / - - message: Connection refused: connect {noformat} I analyzed the driver (class ReplicaSetStatus) - the old master (node30) is as expected no longer in "acceptableMembers" - the old secondary (node31) is now marked as master, but the old master (node30) is also marked as master - the method to find the actual master uses variable "all" instead of "acceptableMembers" and returns the old (dead) master (node30) I fixed it locally (used "acceptableMembers" instead of "all" in findMaster() ) and it worked fine for the first failover. BUT ... if node30 comes up again and node31 goes down I get another errormessage and then again the same error (-message) as above {noformat} Aug 16, 2013 12:30:20 PM com.mongodb.DBPortPool gotError WARNING: emptying DBPortPool to / b/c of error at at at at com.mongodb.Response.<init>( at com.mongodb.DBPort.go( at com.mongodb.DBPort.go( at com.mongodb.DBPort.findOne( at com.mongodb.DBPort.runCommand( at com.mongodb.DBTCPConnector._checkWriteError( at com.mongodb.DBTCPConnector.say( at com.mongodb.DBTCPConnector.say( at com.mongodb.DBApiLayer$MyCollection.insert( at com.mongodb.DBApiLayer$MyCollection.insert( at com.mongodb.DBCollection.insert( at com.mongodb.DBCollection.insert( at at$10.doInCollection( at at at at at {noformat} {noformat} Aug 16, 2013 12:32:32 PM com.mongodb.ConnectionStatus$UpdatableNode update WARNING: Server seen down: / - - message: Connection refused: connect {noformat}

    JIRA | 3 years ago | gomil
  2. Speed up your debug routine!

    Automated exception search integrated into your IDE

  3. 0

    Java streams with EOFException

    Stack Overflow | 4 years ago | user2224638
  4. 0

    Reading integer values from binary file using Java

    Stack Overflow | 5 years ago | rozar

    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


      No message provided

    2. MongoDB Java Driver
      4. com.mongodb.Response.<init>(
      5. com.mongodb.DBPort.go(
      6. com.mongodb.DBPort.go(
      7. com.mongodb.DBPort.findOne(
      8. com.mongodb.DBPort.runCommand(
      9. com.mongodb.DBTCPConnector._checkWriteError(
      10. com.mongodb.DBTCPConnector.say(
      11. com.mongodb.DBTCPConnector.say(
      12. com.mongodb.DBApiLayer$MyCollection.insert(
      13. com.mongodb.DBApiLayer$MyCollection.insert(
      14. com.mongodb.DBCollection.insert(
      15. com.mongodb.DBCollection.insert(
      16 frames
    3. Spring Data MongoDB - Core
      6 frames