Hello,
I am using MongoDB Atlas with my Java application. Currently, I am using MongoDB driver version 4.2.0 and whenever I try to insert a document into my collection I receive this exception:
com.mongodb.MongoTimeoutException: Timed out after 30000 ms while waiting for a server that matches com.mongodb.client.internal.MongoClientDelegate$1@4e41089d. Client view of cluster state is {type=REPLICA_SET, servers=[{address:27017=cluster0-shard-00-01.rnnax.mongodb.net, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketWriteException: Exception sending message}, caused by {javax.net.ssl.SSLHandshakeException: extension (5) should not be presented in certificate_request}}, {address:27017=cluster0-shard-00-00.rnnax.mongodb.net, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketWriteException: Exception sending message}, caused by {javax.net.ssl.SSLHandshakeException: extension (5) should not be presented in certificate_request}}, {address:27017=cluster0-shard-00-02.rnnax.mongodb.net, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketWriteException: Exception sending message}, caused by {javax.net.ssl.SSLHandshakeException: extension (5) should not be presented in certificate_request}}]
at com.mongodb.internal.connection.BaseCluster.createTimeoutException(BaseCluster.java:404)
at com.mongodb.internal.connection.BaseCluster.selectServer(BaseCluster.java:123)
at com.mongodb.internal.connection.AbstractMultiServerCluster.selectServer(AbstractMultiServerCluster.java:54)
at com.mongodb.client.internal.MongoClientDelegate.getConnectedClusterDescription(MongoClientDelegate.java:147)
at com.mongodb.client.internal.MongoClientDelegate.createClientSession(MongoClientDelegate.java:100)
at com.mongodb.client.internal.MongoClientDelegate$DelegateOperationExecutor.getClientSession(MongoClientDelegate.java:277)
at com.mongodb.client.internal.MongoClientDelegate$DelegateOperationExecutor.execute(MongoClientDelegate.java:201)
at com.mongodb.client.internal.MongoCollectionImpl.executeSingleWriteRequest(MongoCollectionImpl.java:1048)
at com.mongodb.client.internal.MongoCollectionImpl.executeInsertOne(MongoCollectionImpl.java:498)
at com.mongodb.client.internal.MongoCollectionImpl.insertOne(MongoCollectionImpl.java:482)
at com.mongodb.client.internal.MongoCollectionImpl.insertOne(MongoCollectionImpl.java:476)
at me.skhanal.StockDweebs.MongoDB.main(MongoDB.java:24)
I have ensured that the credentials for the MongoClient is correct and that I am using the correct driver version. Does anyone know what is causing this issue?