title: Error exception caught on transport layer [NettyTcpChannel{localAddress=/x:40554, remoteAddress=/y:9300}], closing connection
body: <p>I am using elastic search and spring data search , I have configured elastic search in an EC2  instance so inititally i put network host  as 0.0.0.0 but then i bind it to network host which is the private ip of the instance , and from that i am getting this error. ALthough if i make a curl on http://pvtIp:9200 it works and same http://pvtIp:9200/nodes returns me the transport layer as the private ip only but it still does not work . I checked that if in my elastic beanstalk instance where my code is hosted any elastic search is configured of any kind but its not present</p>
  <p>Also to note that this error only triggers when i am moving the code to server, even during the jenkins buiding the job this issue comes</p>
  <p>i did : <code>sudo service elasticsearch status</code> it does not identify elastic search
  even <code>sudo netstat -ntlp</code> returns no port which are open for 9200 and 9300</p>
  <p>full stack trace below :</p>
  <pre><code>    2020-09-11 12:34:04.941  WARN 25875 --- [ient_boss][T#2]] o.e.transport.netty4.Netty4Transport     : exception caught on transport layer [NettyTcpChannel{localAddress=/&lt;private-ip-beanstalk&gt;:40554, remoteAddress=/&lt;private-ip-ec2-where-elasticsearch-is-hosted&gt;:9300}], closing connection
  
  java.io.IOException: Invalid string; unexpected character: 180 hex: b4
      at org.elasticsearch.common.io.stream.StreamInput.readString(StreamInput.java:402) ~[elasticsearch-6.4.3.jar!/:6.4.3]
      at org.elasticsearch.common.io.stream.StreamInput.readCollection(StreamInput.java:959) ~[elasticsearch-6.4.3.jar!/:6.4.3]
      at org.elasticsearch.common.io.stream.StreamInput.readList(StreamInput.java:941) ~[elasticsearch-6.4.3.jar!/:6.4.3]
      at org.elasticsearch.common.io.stream.StreamInput.readMapOfLists(StreamInput.java:511) ~[elasticsearch-6.4.3.jar!/:6.4.3]
      at org.elasticsearch.common.util.concurrent.ThreadContext$ThreadContextStruct.&lt;init&gt;(ThreadContext.java:380) ~[elasticsearch-6.4.3.jar!/:6.4.3]
      at org.elasticsearch.common.util.concurrent.ThreadContext$ThreadContextStruct.&lt;init&gt;(ThreadContext.java:366) ~[elasticsearch-6.4.3.jar!/:6.4.3]
      at org.elasticsearch.common.util.concurrent.ThreadContext.readHeaders(ThreadContext.java:200) ~[elasticsearch-6.4.3.jar!/:6.4.3]
      at org.elasticsearch.transport.TcpTransport.messageReceived(TcpTransport.java:1424) ~[elasticsearch-6.4.3.jar!/:6.4.3]
      at org.elasticsearch.transport.netty4.Netty4MessageChannelHandler.channelRead(Netty4MessageChannelHandler.java:64) ~[transport-netty4-client-6.4.3.jar!/:6.4.3]
      at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) [netty-transport-4.1.50.Final.jar!/:4.1.50.Final]
      at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) [netty-transport-4.1.50.Final.jar!/:4.1.50.Final]
      at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) [netty-transport-4.1.50.Final.jar!/:4.1.50.Final]
      at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:324) [netty-codec-4.1.50.Final.jar!/:4.1.50.Final]
      at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:311) [netty-codec-4.1.50.Final.jar!/:4.1.50.Final]
      at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:425) [netty-codec-4.1.50.Final.jar!/:4.1.50.Final]
      at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:276) [netty-codec-4.1.50.Final.jar!/:4.1.50.Final]
      at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) [netty-transport-4.1.50.Final.jar!/:4.1.50.Final]
      at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) [netty-transport-4.1.50.Final.jar!/:4.1.50.Final]
      at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) [netty-transport-4.1.50.Final.jar!/:4.1.50.Final]
      at io.netty.handler.logging.LoggingHandler.channelRead(LoggingHandler.java:271) [netty-handler-4.1.50.Final.jar!/:4.1.50.Final]
      at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) [netty-transport-4.1.50.Final.jar!/:4.1.50.Final]
      at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) [netty-transport-4.1.50.Final.jar!/:4.1.50.Final]
      at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) [netty-transport-4.1.50.Final.jar!/:4.1.50.Final]
      at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) [netty-transport-4.1.50.Final.jar!/:4.1.50.Final]
      at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) [netty-transport-4.1.50.Final.jar!/:4.1.50.Final]
      at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) [netty-transport-4.1.50.Final.jar!/:4.1.50.Final]
      at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) [netty-transport-4.1.50.Final.jar!/:4.1.50.Final]
      at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163) [netty-transport-4.1.50.Final.jar!/:4.1.50.Final]
      at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:714) [netty-transport-4.1.50.Final.jar!/:4.1.50.Final]
      at io.netty.channel.nio.NioEventLoop.processSelectedKeysPlain(NioEventLoop.java:615) [netty-transport-4.1.50.Final.jar!/:4.1.50.Final]
      at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:578) [netty-transport-4.1.50.Final.jar!/:4.1.50.Final]
      at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493) [netty-transport-4.1.50.Final.jar!/:4.1.50.Final]
      at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) [netty-common-4.1.50.Final.jar!/:4.1.50.Final]
      at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) [netty-common-4.1.50.Final.jar!/:4.1.50.Final]
      at java.lang.Thread.run(Thread.java:748) [na:1.8.0_252]
  </code></pre>