| yeah, got it! And then I've created this class MYCustomMongoDBDatastoreProvider and then overrode createMongoClient and tried create MongoClient just simple like this to connect to one node:
return new MongoClient("cluster0-clustername-shard-00-00-raa4n.mongodb.net", 27017);
or this to connect to the cluster of 3 nodes:
ServerAddress seed1 = new ServerAddress("cluster0-clustername-shard-00-00-raa4n.mongodb.net", 27017);
ServerAddress seed2 = new ServerAddress("cluster0-clustername-shard-00-01-raa4n.mongodb.net",27017);
ServerAddress seed3 = new ServerAddress("cluster0-clustername-shard-00-02-raa4n.mongodb.net",27017);
List<ServerAddress> seedList = new ArrayList<ServerAddress>();
seedList.add(seed1);
seedList.add(seed2);
seedList.add(seed3);
return new MongoClient(seedList);
But nothing changed, like before I was received the same error:
20:05:54,501 INFO [org.mongodb.driver.cluster] (cluster-ClusterId{value='5c59de917aea61231670d8ee', description='null'}-cluster0-clustername-shard-00-00-raa4n.mongodb.net:27017) Exception in monitor thread while connecting to server cluster0-crypfolio-shard-00-00-raa4n.mongodb.net:27017: com.mongodb.MongoSocketReadException: Prematurely reached end of stream
|