com.mongodb.MongoTimeoutException: Timed out after 10000 ms while waiting to connect. Client view of cluster state is {type=Unknown, servers=[{address=[IP.OF.REMOTE.HOST]:3001, type=Unknown, state=Connecting, exception={java.lang.IllegalArgumentException: response too long: 1347703880}}]

tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    Cannot connect to remote MongoDB from EMR cluster with spark-shell

    Stack Overflow | 8 months ago | Daniel Zendejas
    com.mongodb.MongoTimeoutException: Timed out after 10000 ms while waiting to connect. Client view of cluster state is {type=Unknown, servers=[{address=[IP.OF.REMOTE.HOST]:3001, type=Unknown, state=Connecting, exception={java.lang.IllegalArgumentException: response too long: 1347703880}}]

    Root Cause Analysis

    1. com.mongodb.MongoTimeoutException

      Timed out after 10000 ms while waiting to connect. Client view of cluster state is {type=Unknown, servers=[{address=[IP.OF.REMOTE.HOST]:3001, type=Unknown, state=Connecting, exception={java.lang.IllegalArgumentException: response too long: 1347703880}}]

      at com.mongodb.BaseCluster.getDescription()
    2. MongoDB Java Driver
      Mongo.getReplicaSetStatus
      1. com.mongodb.BaseCluster.getDescription(BaseCluster.java:128)
      2. com.mongodb.DBTCPConnector.getClusterDescription(DBTCPConnector.java:394)
      3. com.mongodb.DBTCPConnector.getType(DBTCPConnector.java:571)
      4. com.mongodb.DBTCPConnector.getReplicaSetStatus(DBTCPConnector.java:362)
      5. com.mongodb.Mongo.getReplicaSetStatus(Mongo.java:446)
      5 frames