Trying to connect to cosmosdb Mongo API using Primary Connection String and UserName(Database Name)
Caused by: com.mongodb.MongoTimeoutException: Timed out after 30000 ms while waiting for a server that matches com.mongodb.client.internal.MongoClientDelegate$1@3c291aad. Client view of cluster state is {type=REPLICA_SET, servers=[{address=**********.documents.azure.com:10255, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketWriteException: Exception sending message}, caused by {java.net.SocketException: Connection reset}}] at com.mongodb.internal.connection.BaseCluster.createTimeoutException(BaseCluster.java:401) ~[mongodb-driver-core-3.8.2.jar:na] at com.mongodb.internal.connection.BaseCluster.selectServer(BaseCluster.java:120) ~[mongodb-driver-core-3.8.2.jar:na] at com.mongodb.internal.connection.MultiServerCluster.selectServer(MultiServerCluster.java:54) ~[mongodb-driver-core-3.8.2.jar:na] at com.mongodb.client.internal.MongoClientDelegate.getConnectedClusterDescription(MongoClientDelegate.java:138) ~[mongodb-driver-3.8.2.jar:na] at com.mongodb.client.internal.MongoClientDelegate.createClientSession(MongoClientDelegate.java:94) ~[mongodb-driver-3.8.2.jar:na] at com.mongodb.client.internal.MongoClientDelegate$DelegateOperationExecutor.getClientSession(MongoClientDelegate.java:249) ~[mongodb-driver-3.8.2.jar:na] at com.mongodb.client.internal.MongoClientDelegate$DelegateOperationExecutor.execute(MongoClientDelegate.java:190) ~[mongodb-driver-3.8.2.jar:na] at com.mongodb.client.internal.MongoCollectionImpl.executeSingleWriteRequest(MongoCollectionImpl.java:960) ~[mongodb-driver-3.8.2.jar:na] at com.mongodb.client.internal.MongoCollectionImpl.executeDelete(MongoCollectionImpl.java:940) ~[mongodb-driver-3.8.2.jar:na] at com.mongodb.client.internal.MongoCollectionImpl.deleteMany(MongoCollectionImpl.java:551) ~[mongodb-driver-3.8.2.jar:na] at org.springframework.data.mongodb.core.MongoTemplate$9.doInCollection(MongoTemplate.java:1729) ~[spring-data-mongodb-2.1.9.RELEASE.jar:2.1.9.RELEASE] at org.springframework.data.mongodb.core.MongoTemplate$9.doInCollection(MongoTemplate.java:1689) ~[spring-data-mongodb-2.1.9.RELEASE.jar:2.1.9.RELEASE] at org.springframework.data.mongodb.core.MongoTemplate.execute(MongoTemplate.java:545) ~[spring-data-mongodb-2.1.9.RELEASE.jar:2.1.9.RELEASE] ... 30 common frames omitted