java.io.EOFException

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: /10.150.20.30:27000 - java.io.IOException - 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 /10.150.20.30:27000 b/c of error java.io.EOFException at org.bson.io.Bits.readFully(Bits.java:48) at org.bson.io.Bits.readFully(Bits.java:33) at org.bson.io.Bits.readFully(Bits.java:28) at com.mongodb.Response.<init>(Response.java:40) at com.mongodb.DBPort.go(DBPort.java:142) at com.mongodb.DBPort.go(DBPort.java:106) at com.mongodb.DBPort.findOne(DBPort.java:162) at com.mongodb.DBPort.runCommand(DBPort.java:170) at com.mongodb.DBTCPConnector._checkWriteError(DBTCPConnector.java:100) at com.mongodb.DBTCPConnector.say(DBTCPConnector.java:142) at com.mongodb.DBTCPConnector.say(DBTCPConnector.java:115) at com.mongodb.DBApiLayer$MyCollection.insert(DBApiLayer.java:248) at com.mongodb.DBApiLayer$MyCollection.insert(DBApiLayer.java:204) at com.mongodb.DBCollection.insert(DBCollection.java:148) at com.mongodb.DBCollection.insert(DBCollection.java:91) at com.mongodb.DBCollection.save(DBCollection.java:810) at org.springframework.data.mongodb.core.MongoTemplate$10.doInCollection(MongoTemplate.java:884) at org.springframework.data.mongodb.core.MongoTemplate.execute(MongoTemplate.java:388) at org.springframework.data.mongodb.core.MongoTemplate.saveDBObject(MongoTemplate.java:879) at org.springframework.data.mongodb.core.MongoTemplate.doSave(MongoTemplate.java:819) at org.springframework.data.mongodb.core.MongoTemplate.save(MongoTemplate.java:756) at org.springframework.data.mongodb.core.MongoTemplate.save(MongoTemplate.java:744) {noformat} {noformat} Aug 16, 2013 12:32:32 PM com.mongodb.ConnectionStatus$UpdatableNode update WARNING: Server seen down: /10.150.20.31:27000 - java.io.IOException - message: Connection refused: connect {noformat}

    JIRA | 3 years ago | gomil
    java.io.EOFException
  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
    java.io.EOFException
  4. 0

    Reading integer values from binary file using Java

    Stack Overflow | 6 years ago | rozar
    java.io.EOFException

    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. java.io.EOFException

      No message provided

      at org.bson.io.Bits.readFully()
    2. MongoDB Java Driver
      DBCollection.save
      1. org.bson.io.Bits.readFully(Bits.java:48)
      2. org.bson.io.Bits.readFully(Bits.java:33)
      3. org.bson.io.Bits.readFully(Bits.java:28)
      4. com.mongodb.Response.<init>(Response.java:40)
      5. com.mongodb.DBPort.go(DBPort.java:142)
      6. com.mongodb.DBPort.go(DBPort.java:106)
      7. com.mongodb.DBPort.findOne(DBPort.java:162)
      8. com.mongodb.DBPort.runCommand(DBPort.java:170)
      9. com.mongodb.DBTCPConnector._checkWriteError(DBTCPConnector.java:100)
      10. com.mongodb.DBTCPConnector.say(DBTCPConnector.java:142)
      11. com.mongodb.DBTCPConnector.say(DBTCPConnector.java:115)
      12. com.mongodb.DBApiLayer$MyCollection.insert(DBApiLayer.java:248)
      13. com.mongodb.DBApiLayer$MyCollection.insert(DBApiLayer.java:204)
      14. com.mongodb.DBCollection.insert(DBCollection.java:148)
      15. com.mongodb.DBCollection.insert(DBCollection.java:91)
      16. com.mongodb.DBCollection.save(DBCollection.java:810)
      16 frames
    3. Spring Data MongoDB - Core
      MongoTemplate.save
      1. org.springframework.data.mongodb.core.MongoTemplate$10.doInCollection(MongoTemplate.java:884)
      2. org.springframework.data.mongodb.core.MongoTemplate.execute(MongoTemplate.java:388)
      3. org.springframework.data.mongodb.core.MongoTemplate.saveDBObject(MongoTemplate.java:879)
      4. org.springframework.data.mongodb.core.MongoTemplate.doSave(MongoTemplate.java:819)
      5. org.springframework.data.mongodb.core.MongoTemplate.save(MongoTemplate.java:756)
      6. org.springframework.data.mongodb.core.MongoTemplate.save(MongoTemplate.java:744)
      6 frames