MongoDB connecting issues

Discussion in 'Spigot Plugin Development' started by Domboing, Jun 10, 2018.

  1. Code (Text):
    [21:59:43 INFO]: No server chosen by ReadPreferenceServerSelector{readPreference=primary} from cluster description ClusterDescription{type=UNKNOWN, connectionMode=SINGLE, all=[ServerDescription{address=127.0.0.1:27017, type=UNKNOWN, state=CONNECTING}]}. Waiting for 30000 ms before timing out
    [21:59:54 INFO]: Exception in monitor thread while connecting to server 127.0.0.1:27017
    com.mongodb.MongoSocketReadTimeoutException: Timeout while receiving message
            at com.mongodb.connection.InternalStreamConnection.translateReadException(InternalStreamConnection.java:473) ~[cLib.jar:?]
            at com.mongodb.connection.InternalStreamConnection.receiveMessage(InternalStreamConnection.java:224) ~[cLib.jar:?]
            at com.mongodb.connection.CommandHelper.receiveReply(CommandHelper.java:134) ~[cLib.jar:?]
            at com.mongodb.connection.CommandHelper.receiveCommandResult(CommandHelper.java:121) ~[cLib.jar:?]
            at com.mongodb.connection.CommandHelper.executeCommand(CommandHelper.java:32) ~[cLib.jar:?]
            at com.mongodb.connection.InternalStreamConnectionInitializer.initializeConnectionDescription(InternalStreamConnectionInitializer.java:83) ~[cLib.jar:?]
            at com.mongodb.connection.InternalStreamConnectionInitializer.initialize(InternalStreamConnectionInitializer.java:43) ~[cLib.jar:?]
            at com.mongodb.connection.InternalStreamConnection.open(InternalStreamConnection.java:115) ~[cLib.jar:?]
            at com.mongodb.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:127) [cLib.jar:?]
            at java.lang.Thread.run(Unknown Source) [?:1.8.0_161]
    Caused by: java.net.SocketTimeoutException: Read timed out
            at java.net.SocketInputStream.socketRead0(Native Method) ~[?:1.8.0_161]
            at java.net.SocketInputStream.socketRead(Unknown Source) ~[?:1.8.0_161]
            at java.net.SocketInputStream.read(Unknown Source) ~[?:1.8.0_161]
            at java.net.SocketInputStream.read(Unknown Source) ~[?:1.8.0_161]
            at com.mongodb.connection.SocketStream.read(SocketStream.java:85) ~[cLib.jar:?]
            at com.mongodb.connection.InternalStreamConnection.receiveResponseBuffers(InternalStreamConnection.java:490) ~[cLib.jar:?]
            at com.mongodb.connection.InternalStreamConnection.receiveMessage(InternalStreamConnection.java:220) ~[cLib.jar:?]
            ... 8 more
    >
     
  2. this is caused by the connection between client and server being cut of before the transaction is complete
     
  3. Is there any way of fixing this