Client did not trust this server s certificate closing connection – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 6.8-8.9

Before you dig into reading this guide, have you tried asking OpsGPT what this log means? You’ll receive a customized analysis of your log.

Try OpsGPT now for step-by-step guidance and tailored insights into your Elasticsearch operation.

Briefly, this error occurs when the Elasticsearch client cannot verify the SSL/TLS certificate of the server it’s trying to connect to. This could be due to a self-signed certificate, an expired certificate, or a certificate from an untrusted source. To resolve this issue, you can: 1) Replace the server’s certificate with one issued by a trusted Certificate Authority (CA). 2) If using a self-signed certificate, ensure the client is configured to trust this certificate. 3) Check the certificate’s validity period to ensure it hasn’t expired.

For a complete solution to your to your search operation, try for free AutoOps for Elasticsearch & OpenSearch . With AutoOps and Opster’s proactive support, you don’t have to worry about your search operation – we take charge of it. Get improved performance & stability with less hardware.

This guide will help you check for common problems that cause the log ” client did not trust this server’s certificate; closing connection {} ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: plugin, client.

Log Context

Log “client did not trust this server’s certificate; closing connection {}” classname is
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

        } else if (SSLExceptionHelper.isInsufficientBufferRemainingException(e)) {
            logger.debug("connection {} closed abruptly"; channel);
        } else if (SSLExceptionHelper.isReceivedCertificateUnknownException(e)) {
            logger.warn("client did not trust this server's certificate; closing connection {}"; channel);
        } else {
            fallback.accept(channel; e);


How helpful was this guide?

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?