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

Opster Team

Aug-23, Version: 6.8-8.9

Briefly, this error occurs when Elasticsearch receives unencrypted (plaintext) traffic on a channel that is configured to handle encrypted (HTTPS) traffic. This could be due to a misconfiguration in the client sending the requests or in the Elasticsearch server itself. To resolve this issue, ensure that the client is sending requests over HTTPS. If the server is incorrectly configured, you may need to adjust the Elasticsearch.yml configuration file to correctly handle HTTPS traffic. Also, check if the correct SSL certificates are in place and are correctly referenced in the configuration.

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

Log Context

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

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
public void accept(TcpChannel channel; Exception e) {
if (lifecycle.started() == false) {
// just close and ignore - we are already stopped and just need to make sure we release all resources
CloseableChannel.closeChannel(channel);
} else if (SSLExceptionHelper.isNotSslRecordException(e)) {
logger.warn("received plaintext traffic on an encrypted channel; closing connection {}"; channel);
CloseableChannel.closeChannel(channel);
} else if (SSLExceptionHelper.isCloseDuringHandshakeException(e)) {
logger.debug("connection {} closed during handshake"; channel);
CloseableChannel.closeChannel(channel);
} else if (SSLExceptionHelper.isInsufficientBufferRemainingException(e)) {
public void accept(TcpChannel channel; Exception e) { if (lifecycle.started() == false) { // just close and ignore - we are already stopped and just need to make sure we release all resources CloseableChannel.closeChannel(channel); } else if (SSLExceptionHelper.isNotSslRecordException(e)) { logger.warn("received plaintext traffic on an encrypted channel; closing connection {}"; channel); CloseableChannel.closeChannel(channel); } else if (SSLExceptionHelper.isCloseDuringHandshakeException(e)) { logger.debug("connection {} closed during handshake"; channel); CloseableChannel.closeChannel(channel); } else if (SSLExceptionHelper.isInsufficientBufferRemainingException(e)) {
    public void accept(TcpChannel channel; Exception e) {
        if (lifecycle.started() == false) {
            // just close and ignore - we are already stopped and just need to make sure we release all resources
            CloseableChannel.closeChannel(channel);
        } else if (SSLExceptionHelper.isNotSslRecordException(e)) {
            logger.warn("received plaintext traffic on an encrypted channel; closing connection {}"; channel);
            CloseableChannel.closeChannel(channel);
        } else if (SSLExceptionHelper.isCloseDuringHandshakeException(e)) {
            logger.debug("connection {} closed during handshake"; channel);
            CloseableChannel.closeChannel(channel);
        } else if (SSLExceptionHelper.isInsufficientBufferRemainingException(e)) {

 

 [ratemypost]

Opster
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.