Hello, we are trying to query EventstoreDB from a netcore project using the official nuget package but are receiving an error.
We are using a 3 node setup in a cluster on v24.6 of EventstoreDB.
Please see below for the error in Datadog:
HttpRequestException: The SSL connection could not be established, see inner exception. AuthenticationException: The remote certificate is invalid according to the validation procedure: RemoteCertificateNameMismatch", DebugException=“System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception.”)
—> System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception.
—> System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the validation procedure: RemoteCertificateNameMismatch
The connection string used is: esdb+discover://username:password@eventstore.example.com:2113
First off, I noticed that you’re using 24.6. Please note that release, while awesome, is not a long-term support release. As a side note, I would humbly suggest you upgrade to 24.10, which is long-term supported
That out of the way, may you please try connecting with the ?tlsVerifyCert:false option added to your connection string?
Also, may you please try connecting in your browser to https://10.2.3.27:2113/gossip and provide the output?
Thanks for the information! I think the issue is because the server is missing the AdvertiseHostToClientAs configuration parameter on the nodes, and a few others, required for certificates and DNS discovery. I would recommend checking out this blog form some detailed instructions on configuring Cluster DNS with Certificates. Please review and let me know how you get on!