Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘mongoTemplate’ defined in class path resource [org/springframework/boot/autoconfigure/data/mongo/MongoDatabaseFactoryDependentConfiguration.class]: Failed to instantiate [org.springframework.data.mongodb.core.MongoTemplate]: Factory method ‘mongoTemplate’ threw exception with message: Timed out after 30000 ms while waiting for a server that matches com.mongodb.client.internal.MongoClientDelegate$xxxxxxxx.
I established a VPC end point connection with MongoDB atlas in ap-southeast-2 region. Initially when I used the mongoDB connection string in springBoot application, It works fine when deployed in AWS Elastic Beanstalk. But now it is working, I’m getting HTTP 404 error. When I replaced the Private end point url with public url of that database, it is working fine. Can anyone help me with this?
Surya Teja is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.