I have mongoUri config set in my properties file like this:
spring.data.mongodb.uri=mongodb://user:3YySgdQLEaeFTN2@mongodb-01.uata.lokal:27017,mongodb-02.uata.lokal:27017/dbName
And I receive this error:
Caused by: com.mongodb.MongoTimeoutException: Timed out after 30000 ms while waiting for a server that matches WritableServerSelector. Client view of cluster state is {type=REPLICA_SET, servers=[{address=mongodb-02.uata.lokal:27017, type=REPLICA_SET_SECONDARY, roundTripTime=84.6 ms, state=CONNECTED}, {address=mongodb-01:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketException: mongodb-01: nodename nor servname provided, or not known}, caused by {java.net.UnknownHostException: mongodb-01: nodename nor servname provided, or not known}}, {address=mongoarb-01.uata.lokal:27017, type=REPLICA_SET_ARBITER, roundTripTime=88.8 ms, state=CONNECTED}]
Please help how should I add the mongo replica set configuration