Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

  1. ,
    via Stack Overflow by orid

    You should init MongoClient only once.

Solutions on the web

via JIRA by Jyoti Das, 1 year ago
Timed out while waiting for a server that matches AnyServerSelector{} after 10000 ms
via JIRA by Jyoti Das, 2 years ago
Timed out while waiting for a server that matches AnyServerSelector{} after 10000 ms
via zgxue.com by Unknown author, 2 years ago
Timed out while waiting for a server that matches {serverSelectors=[ReadPreferenceServerSelector{readPreference=primary}, LatencyMinimizingServerSelector{acceptableLatencyDifference=15ms}]} after 806 ms
via oschina.net by Unknown author, 2 years ago
Timed out while waiting for a server that matches {serverSelectors=[ReadPreferenceServerSelector{readPreference=primary}, LatencyMinimizingServerSelector{acceptableLatencyDifference=1000ms}]} after 806 ms
via Google Groups by AbeW, 2 years ago
Timed out while waiting for a server that matches AnyServerSelector{} after 10000 ms
via grokbase.com by Unknown author, 2 years ago
Timed out while waiting for a server that matches AnyServerSelector{} after 10000 ms
com.mongodb.MongoTimeoutException: Timed out while waiting for a server that matches AnyServerSelector{} after 10000 ms at com.mongodb.BaseCluster.getServer(BaseCluster.java:87) at com.mongodb.DBTCPConnector.getServer(DBTCPConnector.java:654) at com.mongodb.DBTCPConnector.access$300(DBTCPConnector.java:39) at com.mongodb.DBTCPConnector$MyPort.getConnection(DBTCPConnector.java:503) at com.mongodb.DBTCPConnector$MyPort.get(DBTCPConnector.java:451) at com.mongodb.DBTCPConnector.getPrimaryPort(DBTCPConnector.java:409) at com.mongodb.DBCollectionImpl.insert(DBCollectionImpl.java:182) at com.mongodb.DBCollectionImpl.insert(DBCollectionImpl.java:165) at com.mongodb.DBCollection.insert(DBCollection.java:161) at com.mongodb.DBCollection.insert(DBCollection.java:107) at com.mongodb.DBCollection.save(DBCollection.java:966) at com.mongodb.DBCollection.save(DBCollection.java:934) at com.mongodb.gridfs.GridFSInputFile._dumpBuffer(GridFSInputFile.java:281) at com.mongodb.gridfs.GridFSInputFile.saveChunks(GridFSInputFile.java:231) at com.mongodb.gridfs.GridFSInputFile.save(GridFSInputFile.java:177) at com.mongodb.gridfs.GridFSInputFile.save(GridFSInputFile.java:158) at es.db.mongodb.MongodbTest.main(MongodbTest.java:76)