Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search failures are not serialized correctly in MultiSearchResponse #2498

Closed
imotov opened this issue Dec 20, 2012 · 0 comments
Closed

Search failures are not serialized correctly in MultiSearchResponse #2498

imotov opened this issue Dec 20, 2012 · 0 comments

Comments

@imotov
Copy link
Contributor

imotov commented Dec 20, 2012

To reproduce, run the following request using Transport client:

client.prepareMultiSearch().add(client.prepareSearch("test-idx").setQuery(customScoreQuery(matchAllQuery()))).execute().actionGet();

It throws the following exception instead of returning a failure message:

Exception in thread "main" org.elasticsearch.transport.TransportSerializationException: Failed to deserialize response of type [org.elasticsearch.action.search.MultiSearchResponse]
    at org.elasticsearch.transport.netty.MessageChannelHandler.handleResponse(MessageChannelHandler.java:150)
    at org.elasticsearch.transport.netty.MessageChannelHandler.messageReceived(MessageChannelHandler.java:127)
    at org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:75)
    at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:565)
    at org.elasticsearch.common.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:793)
    at org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:296)
    at org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:458)
    at org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:439)
    at org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:303)
    at org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:75)
    at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:565)
    at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:560)
    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:84)
    at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.processSelectedKeys(AbstractNioWorker.java:471)
    at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:332)
    at org.elasticsearch.common.netty.channel.socket.nio.NioWorker.run(NioWorker.java:35)
    at org.elasticsearch.common.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:102)
    at org.elasticsearch.common.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:680)
Caused by: java.io.IOException: Expected handle header, got [80]
    at org.elasticsearch.common.io.stream.HandlesStreamInput.readUTF(HandlesStreamInput.java:64)
    at org.elasticsearch.search.SearchShardTarget.readFrom(SearchShardTarget.java:97)
    at org.elasticsearch.search.SearchShardTarget.readSearchShardTarget(SearchShardTarget.java:81)
    at org.elasticsearch.search.internal.InternalSearchHits.readFrom(InternalSearchHits.java:214)
    at org.elasticsearch.search.internal.InternalSearchHits.readFrom(InternalSearchHits.java:200)
    at org.elasticsearch.search.internal.InternalSearchHits.readSearchHits(InternalSearchHits.java:194)
    at org.elasticsearch.search.internal.InternalSearchResponse.readFrom(InternalSearchResponse.java:86)
    at org.elasticsearch.search.internal.InternalSearchResponse.readInternalSearchResponse(InternalSearchResponse.java:80)
    at org.elasticsearch.action.search.SearchResponse.readFrom(SearchResponse.java:284)
    at org.elasticsearch.action.search.MultiSearchResponse$Item.readFrom(MultiSearchResponse.java:86)
    at org.elasticsearch.action.search.MultiSearchResponse$Item.readItem(MultiSearchResponse.java:78)
    at org.elasticsearch.action.search.MultiSearchResponse.readFrom(MultiSearchResponse.java:135)
    at org.elasticsearch.transport.netty.MessageChannelHandler.handleResponse(MessageChannelHandler.java:148)
    ... 22 more

See also https://groups.google.com/d/topic/elasticsearch/7mipq2I8NpY/discussion

@imotov imotov closed this as completed in fcdc369 Dec 22, 2012
mute pushed a commit to mute/elasticsearch that referenced this issue Jul 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant