Elasticsearch Exception:message not fully read (response) for RequestID

Source: Internet
Author: User

Use the Netty+elasticsearch test form locally to request query data without exception. The project package is uploaded to the server to run, an exception occurs after the page request, and the connection is closed.

Event: The foreground requests the resources through the Netty, Netty the background through the foreground request JSON to the ES to query the data, has the exception.

Abnormal condition:

21:39:46,019  warn org.elasticsearch.transport.netty:752 - [jeanne-marie  beaubier] exception caught on transport layer [[id: 0x8ed9a041, / xx.xx.xx.xxx:37506 => /xx.xx.xx.xx:9300]], closing  connectionjava.lang.illegalstateexception: message not fully read  (response)  for  requestId [120], handler [[email protected]], error [false];  resetting        at  Org.elasticsearch.transport.netty.MessageChannelHandler.messageReceived (messagechannelhandler.java:145)          at  Org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream (SIMPLECHANNELUPSTREAMHANDLER.JAVA:70)         at  Org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream (defaultchannelpipeline.java:564)           at org.jboss.netty.channel.defaultchannelpipeline$ Defaultchannelhandlercontext.sendupstream (defaultchannelpipeline.java:791)          at org.jboss.netty.channel.channels.firemessagereceived (channels.java:296)          at  Org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived (framedecoder.java:462)          at org.jboss.netty.handler.codec.frame.framedecoder.calldecode ( framedecoder.java:443)         at  Org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived (framedecoder.java:303)          at org.jboss.netty.channel.simplechannelupstreamhandler.handleupstream ( SIMPLECHANNELUPSTREAMHANDLER.JAVA:70)         at  Org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream (Defaultchannelpipeline.java:564)         at  Org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream (defaultchannelpipeline.java:559)          at org.jboss.netty.channel.channels.firemessagereceived (Channels.java:268)         at org.jboss.netty.channel.channels.firemessagereceived ( channels.java:255)         at  Org.jboss.netty.channel.socket.nio.NioWorker.read (nioworker.java:88)          at org.jboss.netty.channel.socket.nio.abstractnioworker.process (abstractnioworker.java:108)          at org.jboss.netty.channel.socket.nio.abstractnioselector.run ( abstractnioselector.java:337)         at  Org.jboss.netty.channel.socket.nio.AbstractNioWorker.run (abstractnioworker.java:89)     &NBsp;   at org.jboss.netty.channel.socket.nio.nioworker.run (NioWorker.java:178)          at org.jboss.netty.util.threadrenamingrunnable.run ( threadrenamingrunnable.java:108)         at  Org.jboss.netty.util.internal.deadlockproofworker$1.run (deadlockproofworker.java:42)          at java.util.concurrent.threadpoolexecutor.runworker (ThreadPoolExecutor.java:1145 )         at java.util.concurrent.threadpoolexecutor$worker.run ( threadpoolexecutor.java:615)         at java.lang.thread.run ( thread.java:745)

Cause: Elasticsearch 2.1.0 dependencies and Netty dependencies are introduced in the local MAVEN configuration, and when the project runs, elasticsearch the underlying will invoke Netty-related interfaces, while Elasticsearch (2.1.0) in the server runs in the background , it will also start loading Netty related services. Both exist, causing problems with data transfer.

WORKAROUND: When the project passes maven to the jar package, it excludes the relevant jar packages of Elasticsearch and only enters the other dependent jar packages. When running on the server, the ES-related jar packages of the server are imported and rerun by setting Class_path and the CP command.


Change configuration of the server. sh file:

Class_path= $APP _home/es-netty-web-0.0.0-beta.jar:/usr/local/elasticsearch/lib/*

java_cmd= "Nohup $JAVA _home/bin/java $JAVA _opts-cp $CLASS _path $APP _mainclass $APP _home/config.properties >/dev/ Null 2>&1 & "

This article is from the "Do not forget Beginner's mind" blog, please be sure to keep this source http://zh9526.blog.51cto.com/3051209/1758069

Elasticsearch Exception:message not fully read (response) for RequestID

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.