SSL peer certificate validation failed: unable to verify the first certificate

After enabling TLS/SSL i am able to connect to mongo shell remotely but unable to connect from inside the VM neither my microservices are able to connect. Can anyone please help?
I am really stucked on this from very long time.

Service Error: MongoNetworkError: unable to verify the first certificate
Mongo shell error: connection attempt failed: SSLHandshakeFailed: SSL peer certificate validation failed: unable to verify the first certificate