com.mongodb.MongoException$Network

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Jul 31, 2013 10:34:37 AM com.mongodb.DBPortPool gotError WARNING: emptying DBPortPool to ec2-54-216-117-46.eu-west-1.compute.amazonaws.com/10.208.48.102:27017 b/c of error java.net.SocketException: Connection timed out at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:129) at java.io.BufferedInputStream.fill(BufferedInputStream.java:218) at java.io.BufferedInputStream.read1(BufferedInputStream.java:258) at java.io.BufferedInputStream.read(BufferedInputStream.java:317) at org.bson.io.Bits.readFully(Bits.java:46) 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:124) at com.mongodb.DBPort.call(DBPort.java:74) at com.mongodb.DBTCPConnector.innerCall(DBTCPConnector.java:283) at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:256) at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:225) at com.mongodb.DBApiLayer$Result._advance(DBApiLayer.java:431) at com.mongodb.DBApiLayer$Result.hasNext(DBApiLayer.java:400) at com.mongodb.DBCursor._hasNext(DBCursor.java:464) at com.mongodb.DBCursor.hasNext(DBCursor.java:484) at org.pentaho.di.trans.steps.mongodbinput.MongoDbInput.processRow(MongoDbInput.java:77) at org.pentaho.di.trans.step.RunThread.run(RunThread.java:50) at java.lang.Thread.run(Thread.java:662) ERROR 31-07 10:34:37,118 - Data - Unexpected error ERROR 31-07 10:34:37,120 - Data - com.mongodb.MongoException$Network: can't call something : ec2-54-216-117-46.eu-west-1.compute.amazonaws.com/10.208.48.102:27017/ETL at com.mongodb.DBTCPConnector.innerCall(DBTCPConnector.java:292) at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:256) at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:225) at com.mongodb.DBApiLayer$Result._advance(DBApiLayer.java:431) at com.mongodb.DBApiLayer$Result.hasNext(DBApiLayer.java:400) at com.mongodb.DBCursor._hasNext(DBCursor.java:464) at com.mongodb.DBCursor.hasNext(DBCursor.java:484) at org.pentaho.di.trans.steps.mongodbinput.MongoDbInput.processRow(MongoDbInput.java:77) at org.pentaho.di.trans.step.RunThread.run(RunThread.java:50) at java.lang.Thread.run(Thread.java:662) Caused by: java.net.SocketException: Connection timed out at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:129) at java.io.BufferedInputStream.fill(BufferedInputStream.java:218) at java.io.BufferedInputStream.read1(BufferedInputStream.java:258) at java.io.BufferedInputStream.read(BufferedInputStream.java:317) at org.bson.io.Bits.readFully(Bits.java:46) 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:124) at com.mongodb.DBPort.call(DBPort.java:74) at com.mongodb.DBTCPConnector.innerCall(DBTCPConnector.java:283) ... 9 more
    via by Rafael Valenzuela,
  • Jul 31, 2013 10:34:37 AM com.mongodb.DBPortPool gotError WARNING: emptying DBPortPool to ec2-54-216-117-46.eu-west-1.compute.amazonaws.com/10.208.48.102:27017 b/c of error java.net.SocketException: Connection timed out at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:129) at java.io.BufferedInputStream.fill(BufferedInputStream.java:218) at java.io.BufferedInputStream.read1(BufferedInputStream.java:258) at java.io.BufferedInputStream.read(BufferedInputStream.java:317) at org.bson.io.Bits.readFully(Bits.java:46) 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:124) at com.mongodb.DBPort.call(DBPort.java:74) at com.mongodb.DBTCPConnector.innerCall(DBTCPConnector.java:283) at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:256) at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:225) at com.mongodb.DBApiLayer$Result._advance(DBApiLayer.java:431) at com.mongodb.DBApiLayer$Result.hasNext(DBApiLayer.java:400) at com.mongodb.DBCursor._hasNext(DBCursor.java:464) at com.mongodb.DBCursor.hasNext(DBCursor.java:484) at org.pentaho.di.trans.steps.mongodbinput.MongoDbInput.processRow(MongoDbInput.java:77) at org.pentaho.di.trans.step.RunThread.run(RunThread.java:50) at java.lang.Thread.run(Thread.java:662) ERROR 31-07 10:34:37,118 - Data - Unexpected error ERROR 31-07 10:34:37,120 - Data - com.mongodb.MongoException$Network: can't call something : ec2-54-216-117-46.eu-west-1.compute.amazonaws.com/10.208.48.102:27017/ETL at com.mongodb.DBTCPConnector.innerCall(DBTCPConnector.java:292) at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:256) at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:225) at com.mongodb.DBApiLayer$Result._advance(DBApiLayer.java:431) at com.mongodb.DBApiLayer$Result.hasNext(DBApiLayer.java:400) at com.mongodb.DBCursor._hasNext(DBCursor.java:464) at com.mongodb.DBCursor.hasNext(DBCursor.java:484) at org.pentaho.di.trans.steps.mongodbinput.MongoDbInput.processRow(MongoDbInput.java:77) at org.pentaho.di.trans.step.RunThread.run(RunThread.java:50) at java.lang.Thread.run(Thread.java:662) Caused by: java.net.SocketException: Connection timed out at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:129) at java.io.BufferedInputStream.fill(BufferedInputStream.java:218) at java.io.BufferedInputStream.read1(BufferedInputStream.java:258) at java.io.BufferedInputStream.read(BufferedInputStream.java:317) at org.bson.io.Bits.readFully(Bits.java:46) 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:124) at com.mongodb.DBPort.call(DBPort.java:74) at com.mongodb.DBTCPConnector.innerCall(DBTCPConnector.java:283) ... 9 more
    via by Rafael Valenzuela,
  • Retry mongodb connection
    via GitHub by j0hnsmith
    ,
  • SocketException in Mongo
    via Stack Overflow by Greg
    ,
  • I just had this build problem, that a job that normally takes 5-10 mins (building hudson/main at hudson.ramfelt.se) was still running after an hour. The build had stopped at "Archiving artifacts", which is a simple "**/war/target/hudson.war". The job was executed on a Hudson windows machine running JNLP. This may be related to that the Hudson just was updated to 1.236 and Im not sure what version the JNLP slave is using. Killing the job through the web UI, generated the below exception stack. For the job itself: http://hudson.ramfelt.se/job/Hudson%20Main/139/jdk=SUN%20JDK%206.0,label=Windows /console ERROR: Failed to archive artifacts: **/war/target/hudson.war hudson.util.IOException2: hudson.util.IOException2: Failed to extract C:\HudsonOnHudson\workspace\Hudson Main\jdk/SUN JDK 6.0/label/Windows/**/war/target/hudson.war at hudson.FilePath.readFromTar(FilePath.java:1731) at hudson.FilePath.copyRecursiveTo(FilePath.java:1402) at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:117) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:480) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java :466) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java :454) at hudson.model.Build$RunnerImpl.post2(Build.java:146) at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:438) at hudson.model.Run.run(Run.java:1143) at hudson.matrix.MatrixRun.run(MatrixRun.java:130) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:123) Caused by: java.io.IOException at hudson.remoting.FastPipedInputStream.read(FastPipedInputStream.java:161) at hudson.util.HeadBufferingStream.read(HeadBufferingStream.java:61) at java.util.zip.InflaterInputStream.fill(InflaterInputStream.java:221) at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:141) at java.util.zip.GZIPInputStream.read(GZIPInputStream.java:92) at org.apache.tools.tar.TarBuffer.readBlock(TarBuffer.java:257) at org.apache.tools.tar.TarBuffer.readRecord(TarBuffer.java:223) at hudson.org.apache.tools.tar.TarInputStream.read(TarInputStream.java:345) at java.io.FilterInputStream.read(FilterInputStream.java:90) at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1025) at org.apache.commons.io.IOUtils.copy(IOUtils.java:999) at hudson.FilePath.readFromTar(FilePath.java:1716) ... 12 more at hudson.FilePath.copyRecursiveTo(FilePath.java:1409) at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:117) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:480) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java :466) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java :454) at hudson.model.Build$RunnerImpl.post2(Build.java:146) at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:438) at hudson.model.Run.run(Run.java:1143) at hudson.matrix.MatrixRun.run(MatrixRun.java:130) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:123) Caused by: java.util.concurrent.ExecutionException: hudson.remoting.RequestAbortedException: java.net.SocketException: Connection timed out at hudson.remoting.Request$1.get(Request.java:210) at hudson.remoting.Request$1.get(Request.java:165) at hudson.remoting.FutureAdapter.get(FutureAdapter.java:59) at hudson.FilePath.copyRecursiveTo(FilePath.java:1405) ... 11 more Caused by: hudson.remoting.RequestAbortedException: java.net.SocketException: Connection timed out at hudson.remoting.Request.abort(Request.java:231) at hudson.remoting.Channel.terminate(Channel.java:596) at hudson.remoting.Channel$ReaderThread.run(Channel.java:871) Caused by: java.net.SocketException: Connection timed out at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:129) at java.io.BufferedInputStream.fill(BufferedInputStream.java:218) at java.io.BufferedInputStream.read(BufferedInputStream.java:237) at java.io.ObjectInputStream$PeekInputStream.peek(ObjectInputStream.java:2249) at java.io.ObjectInputStream$BlockDataInputStream.peek(ObjectInputStream.java:2542) at java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2 552) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1297) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351) at hudson.remoting.Channel$ReaderThread.run(Channel.java:851)
    via by redsolo,
  • I've got a MongoDB replica set across two datacenters. In my second data center I have some servers that point back to the primary instance in data center 1. I ran into a connection timeout issue (this happens pretty consistently) on the server, here is the stack trace: com.mongodb.DBPortPool gotError WARNING: emptying DBPortPool to 10.240.110.42:27017 b/c of error java.net.SocketException: Connection timed out at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:129) at java.io.BufferedInputStream.fill(BufferedInputStream.java:218) at java.io.BufferedInputStream.read1(BufferedInputStream.java:256) at java.io.BufferedInputStream.read(BufferedInputStream.java:313) at org.bson.io.Bits.readFully(Bits.java:35) at org.bson.io.Bits.readFully(Bits.java:28) at com.mongodb.Response.<init>(Response.java:39) at com.mongodb.DBPort.go(DBPort.java:123) at com.mongodb.DBPort.go(DBPort.java:82) at com.mongodb.DBPort.call(DBPort.java:72) at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:202) at com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:303) at com.mongodb.DBCollection.findOne(DBCollection.java:565) at com.mongodb.DBCollection.findOne(DBCollection.java:554) Is it possible for the driver to attempt recreate the connections and retry the query? It looks like the next query worked as expected. I do not see these errors on servers in the same data center as the primary mongodb server Note: latency between the my app server and the primary mongodb server is ~50 ms THANKS!
    via by John Danner,
    • com.mongodb.MongoException$Network: can't call something : ec2-54-216-117-46.eu-west-1.compute.amazonaws.com/10.208.48.102:27017/ETL at com.mongodb.DBTCPConnector.innerCall(DBTCPConnector.java:292) at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:256) at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:225) at com.mongodb.DBApiLayer$Result._advance(DBApiLayer.java:431) at com.mongodb.DBApiLayer$Result.hasNext(DBApiLayer.java:400) at com.mongodb.DBCursor._hasNext(DBCursor.java:464) at com.mongodb.DBCursor.hasNext(DBCursor.java:484) at org.pentaho.di.trans.steps.mongodbinput.MongoDbInput.processRow(MongoDbInput.java:77) at org.pentaho.di.trans.step.RunThread.run(RunThread.java:50) at java.lang.Thread.run(Thread.java:662) Caused by: java.net.SocketException: Connection timed out at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:129) at java.io.BufferedInputStream.fill(BufferedInputStream.java:218) at java.io.BufferedInputStream.read1(BufferedInputStream.java:258) at java.io.BufferedInputStream.read(BufferedInputStream.java:317) at org.bson.io.Bits.readFully(Bits.java:46) 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:124) at com.mongodb.DBPort.call(DBPort.java:74) at com.mongodb.DBTCPConnector.innerCall(DBTCPConnector.java:283) ... 9 more

    Users with the same issue

    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Nikolay RybakNikolay Rybak
    1 times, last one,
    mauritiusmauritius
    2 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    112 more bugmates