com.mongodb.MongoTimeoutException: Timed out after 0 ms while waiting to connect. Client view of cluster state is {type=Unknown, servers=[{address=localhost:27017, type=Unknown, state=Connecting}]

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 JIRA by Ricardo Lorenzo, 1 year ago
Timed out after 0 ms while waiting to connect. Client view of cluster state is {type=Unknown, servers=[{address=localhost:27017, type=Unknown, state=Connecting}]
via JIRA by Ricardo Lorenzo, 1 year ago
Timed out after 0 ms while waiting to connect. Client view of cluster state is {type=Unknown, servers=[{address=localhost:27017, type=Unknown, state=Connecting}]
via widecodes.com by Unknown author, 2 years ago
Timed out after 10000 ms while waiting to connect. Client view of cluster state is {type=Unknown, servers=[{address=localhost:27017, type=Unknown, state=Connecting}]
via Stack Overflow by Tester
, 1 year ago
? Exception in thread "Timer-0" com.mongodb.MongoTimeoutException: Timed out after 10000 ms while waiting to connect. Client view of cluster state is {type=Unknown, servers=[{address=localhost:27017, type=Unknown, state=Connecting}]
via Stack Overflow by Unknown author, 2 years ago
Timed out after 10000 ms while waiting to connect. Client view of cluster state is {type=Unknown, servers=[{address=104.236.68.242:27017, type=Unknown, state=Connecting}]
via JIRA by Jens Rommel, 1 year ago
Timed out after 10000 ms while waiting to connect. Client view of cluster state is {type=Unknown, servers=[{address=127.0.0.1:27017, type=Unknown, state=Connecting, exception={java.lang.NullPointerException}}]
com.mongodb.MongoTimeoutException: Timed out after 0 ms while waiting to connect. Client view of cluster state is {type=Unknown, servers=[{address=localhost:27017, type=Unknown, state=Connecting}]
at com.mongodb.BaseCluster.getDescription(BaseCluster.java:128)
at com.mongodb.DBTCPConnector.getClusterDescription(DBTCPConnector.java:393)
at com.mongodb.DBTCPConnector.getType(DBTCPConnector.java:565)
at com.mongodb.DBTCPConnector.isMongosConnection(DBTCPConnector.java:367)
at com.mongodb.Mongo.isMongosConnection(Mongo.java:645)
at com.mongodb.DBCollection.findOne(DBCollection.java:865)
at com.mongodb.DBCollection.findOne(DBCollection.java:843)
at com.mongodb.DBCollection.findOne(DBCollection.java:789)
at com.mongodb.DBCollection.findOne(DBCollection.java:778)
at undefined.MongoTest.main(MongoTest.java:27)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)

Users with the same issue

2 times, 10 months ago
2 times, 1 year ago
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
2 times, 1 year ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.