Error java.lang.IndexOutOfBoundsException with Elasticsearch 1.4.2 version

Hello!

I have cluster with six elasticsearch 1.4.2 nodes. I have stack trace like
this in my logs:

org.elasticsearch.transport.RemoteTransportException: Failed to deserialize
response of type [org.elasticsearch.search.query.QuerySearchResult]
Caused by: org.elasticsearch.transport.TransportSerializationException:
Failed to deserialize response of type [org.elasticsearch.search.query.
QuerySearchResult]
at org.elasticsearch.transport.netty.MessageChannelHandler.handleResponse(
MessageChannelHandler.java:152)
at org.elasticsearch.transport.netty.MessageChannelHandler.messageReceived(
MessageChannelHandler.java:127)
at org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.
handleUpstream(SimpleChannelUpstreamHandler.java:70)
at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.
sendUpstream(DefaultChannelPipeline.java:564)
at org.elasticsearch.common.netty.channel.
DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(
DefaultChannelPipeline.java:791)
at org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(
Channels.java:296)
at org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.
unfoldAndFireMessageReceived(FrameDecoder.java:462)
at org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.
callDecode(FrameDecoder.java:443)
at org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.
messageReceived(FrameDecoder.java:303)
at org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.
handleUpstream(SimpleChannelUpstreamHandler.java:70)
at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.
sendUpstream(DefaultChannelPipeline.java:564)
at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.
sendUpstream(DefaultChannelPipeline.java:559)
at org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(
Channels.java:268)
at org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(
Channels.java:255)
at org.elasticsearch.common.netty.channel.socket.nio.NioWorker.read(
NioWorker.java:88)
at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.
process(AbstractNioWorker.java:108)
at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioSelector.
run(AbstractNioSelector.java:318)
at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.run(
AbstractNioWorker.java:89)
at org.elasticsearch.common.netty.channel.socket.nio.NioWorker.run(
NioWorker.java:178)
at org.elasticsearch.common.netty.util.ThreadRenamingRunnable.run(
ThreadRenamingRunnable.java:108)
at org.elasticsearch.common.netty.util.internal.DeadLockProofWorker$1.run(
DeadLockProofWorker.java:42)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.
java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.
java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IndexOutOfBoundsException: Invalid combined index of
1455638, maximum is 393
at org.elasticsearch.common.netty.buffer.SlicedChannelBuffer.(
SlicedChannelBuffer.java:46)
at org.elasticsearch.common.netty.buffer.HeapChannelBuffer.slice(
HeapChannelBuffer.java:201)
at org.elasticsearch.transport.netty.ChannelBufferStreamInput.
readBytesReference(ChannelBufferStreamInput.java:56)
at org.elasticsearch.common.io.stream.StreamInput.readText(StreamInput.java
:222)
at org.elasticsearch.common.io.stream.HandlesStreamInput.readSharedText(
HandlesStreamInput.java:69)
at org.elasticsearch.search.SearchShardTarget.readFrom(SearchShardTarget.
java:103)
at org.elasticsearch.search.SearchShardTarget.readSearchShardTarget(
SearchShardTarget.java:87)
at org.elasticsearch.search.internal.InternalSearchHits.readFrom(
InternalSearchHits.java:217)
at org.elasticsearch.search.internal.InternalSearchHits.readFrom(
InternalSearchHits.java:203)
at org.elasticsearch.search.internal.InternalSearchHits.readSearchHits(
InternalSearchHits.java:197)
at org.elasticsearch.search.aggregations.metrics.tophits.InternalTopHits.
readFrom(InternalTopHits.java:137)
at org.elasticsearch.search.aggregations.metrics.tophits.InternalTopHits$1.
readResult(InternalTopHits.java:50)
at org.elasticsearch.search.aggregations.metrics.tophits.InternalTopHits$1.
readResult(InternalTopHits.java:46)
at org.elasticsearch.search.aggregations.InternalAggregations.readFrom(
InternalAggregations.java:190)
at org.elasticsearch.search.aggregations.InternalAggregations.
readAggregations(InternalAggregations.java:172)
at org.elasticsearch.search.aggregations.bucket.terms.LongTerms.readFrom(
LongTerms.java:148)
at org.elasticsearch.search.aggregations.bucket.terms.LongTerms$1.
readResult(LongTerms.java:48)
at org.elasticsearch.search.aggregations.bucket.terms.LongTerms$1.
readResult(LongTerms.java:44)
at org.elasticsearch.search.aggregations.InternalAggregations.readFrom(
InternalAggregations.java:190)
at org.elasticsearch.search.aggregations.InternalAggregations.
readAggregations(InternalAggregations.java:172)
at org.elasticsearch.search.query.QuerySearchResult.readFromWithId(
QuerySearchResult.java:175)
at org.elasticsearch.search.query.QuerySearchResult.readFrom(
QuerySearchResult.java:162)
at org.elasticsearch.transport.netty.MessageChannelHandler.handleResponse(
MessageChannelHandler.java:150)
... 23 more

This error occurs randomly with any search request, about 10-30 times per
minute. Search requests have complex filters and arrgegations, but I did
not notice due to certain requests.

My application uses REST api, written in php. If error catched, client
sends request again - at second/third try I have correct answer from ES
cluster.

All elastic nodes 1.4.2 version, uses Oracle Java 8, host with CentOs linux.

How to fix it?
Thanks in advance.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/dd26d751-29dc-4697-9761-6cd8a264eea5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.