"No suitable servers found" with laravel-mongodb

Hi all,

I have been struggling with this for a couple of days now and have completely ran out of ideas.

I have containerised a laravel application with a base Debian Bookworm image, installed and configured the mongo drivers but I get the message:

No suitable servers found (serverSelectionTryOnce set): [Server closed connection. calling hello on ‘ac-gmyonow-shard-00-00.xxx.mongodb.net:27017’] …"

I’m assuming it can connect to atlas as the supplied URI returns the 3 shards available in the cluster. There is no more to the error being supplied to the logs, making it hard to debug.

I installed mongosh in the container to test that atlas was reachable, and can connect fine without any issues. The application and drivers also work correctly outside of debian

mongo driver details:

mongodb

MongoDB support => enabled
MongoDB extension version => 1.19.0
MongoDB extension stability => stable
libbson bundled version => 1.27.0
libmongoc bundled version => 1.27.0
libmongoc SSL => enabled
libmongoc SSL library => OpenSSL
libmongoc crypto => enabled
libmongoc crypto library => libcrypto
libmongoc crypto system profile => disabled
libmongoc SASL => disabled
libmongoc SRV => enabled
libmongoc compression => enabled
libmongoc compression snappy => disabled
libmongoc compression zlib => enabled
libmongoc compression zstd => enabled
libmongocrypt bundled version => 1.10.0
libmongocrypt crypto => enabled
libmongocrypt crypto library => libcrypto
crypt_shared library version => unknown

has anyone come across this before or have ideas how I can increase the verbosity of the errors?

Cheers,

Zak