com.mongodb.MongoTimeoutException

Timed out after 30000 ms while wa iting for a server that matches ReadPreferenceServerSelector{readPreference=prim ary}. Client view of cluster state is {type=UNKNOWN, servers=[{address=locahost: 27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketExcepti on: locahost},* caused by* {java.net.UnknownHostException: locahost}}]]]


Solutions on the web110

Solution icon of googlegroups
via Google Groups by Tam Truong, 2 months ago
Timed out after 30000 ms while wa iting for a server that matches ReadPreferenceServerSelector{readPreference=prim ary}. Client view of cluster state is {type=UNKNOWN, servers=[{address=locahost: 27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketExcepti on: locahost},* caused by* {java.net.UnknownHostException: locahost}}]]]

Solution icon of github
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=mongoplay:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketException: mongoplay}, caused by {java.net.UnknownHostException: mongoplay}}]

Solution icon of github
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=mongoplay:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketException: mongoplay}, caused by {java.net.UnknownHostException: mongoplay}}]

Solution icon of web
Timed out after 30000 ms while waiting for a server that matches ReadPreferenceServerSelector{readPreference=primary}. Client view of cluster state is {type=REPLICA_SET, servers=[{address=zcdb-1:27017, type=UNKNOWN, state=CONNECTING, exception

Solution icon of web
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=mon0101.pre2.zeldalabs.internal:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketReadException: Prematurely reached end of stream}}]

Solution icon of web
via oschina.net by Unknown author, 1 year ago
Timed out after 30000 ms while waiting for a server that matches ReadPreferenceServerSelector{readPreference=primary}. Client view of cluster state is {type=REPLICA_SET, servers=[{address=10.96.0.18:27017, type=UNKNOWN, state=CONNECTING, exception

Solution icon of web
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=192.168.0.4:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketOpenException: Exception opening socket}, caused by {java.net.SocketTimeoutException: connect timed out}}]

Solution icon of web
via csdn.net by Unknown author, 1 year 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=192.168.0.4:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketOpenException: Exception opening socket}, caused by {java.net.SocketTimeoutException: connect timed out}}]

Solution icon of github
via GitHub by BTGBIMobile
, 6 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=localhost:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketOpenException: Exception opening socket}, caused by {java.net.SocketTimeoutException: connect timed out}}]

Solution icon of stackoverflow
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}}]

Stack trace

  • com.mongodb.MongoTimeoutException: Timed out after 30000 ms while wa iting for a server that matches ReadPreferenceServerSelector{readPreference=prim ary}. Client view of cluster state is {type=UNKNOWN, servers=[{address=locahost: 27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketExcepti on: locahost},* caused by* {java.net.UnknownHostException: locahost}}]]] at play.api.http.HttpErrorHandlerExceptions$.throwableToUsefulException(HttpErrorHandler.scala:293) at play.api.http.DefaultHttpErrorHandler.onServerError(HttpErrorHandler.scala:220) at play.api.GlobalSettings$class.onError(GlobalSettings.scala:160) at play.api.DefaultGlobal$.onError(GlobalSettings.scala:188) at play.api.http.GlobalSettingsHttpErrorHandler.onServerError(HttpErrorHandler.scala:100) at play.core.server.netty.PlayRequestHandler$$anonfun$2$$anonfun$apply$1.applyOrElse(PlayRequestHandler.scala:100) at play.core.server.netty.PlayRequestHandler$$anonfun$2$$anonfun$apply$1.applyOrElse(PlayRequestHandler.scala:99) at scala.concurrent.Future$$anonfun$recoverWith$1.apply(Future.scala:344) at scala.concurrent.Future$$anonfun$recoverWith$1.apply(Future.scala:343) at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:32)

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

You are the first who have seen this exception. Write a tip to help other users and build your expert profile.