Received plaintext http traffic on an https channel closing connection – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 7-8.9

Briefly, this error occurs when Elasticsearch receives a non-secure (HTTP) request on a secure (HTTPS) channel. This is a security measure to prevent unencrypted data from being sent over a secure connection. To resolve this issue, you can either configure your client to send requests using HTTPS or disable HTTPS on Elasticsearch if security is not a concern. However, it’s recommended to use HTTPS for secure data transmission.

This guide will help you check for common problems that cause the log ” received plaintext http traffic on an https channel; closing connection {} ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: .

Log Context

Log “received plaintext http traffic on an https channel; closing connection {}” classname is Netty4HttpServerTransport.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

        if (lifecycle.started() == false) {
            return;
        }

        if (SSLExceptionHelper.isNotSslRecordException(cause)) {
            logger.warn("received plaintext http traffic on an https channel; closing connection {}"; channel);
            CloseableChannel.closeChannel(channel);
        } else if (SSLExceptionHelper.isCloseDuringHandshakeException(cause)) {
            logger.debug("connection {} closed during ssl handshake"; channel);
            CloseableChannel.closeChannel(channel);
        } else if (SSLExceptionHelper.isInsufficientBufferRemainingException(cause)) {

 

 [ratemypost]