com.mongodb.MongoException$Network: can't call something

JIRA | Alvin Richards | 6 years ago
  1. 0

    Problem: Running a bulk insert via a Java program into a 3 shard system. After about 30 minutes I see the following errors in the log file for the router node Thu Sep 9 19:09:15 [conn8] autosplitting scaleout.blogs size: 125479578 shard: ns:scaleout.blogs at: replset0:replset0/10.204.33.94:27000 lastmod: 3|25 min: { ts: -539057490 } max: { ts: -2960867 } on: { ts: -271305523 }(splitThreshold 104857600) Thu Sep 9 19:09:15 [conn8] ERROR: splitIfShould failed: locking namespace failed Thu Sep 9 19:09:25 [conn6] autosplitting scaleout.blogs size: 125322369 shard: ns:scaleout.blogs at: replset0:replset0/10.204.33.94:27000 lastmod: 3|23 min: { ts: -1610580558 } max: { ts: -1076104534 } on: { ts: -1343209153 }(splitThreshold 104857600) Thu Sep 9 19:09:25 [conn6] ERROR: splitIfShould failed: locking namespace failed Thu Sep 9 19:22:21 [conn2] end connection 71.139.0.44:55312 At the same time, I see my Java clients fail with Exception in thread "Thread-1" com.mongodb.MongoException$Network: can't call something at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:194) at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:192) at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:192) at com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:223) at com.mongodb.DBCollection.findOne(DBCollection.java:486) at com.mongodb.DBCollection.findOne(DBCollection.java:475) at com.mongodb.DB.command(DB.java:137) at com.mongodb.DB.getLastError(DB.java:283) at InsertSpeed$Runner.run(InsertSpeed.java:64) Caused by: java.io.IOException: couldn't connect to [/10.204.69.250:27500] bc:java.net.ConnectException: Connection timed out at com.mongodb.DBPort._open(DBPort.java:150) at com.mongodb.DBPort.go(DBPort.java:70) at com.mongodb.DBPort.call(DBPort.java:56) at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:186) ... 8 more All mongod's are still running on all machines. Reproduce: Not clear, second run did not hit this problem. Solution: Need to understand why this error is occurring and what the user can do about it. Business Case: Reliability

    JIRA | 6 years ago | Alvin Richards
    com.mongodb.MongoException$Network: can't call something
  2. 0

    Problem: Running a bulk insert via a Java program into a 3 shard system. After about 30 minutes I see the following errors in the log file for the router node Thu Sep 9 19:09:15 [conn8] autosplitting scaleout.blogs size: 125479578 shard: ns:scaleout.blogs at: replset0:replset0/10.204.33.94:27000 lastmod: 3|25 min: { ts: -539057490 } max: { ts: -2960867 } on: { ts: -271305523 }(splitThreshold 104857600) Thu Sep 9 19:09:15 [conn8] ERROR: splitIfShould failed: locking namespace failed Thu Sep 9 19:09:25 [conn6] autosplitting scaleout.blogs size: 125322369 shard: ns:scaleout.blogs at: replset0:replset0/10.204.33.94:27000 lastmod: 3|23 min: { ts: -1610580558 } max: { ts: -1076104534 } on: { ts: -1343209153 }(splitThreshold 104857600) Thu Sep 9 19:09:25 [conn6] ERROR: splitIfShould failed: locking namespace failed Thu Sep 9 19:22:21 [conn2] end connection 71.139.0.44:55312 At the same time, I see my Java clients fail with Exception in thread "Thread-1" com.mongodb.MongoException$Network: can't call something at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:194) at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:192) at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:192) at com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:223) at com.mongodb.DBCollection.findOne(DBCollection.java:486) at com.mongodb.DBCollection.findOne(DBCollection.java:475) at com.mongodb.DB.command(DB.java:137) at com.mongodb.DB.getLastError(DB.java:283) at InsertSpeed$Runner.run(InsertSpeed.java:64) Caused by: java.io.IOException: couldn't connect to [/10.204.69.250:27500] bc:java.net.ConnectException: Connection timed out at com.mongodb.DBPort._open(DBPort.java:150) at com.mongodb.DBPort.go(DBPort.java:70) at com.mongodb.DBPort.call(DBPort.java:56) at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:186) ... 8 more All mongod's are still running on all machines. Reproduce: Not clear, second run did not hit this problem. Solution: Need to understand why this error is occurring and what the user can do about it. Business Case: Reliability

    JIRA | 6 years ago | Alvin Richards
    com.mongodb.MongoException$Network: can't call something
  3. 0

    Error in mongo

    Google Groups | 2 years ago | Pruzam
    com.mongodb.MongoException$Network: Read operation to server localhost/127.0.0.1:27017 failed on database predictionio_modeldata
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Weird error with MongoDb + Java driver

    Stack Overflow | 5 years ago | Kane Nguyen
    java.io.IOException: couldn't connect to [eid/67.215.65.132:27017] bc:java.net.ConnectException: Connection timed out
  6. 0

    Our application runs on machines that are sometimes moved between networks or has its IP address changed. When we create the Mongo instance it is done using the "localhost" host for the Mongo server. The Mongo driver appears to always resolve to an IP on the local subnet. "192.168.0.10" for example. When the network chances however, our applications starts failing with errors like the following because it can no longer connect: jvm 1 | java.io.IOException: couldn't connect to [io/192.168.0.10:27017] bc:java.net.ConnectException: Operation timed out jvm 1 | at com.mongodb.DBPort._open(DBPort.java:205) jvm 1 | at com.mongodb.DBPort.go(DBPort.java:94) jvm 1 | at com.mongodb.DBPort.go(DBPort.java:75) jvm 1 | at com.mongodb.DBPort.call(DBPort.java:65) jvm 1 | at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:215) jvm 1 | at com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:295) jvm 1 | at com.mongodb.DBCursor._check(DBCursor.java:354) jvm 1 | at com.mongodb.DBCursor._hasNext(DBCursor.java:484) jvm 1 | at com.mongodb.DBCursor.hasNext(DBCursor.java:509) jvm 1 | at com.mongodb.jdbc.MongoResultSet.next(MongoResultSet.java:640) ... I have configured the Mongo instance to automatically try to reconnect, but the conversion from "localhost" to "192.168.0.10" only happens once. The only way to get Mongo to reconnect is to restart the Java instance. I assume that there is a reason why the IP is being resolved, but would it be possible to make the driver re-resolve the IP when doing a reconnect? Thanks in advance, Leif

    JIRA | 6 years ago | Leif Mortenson
    java.io.IOException: couldn't connect to [io/192.168.0.10:27017] bc:java.net.ConnectException: Operation timed out

    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.IOException

      couldn't connect to [/10.204.69.250:27500] bc:java.net.ConnectException: Connection timed out

      at com.mongodb.DBPort._open()
    2. MongoDB Java Driver
      DB.getLastError
      1. com.mongodb.DBPort._open(DBPort.java:150)
      2. com.mongodb.DBPort.go(DBPort.java:70)
      3. com.mongodb.DBPort.call(DBPort.java:56)
      4. com.mongodb.DBTCPConnector.call(DBTCPConnector.java:186)
      5. com.mongodb.DBTCPConnector.call(DBTCPConnector.java:192)
      6. com.mongodb.DBTCPConnector.call(DBTCPConnector.java:192)
      7. com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:223)
      8. com.mongodb.DBCollection.findOne(DBCollection.java:486)
      9. com.mongodb.DBCollection.findOne(DBCollection.java:475)
      10. com.mongodb.DB.command(DB.java:137)
      11. com.mongodb.DB.getLastError(DB.java:283)
      11 frames
    3. Unknown
      InsertSpeed$Runner.run
      1. InsertSpeed$Runner.run(InsertSpeed.java:64)
      1 frame