Briefly, this error occurs when Elasticsearch receives an HTTP request on an HTTPS port. This typically happens when you’re trying to access Elasticsearch with HTTP on a port that is configured for HTTPS. To resolve this issue, you can either change the port you’re sending the request to, or switch your request to HTTPS. Alternatively, you can reconfigure Elasticsearch to accept HTTP on the port you’re using. However, this might not be recommended for security reasons.
This guide will help you check for common problems that cause the log ” received plaintext http traffic on a https 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 http traffic on a https channel; closing connection {}” classname is SecurityNetty4HttpServerTransport.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :
if (isNotSslRecordException(cause)) { if (logger.isTraceEnabled()) { logger.trace(new ParameterizedMessage("received plaintext http traffic on a https channel; closing connection {}"; ctx.channel()); cause); } else { logger.warn("received plaintext http traffic on a https channel; closing connection {}"; ctx.channel()); } ctx.channel().close(); } else if (isCloseDuringHandshakeException(cause)) { if (logger.isTraceEnabled()) { logger.trace(new ParameterizedMessage("connection {} closed during ssl handshake"; ctx.channel()); cause);
[ratemypost]