码迷,mamicode.com
首页 > Windows程序 > 详细

elasticsearch-windows启动时的问题

时间:2021-03-16 11:41:29      阅读:0      评论:0      收藏:0      [点我收藏+]

标签:tty   read   executor   cse   exception   win   class   and   被占用   

在官网上下载elasticsearch-windows后,按照官方的步骤,解压,运行bin/elasticsearch.bat,但是启动时控制台报错,错误如下:

[o.e.t.TransportService   ] [qIMyueh] publish_address {127.0.0.1:9301}, bound_addresses {127.0.0.1:9301}, {[::1]:9301}
[2021-03-14T08:50:17,909][WARN ][o.e.t.n.Netty4Transport  ] [qIMyueh] exception caught on transport layer [[id: 0xad9dc710, L:/0:0:0:0:0:0:0:1:63446 - R:/0:0:0:0:0:0:0:1:9300]], closing connection
io.netty.handler.codec.DecoderException: java.io.StreamCorruptedException: invalid internal transport message format, got (48,54,54,50)
        at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:442) ~[netty-codec-4.1.6.Final.jar:4.1.6.Final]
        at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:248) ~[netty-codec-4.1.6.Final.jar:4.1.6.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:373) [netty-transport-4.1.6.Final.jar:4.1.6.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:359) [netty-transport-4.1.6.Final.jar:4.1.6.Final]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:351) [netty-transport-4.1.6.Final.jar:4.1.6.Final]
        at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334) [netty-transport-4.1.6.Final.jar:4.1.6.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:373) [netty-transport-4.1.6.Final.jar:4.1.6.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:359) [netty-transport-4.1.6.Final.jar:4.1.6.Final]
        at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926) [netty-transport-4.1.6.Final.jar:4.1.6.Final]
        at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:129) [netty-transport-4.1.6.Final.jar:4.1.6.Final]
        at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:651) [netty-transport-4.1.6.Final.jar:4.1.6.Final]
        at io.netty.channel.nio.NioEventLoop.processSelectedKeysPlain(NioEventLoop.java:536) [netty-transport-4.1.6.Final.jar:4.1.6.Final]
        at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:490) [netty-transport-4.1.6.Final.jar:4.1.6.Final]
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:450) [netty-transport-4.1.6.Final.jar:4.1.6.Final]
        at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:873) [netty-common-4.1.6.Final.jar:4.1.6.Final]
        at java.lang.Thread.run(Thread.java:745) [?:1.8.0_73]
Caused by: java.io.StreamCorruptedException: invalid internal transport message format, got (48,54,54,50)
        at org.elasticsearch.transport.TcpTransport.validateMessageHeader(TcpTransport.java:1140) ~[elasticsearch-5.1.2.jar:5.1.2]
        at org.elasticsearch.transport.netty4.Netty4SizeHeaderFrameDecoder.decode(Netty4SizeHeaderFrameDecoder.java:36) ~[?:?]
        at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:411) ~[?:?]
        ... 15 more
[2021-03-14T08:50:17,909][WARN ][o.e.t.n.Netty4Transport  ] [qIMyueh] exception caught on transport layer [[id: 0x294d028e, L:/127.0.0.1:63448 - R:/127.0.0.1:9300]], closing connection
io.netty.handler.codec.DecoderException: java.io.StreamCorruptedException: invalid internal transport message format, got (48,54,54,50)
        at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:442) ~[netty-codec-4.1.6.Final.jar:4.1.6.Final]
        at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:248) ~[netty-codec-4.1.6.Final.jar:4.1.6.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:373) [netty-transport-4.1.6.Final.jar:4.1.6.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:359) [netty-transport-4.1.6.Final.jar:4.1.6.Final]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:351) [netty-transport-4.1.6.Final.jar:4.1.6.Final]
        at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334) [netty-transport-4.1.6.Final.jar:4.1.6.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:373) [netty-transport-4.1.6.Final.jar:4.1.6.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:359) [netty-transport-4.1.6.Final.jar:4.1.6.Final]
        at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926) [netty-transport-4.1.6.Final.jar:4.1.6.Final]
        at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:129) [netty-transport-4.1.6.Final.jar:4.1.6.Final]
        at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:651) [netty-transport-4.1.6.Final.jar:4.1.6.Final]
        at io.netty.channel.nio.NioEventLoop.processSelectedKeysPlain(NioEventLoop.java:536) [netty-transport-4.1.6.Final.jar:4.1.6.Final]
        at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:490) [netty-transport-4.1.6.Final.jar:4.1.6.Final]
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:450) [netty-transport-4.1.6.Final.jar:4.1.6.Final]
        at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:873) [netty-common-4.1.6.Final.jar:4.1.6.Final]
        at java.lang.Thread.run(Thread.java:745) [?:1.8.0_73]
Caused by: java.io.StreamCorruptedException: invalid internal transport message format, got (48,54,54,50)
        at org.elasticsearch.transport.TcpTransport.validateMessageHeader(TcpTransport.java:1140) ~[elasticsearch-5.1.2.jar:5.1.2]
        at org.elasticsearch.transport.netty4.Netty4SizeHeaderFrameDecoder.decode(Netty4SizeHeaderFrameDecoder.java:36) ~[?:?]
        at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:411) ~[?:?]
        ... 15 more

 

 

 

一开始以为是 es版本过高或jdk版本过低(我的是jdk8),换了低版本的es(5.1)还是这个错误,最终发现好像是9300这个端口被占用,于是用  netstat -ano | findstr "9300"

发现是system的东西在占用,最终在config/elasticsearch.yml文件中添加这个,进行tcp内部通信的端口修改

技术图片

报错后启动正常,但是在浏览器打开localhost:9200后发现还是不行,查看启动日志发现

[2021-03-14T09:00:02,244][INFO ][o.e.t.TransportService   ] [qIMyueh] publish_address {127.0.0.1:9305}, bound_addresses {127.0.0.1:9305}, {[::1]:9305}
[2021-03-14T09:00:05,295][INFO ][o.e.c.s.ClusterService   ] [qIMyueh] new_master {qIMyueh}{qIMyueh2RgSoTP9vXfYmGg}{mckMgDUER5WPf-NXwoDgrQ}{127.0.0.1}{127.0.0.1:9305}, reason: zen-disco-elected-as-master ([0] nodes joined)
[2021-03-14T09:00:05,331][INFO ][o.e.g.GatewayService     ] [qIMyueh] recovered [0] indices into cluster_state
[2021-03-14T09:00:05,916][INFO ][o.e.h.HttpServer         ] [qIMyueh] publish_address {127.0.0.1:9203}, bound_addresses {127.0.0.1:9203}, {[::1]:9203}
[2021-03-14T09:00:05,916][INFO ][o.e.n.Node               ] [qIMyueh] started

 

http的监听端口已经成为了9203了,换成了localhost:9203 一切正常

技术图片

 

elasticsearch-windows启动时的问题

标签:tty   read   executor   cse   exception   win   class   and   被占用   

原文地址:https://www.cnblogs.com/lcja/p/14531434.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!