MongoDB.live, free & fully virtual. Register Now MongoDB.live, free & fully virtual. Register Now

Unable to Connect to Atlas from Application

Hi,

We are able to Connect to Atlas DB from local shell. However , when trying to connect to the Atlas from our Application, Mongo URI doesn’t seem to establish the connection

Mongo Connection failed due to invalid mongo server address or credentials
[2020-11-12 11:13:17,790] 63027 [qtp2052573687-51] ERROR errors - CONNECTOR:Get_Capab:mongo:Timed out after 30000 ms while waiting for a server that matches com.mongodb.client.internal.MongoClientDelegate$1@c5db0d6. Client view of cluster state is {type=REPLICA_SET, servers=[{address:27017=qwertty1-shard-00-00.uxyz.mongodb.net, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketWriteException: Exception sending message}, caused by {javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target}, caused by {sun.security.validator.ValidatorException: PKIX path building failed:

Mongo URI :
mdb-01-shard-00-00.uiboi.mongodb.net:27017,mdb-01-shard-00-01.uiboi.mongodb.net:27017,mdb-01-shard-00-02.uiboi.mongodb.net:27017/?replicaSet=atlas-myk-shard-0

we have created two users one master(for admin db) and another user for a newly created database.we tried with both the credentials but still not working from Application to Atlas environment, but we are able to connect from mongo shell.
Please help.

Regards,
RK

Hi RK,

Might your application be leveraging an older driver version? What language driver are you using?

-Andrew