MongoSocketOpenException: Exception opening socket

8,649 views
Skip to first unread message

Andrew M

unread,
May 18, 2015, 5:27:57 AM5/18/15
to mongod...@googlegroups.com
Does anyone know a likely cause of this from my Java app?  Running version 3.  I have some tailing cursors on capped collections.  I have been running  db.currentOp() and I only see 6 connections inprog.
Thanks!




May 14, 2015 11:52:23 PM com.mongodb.diagnostics.logging.JULLogger log
INFO: Cluster created with settings {hosts=[192.168.0.4:27017], mode=SINGLE, req
uiredClusterType=UNKNOWN, serverSelectionTimeout='30000 ms', maxWaitQueueSize=500}

May 14, 2015 11:52:23 PM com.mongodb.diagnostics.logging.JULLogger log
INFO: No server chosen by PrimaryServerSelector from cluster description Cluster
Description{type=UNKNOWN, connectionMode=SINGLE, all=[ServerDescription{address=
192.168.0.4:27017, type=UNKNOWN, state=CONNECTING}]}. Waiting for 30000 ms before timing out

May 14, 2015 11:52:23 PM com.mongodb.diagnostics.logging.JULLogger log
INFO: Opened connection [connectionId{localValue:1, serverValue:2265}] to 192.16
8.0.4:27017

May 14, 2015 11:52:23 PM com.mongodb.diagnostics.logging.JULLogger log
INFO: Monitor thread successfully connected to server with description ServerDes
cription{address=192.168.0.4:27017, type=STANDALONE, state=CONNECTED, ok=true,
version=ServerVersion{versionList=[3, 0, 2]}, minWireVersion=0, maxWireVersion=3,
 maxDocumentSize=16777216, roundTripTimeNanos=1532239}

May 14, 2015 11:52:23 PM com.mongodb.diagnostics.logging.JULLogger log
INFO: Opened connection [connectionId{localValue:2, serverValue:2266}] to 192.168.0.4:27017

May 14, 2015 11:52:27 PM com.mongodb.diagnostics.logging.JULLogger log
INFO: Opened connection [connectionId{localValue:3, serverValue:2267}] to 192.168.0.4:27017

May 15, 2015 12:07:20 PM com.mongodb.diagnostics.logging.JULLogger log
INFO: Exception in monitor thread while connecting to server 192.168.0.4:27017
com.mongodb.MongoSocketOpenException: Exception opening socket
        at com.mongodb.connection.SocketStream.open(SocketStream.java:63)
        at com.mongodb.connection.InternalStreamConnection.open(InternalStreamConnection.java:114)
        at com.mongodb.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:141)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.SocketTimeoutException: connect timed out
        at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
        at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:85)
        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:345)
        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
        at java.net.Socket.connect(Socket.java:589)
        at com.mongodb.connection.SocketStreamHelper.initialize(SocketStreamHelper.java:50)
        at com.mongodb.connection.SocketStream.open(SocketStream.java:58)
        ... 3 more

Ross Lawley

unread,
May 22, 2015, 7:10:09 AM5/22/15
to mongod...@googlegroups.com
Hi Andrew,


As the questions are related lets continue the conversation there.

Ross
Reply all
Reply to author
Forward
0 new messages