Hi,
I’m trying to connect to my M0 cluster from CloudRun application. Connecting from my local machine works fine, however when connecting from GCP I’m receiving an error:
com.mongodb.MongoTimeoutException: Timed out while waiting for a server that matches ReadPreferenceServerSelector{readPreference=primary}. Client view of cluster state is {type=REPLICA_SET, servers=[{address=xxxx.mongodb.net:27017, type=UNKNOWN, state=CONNECTING}, {address=xxxx.mongodb.net:27017, type=UNKNOWN, state=CONNECTING}, {address=xxxx.mongodb.net:27017, type=UNKNOWN, state=CONNECTING}]
at com.mongodb.internal.connection.BaseCluster.createAndLogTimeoutException(BaseCluster.java:392)
at com.mongodb.internal.connection.BaseCluster.handleServerSelectionRequest(BaseCluster.java:293)
at com.mongodb.internal.connection.BaseCluster.access$800(BaseCluster.java:85)
at com.mongodb.internal.connection.BaseCluster$WaitQueueHandler.run(BaseCluster.java:475)
at java.base/java.lang.Thread.run(Thread.java:1583)
I added 0.0.0.0/0 entry in network configuration. I use kotlin driver (latest)