dboissier / mongo4idea

MongoDB integration in Intellij
Apache License 2.0
975 stars 109 forks source link

Timeout error #244

Open WujieRen opened 5 years ago

WujieRen commented 5 years ago

com.mongodb.MongoTimeoutException: 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=172.16.16.XXX:27017, type=REPLICA_SET_OTHER, roundTripTime=0.5 ms, state=CONNECTED}, {address=172.16.16.XXX:27017, type=REPLICA_SET_OTHER, roundTripTime=0.5 ms, state=CONNECTED}, {address=172.16.16.XXX:27017, type=REPLICA_SET_OTHER, roundTripTime=0.5 ms, state=CONNECTED}]

Idea versin: 2018.2.5 Plugin version::0.11.0

davidportella commented 5 years ago

I have the same problem,

[MongoPlugin] Error when connecting to Mongo LOCAL: com.mongodb.MongoTimeoutException: Timed out after 30000 ms while waiting for a server that matches com.mongodb.client.internal.MongoClientDelegate$1@6d59fa5a. Client view of cluster state is {type=REPLICA_SET, servers=[{address=db_server:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketException: db_server}, caused by {java.net.UnknownHostException: db_server}}]

DataGrip: 2018.2.5 Plugin version: 0.12.0 Mongo Version: 3.7 (run in docker)

cbm-dboissier commented 5 years ago

Hi @davidportella,

java.net.UnknownHostException: db_server means the plugin cannot reach this server name.

cbm-dboissier commented 5 years ago

Hi @WujieRen, If your Mongo configuration is replicate-set cluster, yyou have to list all mongo instances in the URL field of the Server Configuration.

lordpengwin commented 4 years ago

Trying to connect to an AWS DocumentDB server through a proxy produces a timeout error indicating "SSLHandshakeException: No subject alternative names matching IP address xxx.xxx.xxx.xxx found caused but CertificateException ...

This is the error that I normally see if i don't pass the flag to allow invalid host names i.e. those that don't match the certificate. Could this option please be exposed somehow?