Hello world! I’m getting kinda desperate here as I have tried a lot of things and none of it works.
Since the upgrade to php 8 and upgrading php mongo lib to 1.19.1 from 1.4.2 I’m unable to connect to Atlas when ssl is enabled and when options:
tlsAllowInvalidCertificates
tlsAllowInvalidHostnames
are disabled. When they are enable I can connect to atlas and everything works. In the Atlas logs it seem that it receives an connection and then client immediately disconnects.
The error I constantly get is:
No suitable servers found (
serverSelectionTryOnce set): [TLS handshake failed: Failed certificate verification calling hello on 'xxx.mongodb.net:27017'] [TLS handshake failed: Failed certificate verification calling hello on 'xxx.mongodb.net:27017'] [TLS handshake failed: Failed certificate verification calling hello on 'xxx.mongodb.net:27017']
I"m using docker alpine3.19 and php 8.3.7 ran on AWS linux2.
I have tried everything that came to my mind (and that has any reference on google) from checking if ssl is installed properly, downloading certificates and putting them to the ssl configs and providing cert file. My network config in the Atlas UI allows connecting from my IP ranges, downgrading PHP lib version, changing connection strings and trying out different options but none of it works.
My config on atlas does not require ca files and it used to work like that up until the big upgrade.
Does someone have any idea what can cause this error and possibly how to solve it?