Java API simple GET fails


(Carl Samson) #1

Hi,

Using ES 0.17.0 everything works fine for indexing, searching, etc using
java API, but i try to get an object using this syntax

GetResponse response = searchClient.getClient().prepareGet("mycollection",
"myobject", "1")
.execute()
.actionGet();
and it fails

org.elasticsearch.transport.RemoteTransportException*:
[Mystique][inet[/127.0.0.1:9300]][indices/get]

Caused by: *java.io.EOFException
*

at org.elasticsearch.transport.netty.ChannelBufferStreamInput.readByte(*
ChannelBufferStreamInput.java:112*)

at org.elasticsearch.common.io.stream.HandlesStreamInput.readByte(*
HandlesStreamInput.java:80*)

at org.elasticsearch.action.get.GetRequest.readFrom(GetRequest.java:232)

at org.elasticsearch.transport.netty.MessageChannelHandler.handleRequest(*
MessageChannelHandler.java:182*)

at org.elasticsearch.transport.netty.MessageChannelHandler.messageReceived(*
MessageChannelHandler.java:87*)

at
org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(
SimpleChannelUpstreamHandler.java:80)

at
org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(*
DefaultChannelPipeline.java:545*)

at
org.elasticsearch.common.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(
DefaultChannelPipeline.java:754)

at org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(*
Channels.java:302*)

at
org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(
FrameDecoder.java:317)

at
org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.callDecode(*
FrameDecoder.java:299*)

at
org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.messageReceived(
FrameDecoder.java:216)

at
org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(
SimpleChannelUpstreamHandler.java:80)

at
org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(*
DefaultChannelPipeline.java:545*)

at
org.elasticsearch.common.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(
DefaultChannelPipeline.java:754)

at org.elasticsearch.common.netty.OpenChannelsHandler.handleUpstream(*
OpenChannelsHandler.java:51*)

at
org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(*
DefaultChannelPipeline.java:545*)

at
org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(*
DefaultChannelPipeline.java:540*)

at org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(*
Channels.java:274*)

at org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(*
Channels.java:261*)

at org.elasticsearch.common.netty.channel.socket.nio.NioWorker.read(*
NioWorker.java:349*)

at
org.elasticsearch.common.netty.channel.socket.nio.NioWorker.processSelectedKeys(
NioWorker.java:280)

at org.elasticsearch.common.netty.channel.socket.nio.NioWorker.run(*
NioWorker.java:200*)

at org.elasticsearch.common.netty.util.ThreadRenamingRunnable.run(*
ThreadRenamingRunnable.java:108*)

at org.elasticsearch.common.netty.util.internal.DeadLockProofWorker$1.run(*
DeadLockProofWorker.java:44*)

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:662)

I am able to use curl to do my query but not java


(Shay Banon) #2

curl ends up using the same Java Get API. Can you upgrade to latest version
and see if you still get it?

On Wed, Aug 24, 2011 at 4:14 AM, Carl Samson samsoncarl@gmail.com wrote:

Hi,

Using ES 0.17.0 everything works fine for indexing, searching, etc using
java API, but i try to get an object using this syntax

GetResponse response = searchClient.getClient().prepareGet("mycollection",
"myobject", "1")
.execute()
.actionGet();
and it fails

org.elasticsearch.transport.RemoteTransportException
*: [Mystique][inet[/127.0.0.1:9300]][indices/get]

Caused by:
java.io.EOFException

at org.elasticsearch.transport.netty.ChannelBufferStreamInput.readByte(
ChannelBufferStreamInput.java:112)

at org.elasticsearch.common.io.stream.HandlesStreamInput.readByte(
HandlesStreamInput.java:80)

at org.elasticsearch.action.get.GetRequest.readFrom(
GetRequest.java:232)

at org.elasticsearch.transport.netty.MessageChannelHandler.handleRequest(
MessageChannelHandler.java:182)

at org.elasticsearch.transport.netty.MessageChannelHandler.messageReceived(
MessageChannelHandler.java:87)

at
org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(
SimpleChannelUpstreamHandler.java:80)

at
org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(
DefaultChannelPipeline.java:545)

at
org.elasticsearch.common.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(
DefaultChannelPipeline.java:754)

at org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(
Channels.java:302)

at
org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(
FrameDecoder.java:317)

at
org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.callDecode(
FrameDecoder.java:299)

at
org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.messageReceived(
FrameDecoder.java:216)

at
org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(
SimpleChannelUpstreamHandler.java:80)

at
org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(
DefaultChannelPipeline.java:545)

at
org.elasticsearch.common.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(
DefaultChannelPipeline.java:754)

at org.elasticsearch.common.netty.OpenChannelsHandler.handleUpstream(
OpenChannelsHandler.java:51)

at
org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(
DefaultChannelPipeline.java:545)

at
org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(
DefaultChannelPipeline.java:540)

at org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(
Channels.java:274)

at org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(
Channels.java:261)

at org.elasticsearch.common.netty.channel.socket.nio.NioWorker.read(
NioWorker.java:349)

at
org.elasticsearch.common.netty.channel.socket.nio.NioWorker.processSelectedKeys(
NioWorker.java:280)

at org.elasticsearch.common.netty.channel.socket.nio.NioWorker.run(
NioWorker.java:200)

at org.elasticsearch.common.netty.util.ThreadRenamingRunnable.run(
ThreadRenamingRunnable.java:108)

at org.elasticsearch.common.netty.util.internal.DeadLockProofWorker$1.run(
DeadLockProofWorker.java:44)

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:662)

I am able to use curl to do my query but not java


(system) #3