No relevant error message when SSL related failure while using c-driver

Hi Experts,

When MongoDB server is configured with SSL and through driver if we try to access collection on MongoDB without using SSL then error message is generic and one can’t say that this related to SSL. However, MongoDB server logs correct error message.

The below error message shown when using c-driver without SSL but MongoDB server is configured with SSL:

ERROR: could not connect to server mongo_server
HINT: Mongo error: “No suitable servers found (serverSelectionTryOnce set): [connection closed calling ismaster on ‘’]”

From this message, user can’t figure out that this is SSL related failure and MongoDB server is configured to only allow SSL connections.

Please note that MongoDB server logs correct and relevant error message but c-driver is not capable it.

I went through error reporting doc(Error Reporting — libmongoc 1.17.6) of mongoc driver and came to know that there is NO specific domain/code/message for SSL/TLS failure.

Please let me know is there any way get proper message here? or Is there any limitation on this?


Any update on this?

Awaiting for your response.

Thanks & Regards,