用java 調用elasticsearch 出現IllegalStateException

elasticsearch.log日誌具體錯誤:java

1. java.lang.IllegalStateException: Message not fully read (request) for requestId [180], action [cluster/state], readerIndex [34] vs expected [49]; resetting
1. 	at org.elasticsearch.transport.netty.MessageChannelHandler.messageReceived(MessageChannelHandler.java:121)
1. 	at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
1. 	at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
1. 	at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
1. 	at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296)
1. 	at org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:462)
1. 	at org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:443)
1. 	at org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:303)
1. 	at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
1. 	at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
1. 	at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
1. 	at org.elasticsearch.common.netty.OpenChannelsHandler.handleUpstream(OpenChannelsHandler.java:75)
1. 	at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
1. 	at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559)
1. 	at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268)
1. 	at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255)
1. 	at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88)
1. 	at org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:108)
1. 	at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:337)
1. 	at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89)
1. 	at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)
1. 	at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
1. 	at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
1. 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
1. 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
1. 	at java.lang.Thread.run(Thread.java:722)

錯誤緣由: 應該是版本不兼容的緣由:jdk是1.7 和elasticsearch 2.3.1 時報上面的錯誤,最後換成jdk是1.7 和elasticsearch 1.7.4,就能夠正常運行了。socket

相關文章
相關標籤/搜索