Java client problem EOFException


I just started to look at ES and here is what i did

  • Started the server and used curl to create a couple of indexes following the samples on the web site

  • Created a java class and used the API to try to connect to the server and get my indexes previously created.

Client client = new TransportClient()
.addTransportAddress(new InetSocketTransportAddress("localhost", 9300));

Then i tried to get an index previously created

GetResponse response = client.prepareGet("twitter", "tweet", "1")

I get this error

Exception in thread "main" org.elasticsearch.transport.RemoteTransportException: [Living Monolith][inet[/]][indices/get]
Caused by:
at org.elasticsearch.transport.netty.ChannelBufferStreamInput.readByte(
at org.elasticsearch.action.get.GetRequest.readFrom(

Is there something wrong with what i am doing ?