seq-input-healthcheck icon indicating copy to clipboard operation
seq-input-healthcheck copied to clipboard

SSL validation failure

Open bigolewannabe opened this issue 6 months ago • 2 comments

Weird situation here.

I'm running a health check on a site that's resulting in an error related to SSL


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, RemoteCertificateChainErrors
...

The weird thing is the browsers are fine with the site. The certificate check app in Seq is also running and doesn't have a problem with it. I've used Powershell's Invoke-WebRequest with it and get an expected 401 error but I don't fail before that with an SSL error.

I'm mostly looking for ideas on how we might diagnose what the problem is that all other tools seem ok with but Seq's Health Checks fail on.

bigolewannabe avatar May 19 '25 14:05 bigolewannabe

Hi Matt, thanks for your message.

Is the hostname being used by the health check app the same as the CN in the certificate? If not (e.g. if the health check is hitting localhost or something like that) you'll need to reconfigure the health check to use the same URL.

Otherwise, though - are you running Seq on Windows or in a Docker container?

nblumhardt avatar May 19 '25 21:05 nblumhardt

Also getting exactly this, fairly regularly. No other issues with destination target. Also have another health checker that has no issue and never detects the same thing.

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 at System.Net.Security.SslStream.SendAuthResetSignal(ReadOnlySpan1 alert, ExceptionDispatchInfo exception) at System.Net.Security.SslStream.CompleteHandshake(SslAuthenticationOptions sslAuthenticationOptions) at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](Boolean receiveFirst, Byte[] reAuthenticationData, CancellationToken cancellationToken) at System.Net.Http.ConnectHelper.EstablishSslConnectionAsync(SslClientAuthenticationOptions sslOptions, HttpRequestMessage request, Boolean async, Stream stream, CancellationToken cancellationToken) --- End of inner exception stack trace --- at System.Net.Http.ConnectHelper.EstablishSslConnectionAsync(SslClientAuthenticationOptions sslOptions, HttpRequestMessage request, Boolean async, Stream stream, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(QueueItem queueItem) at System.Threading.Tasks.TaskCompletionSourceWithCancellation1.WaitWithCancellationAsync(CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken) at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken) at Seq.Input.HealthCheck.HttpHealthCheck.SendRequest(String requestUri, String correlationId, CancellationToken cancel) in C:\projects\seq-input-healthcheck\src\Seq.Input.HealthCheck\HttpHealthCheck.cs:line 149 at Seq.Input.HealthCheck.HttpHealthCheck.CheckNow(CancellationToken cancel) in C:\projects\seq-input-healthcheck\src\Seq.Input.HealthCheck\HttpHealthCheck.cs:line 83

That said, smelling more like infrastructure than Health check. (running as docker container for us)

davewasthere avatar Jun 09 '25 14:06 davewasthere