# Java client problem EOFException

**URL:** <https://discuss.elastic.co/t/java-client-problem-eofexception/4800>\
**Category:** Elasticsearch\
**Created:** [July 7, 2011, 3:53am UTC](https://discuss.elastic.co/t/java-client-problem-eofexception/4800 "2011-07-07T03:53:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![santana](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/santana/32/3180_2.png) [@santana](https://discuss.elastic.co/u/santana)\
**Post date:** [July 7, 2011, 3:53am UTC](https://discuss.elastic.co/t/java-client-problem-eofexception/4800/1 "2011-07-07T03:53:52Z")

</div>

Hi,

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")  
.execute()  
.actionGet();

I get this error

Exception in thread "main" org.elasticsearch.transport.RemoteTransportException: [Living Monolith][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)

Is there something wrong with what i am doing ?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 4:01am UTC](https://discuss.elastic.co/t/java-client-problem-eofexception/4800/2 "2017-07-06T04:01:31Z")

</div>

Closed on July 6, 2017, 4:01am UTC


