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

Solutions on the web

via GitHub by nerotix
, 1 year ago
Timed out after 5000 ms while waiting for a server that matches ReadPreferenceServerSelector{readPreference=primaryPreferred}. Client view of cluster state is {type=UNKNOWN, servers=[{address=localhost:27017, type=UNKNOWN, state=CONNECTING
via Stack Overflow by Nerotix
, 1 year ago
Timed out after 5000 ms while waiting for a server that matches ReadPreferenceServerSelector{readPreference=primaryPreferred}. Client view of cluster state is {type=UNKNOWN, servers=[{address=localhost:27017, type=UNKNOWN, state=CONNECTING
via Google Groups by Tam Truong, 10 months ago
Timed out after 30000 ms while wai ting for a server that matches ReadPreferenceServerSelector{readPreference=prima ry}. Client view of cluster state is {type=UNKNOWN, servers=[{address=locahost:2 7017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketExceptio n: locahost}, *caused by* {java.net.UnknownHostException: locahost}}]
via Google Groups by navaneet...@gmail.com, 1 month ago
Timed out after 20000 ms while waiting for a server that matches ReadPreferenceServerSelector{readPreference=primary}. Client view of cluster state is {type=UNKNOWN, servers=[{address=mongodb://<username>:<password>@ name-shard-00-01
via Google Groups by navaneet...@gmail.com, 1 month ago
Timed out after 20000 ms while waiting for a server that matches ReadPreferenceServerSelector{readPreference=primary}. Client view of cluster state is {type=UNKNOWN, servers=[{address=mongodb://<username>:<password>@name-shard-00-01
via Stack Overflow by kheffner
, 8 months ago
Timed out after 30000 ms while waiting for a server that matches ReadPreferenceServerSelector{readPreference=primary}. Client view of cluster state is {type=UNKNOWN, servers=[{address=[dbAddress]:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketOpenException: Exception opening socket}, caused by {java.net.SocketTimeoutException: connect timed out}}]
com.mongodb.MongoTimeoutException: Timed out after 5000 ms while waiting for a server that matches ReadPreferenceServerSelector{readPreference=primaryPreferred}. Client view of cluster state is {type=UNKNOWN, servers=[{address=localhost:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSecurityException: Exception authenticating MongoCredential{mechanism=PLAIN, userName='admin', source='yapdns', password=<hidden>, mechanismProperties={}}}, caused by {com.mongodb.MongoCommandException: Command failed with error 59: 'no such cmd: saslStart' on server localhost:27017. The full response is { "ok" : 0.0, "errmsg" : "no such cmd: saslStart", "code" : 59, "bad cmd" : { "saslStart" : 1, "mechanism" : "PLAIN", "payload" : { "$binary" : "YWRtaW4AYWRtaW4AYWRtaW4xMjM=", "$type" : "0" } } }}}]	at com.mongodb.connection.BaseCluster.createTimeoutException(BaseCluster.java:369)	at com.mongodb.connection.BaseCluster.selectServer(BaseCluster.java:101)	at com.mongodb.binding.ClusterBinding$ClusterBindingConnectionSource.(ClusterBinding.java:75)	at com.mongodb.binding.ClusterBinding$ClusterBindingConnectionSource.(ClusterBinding.java:71)	at com.mongodb.binding.ClusterBinding.getReadConnectionSource(ClusterBinding.java:63)	at com.mongodb.operation.OperationHelper.withConnection(OperationHelper.java:201)	at com.mongodb.operation.CountOperation.execute(CountOperation.java:206)	at com.mongodb.operation.CountOperation.execute(CountOperation.java:53)	at com.mongodb.Mongo.execute(Mongo.java:772)	at com.mongodb.Mongo$2.execute(Mongo.java:759)	at com.mongodb.MongoCollectionImpl.count(MongoCollectionImpl.java:185)	at com.mongodb.MongoCollectionImpl.count(MongoCollectionImpl.java:170)	at com.kodcu.provider.MongoToElasticProvider.getCount(MongoToElasticProvider.java:33)	at com.kodcu.provider.Provider.transfer(Provider.java:17)	at com.kodcu.main.Mongolastic.proceedService(Mongolastic.java:61)	at java.util.Optional.ifPresent(Optional.java:159)	at com.kodcu.main.Mongolastic.start(Mongolastic.java:50)	at com.kodcu.main.Mongolastic.main(Mongolastic.java:38)