# Get an exception when I try to get the specific document in es with indexId, type and documentId

**URL:** <https://discuss.elastic.co/t/get-an-exception-when-i-try-to-get-the-specific-document-in-es-with-indexid-type-and-documentid/7983>\
**Category:** Elasticsearch\
**Created:** [June 5, 2012, 5:24pm UTC](https://discuss.elastic.co/t/get-an-exception-when-i-try-to-get-the-specific-document-in-es-with-indexid-type-and-documentid/7983 "2012-06-05T17:24:17Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yang](https://avatars.discourse-cdn.com/v4/letter/y/77aa72/32.png) [@Yang](https://discuss.elastic.co/u/Yang)\
**Post date:** [June 5, 2012, 5:24pm UTC](https://discuss.elastic.co/t/get-an-exception-when-i-try-to-get-the-specific-document-in-es-with-indexid-type-and-documentid/7983/1 "2012-06-05T17:24:17Z")

</div>

Dear all,

I'm playing with ES, but meet a problem, after I spent my whole day, I  
couldn't get it done.  
I just want to get the specific document by indexId, type and documentId  
via the code below:  
(all the classes come from org.apache.commons.httpclient)

String docURL = genDocumentURL(indexId, type, documentId);// just combine

> them as an url.  
> HttpClient http = new HttpClient();  
> GetMethod get = new GetMethod(docURL);  
> int status = http.executeMethod(get);  
> log.info("the status of request a document: [" + status + "]");  
> String body = get.getResponseBodyAsString();  
> log.info("resopnse body is: [" + body + "]");

After I run the code above, I got the exception below:

> the status of request a document: [500]  
> resopnse body is: [{"error":"RemoteTransportException[Failed to  
> deserialize response of type [org.elasticsearch.action.get.GetResponse]];  
> nested: TransportSerializationException[Failed to deserialize response of  
> type [org.elasticsearch.action.get.GetResponse]]; nested:  
> IOException[Expected handle header, got [79]]; ","status":500}]

ES version: 0.19.4  
All config of ES are default. I don't change anything.

Could anyone give me a hint or a reference, that would be very helpful~~

Thanks very much~

Yang

---

<div class="post-metadata">

**Author:** ![Yang](https://avatars.discourse-cdn.com/v4/letter/y/77aa72/32.png) [@Yang](https://discuss.elastic.co/u/Yang)\
**Post date:** [June 6, 2012, 12:46am UTC](https://discuss.elastic.co/t/get-an-exception-when-i-try-to-get-the-specific-document-in-es-with-indexid-type-and-documentid/7983/2 "2012-06-06T00:46:47Z")

</div>

Could anybody give me a hand?

On Wednesday, June 6, 2012 1:24:17 AM UTC+8, Yang wrote:

> Dear all,
> 
> I'm playing with ES, but meet a problem, after I spent my whole day, I  
> couldn't get it done.  
> I just want to get the specific document by indexId, type and documentId  
> via the code below:  
> (all the classes come from org.apache.commons.httpclient)
> 
> String docURL = genDocumentURL(indexId, type, documentId);// just combine
> 
> > them as an url.  
> > HttpClient http = new HttpClient();  
> > GetMethod get = new GetMethod(docURL);  
> > int status = http.executeMethod(get);  
> > log.info("the status of request a document: [" + status + "]");  
> > String body = get.getResponseBodyAsString();  
> > log.info("resopnse body is: [" + body + "]");
> 
> After I run the code above, I got the exception below:
> 
> > the status of request a document: [500]  
> > resopnse body is: [{"error":"RemoteTransportException[Failed to  
> > deserialize response of type [org.elasticsearch.action.get.GetResponse]];  
> > nested: TransportSerializationException[Failed to deserialize response of  
> > type [org.elasticsearch.action.get.GetResponse]]; nested:  
> > IOException[Expected handle header, got [79]]; ","status":500}]
> 
> ES version: 0.19.4  
> All config of ES are default. I don't change anything.
> 
> Could anyone give me a hint or a reference, that would be very helpful~~
> 
> Thanks very much~
> 
> Yang

On Wednesday, June 6, 2012 1:24:17 AM UTC+8, Yang wrote:

> Dear all,
> 
> I'm playing with ES, but meet a problem, after I spent my whole day, I  
> couldn't get it done.  
> I just want to get the specific document by indexId, type and documentId  
> via the code below:  
> (all the classes come from org.apache.commons.httpclient)
> 
> String docURL = genDocumentURL(indexId, type, documentId);// just combine
> 
> > them as an url.  
> > HttpClient http = new HttpClient();  
> > GetMethod get = new GetMethod(docURL);  
> > int status = http.executeMethod(get);  
> > log.info("the status of request a document: [" + status + "]");  
> > String body = get.getResponseBodyAsString();  
> > log.info("resopnse body is: [" + body + "]");
> 
> After I run the code above, I got the exception below:
> 
> > the status of request a document: [500]  
> > resopnse body is: [{"error":"RemoteTransportException[Failed to  
> > deserialize response of type [org.elasticsearch.action.get.GetResponse]];  
> > nested: TransportSerializationException[Failed to deserialize response of  
> > type [org.elasticsearch.action.get.GetResponse]]; nested:  
> > IOException[Expected handle header, got [79]]; ","status":500}]
> 
> ES version: 0.19.4  
> All config of ES are default. I don't change anything.
> 
> Could anyone give me a hint or a reference, that would be very helpful~~
> 
> Thanks very much~
> 
> Yang

On Wednesday, June 6, 2012 1:24:17 AM UTC+8, Yang wrote:

> Dear all,
> 
> I'm playing with ES, but meet a problem, after I spent my whole day, I  
> couldn't get it done.  
> I just want to get the specific document by indexId, type and documentId  
> via the code below:  
> (all the classes come from org.apache.commons.httpclient)
> 
> String docURL = genDocumentURL(indexId, type, documentId);// just combine
> 
> > them as an url.  
> > HttpClient http = new HttpClient();  
> > GetMethod get = new GetMethod(docURL);  
> > int status = http.executeMethod(get);  
> > log.info("the status of request a document: [" + status + "]");  
> > String body = get.getResponseBodyAsString();  
> > log.info("resopnse body is: [" + body + "]");
> 
> After I run the code above, I got the exception below:
> 
> > the status of request a document: [500]  
> > resopnse body is: [{"error":"RemoteTransportException[Failed to  
> > deserialize response of type [org.elasticsearch.action.get.GetResponse]];  
> > nested: TransportSerializationException[Failed to deserialize response of  
> > type [org.elasticsearch.action.get.GetResponse]]; nested:  
> > IOException[Expected handle header, got [79]]; ","status":500}]
> 
> ES version: 0.19.4  
> All config of ES are default. I don't change anything.
> 
> Could anyone give me a hint or a reference, that would be very helpful~~
> 
> Thanks very much~
> 
> Yang

On Wednesday, June 6, 2012 1:24:17 AM UTC+8, Yang wrote:

> Dear all,
> 
> I'm playing with ES, but meet a problem, after I spent my whole day, I  
> couldn't get it done.  
> I just want to get the specific document by indexId, type and documentId  
> via the code below:  
> (all the classes come from org.apache.commons.httpclient)
> 
> String docURL = genDocumentURL(indexId, type, documentId);// just combine
> 
> > them as an url.  
> > HttpClient http = new HttpClient();  
> > GetMethod get = new GetMethod(docURL);  
> > int status = http.executeMethod(get);  
> > log.info("the status of request a document: [" + status + "]");  
> > String body = get.getResponseBodyAsString();  
> > log.info("resopnse body is: [" + body + "]");
> 
> After I run the code above, I got the exception below:
> 
> > the status of request a document: [500]  
> > resopnse body is: [{"error":"RemoteTransportException[Failed to  
> > deserialize response of type [org.elasticsearch.action.get.GetResponse]];  
> > nested: TransportSerializationException[Failed to deserialize response of  
> > type [org.elasticsearch.action.get.GetResponse]]; nested:  
> > IOException[Expected handle header, got [79]]; ","status":500}]
> 
> ES version: 0.19.4  
> All config of ES are default. I don't change anything.
> 
> Could anyone give me a hint or a reference, that would be very helpful~~
> 
> Thanks very much~
> 
> Yang

On Wednesday, June 6, 2012 1:24:17 AM UTC+8, Yang wrote:

> Dear all,
> 
> I'm playing with ES, but meet a problem, after I spent my whole day, I  
> couldn't get it done.  
> I just want to get the specific document by indexId, type and documentId  
> via the code below:  
> (all the classes come from org.apache.commons.httpclient)
> 
> String docURL = genDocumentURL(indexId, type, documentId);// just combine
> 
> > them as an url.  
> > HttpClient http = new HttpClient();  
> > GetMethod get = new GetMethod(docURL);  
> > int status = http.executeMethod(get);  
> > log.info("the status of request a document: [" + status + "]");  
> > String body = get.getResponseBodyAsString();  
> > log.info("resopnse body is: [" + body + "]");
> 
> After I run the code above, I got the exception below:
> 
> > the status of request a document: [500]  
> > resopnse body is: [{"error":"RemoteTransportException[Failed to  
> > deserialize response of type [org.elasticsearch.action.get.GetResponse]];  
> > nested: TransportSerializationException[Failed to deserialize response of  
> > type [org.elasticsearch.action.get.GetResponse]]; nested:  
> > IOException[Expected handle header, got [79]]; ","status":500}]
> 
> ES version: 0.19.4  
> All config of ES are default. I don't change anything.
> 
> Could anyone give me a hint or a reference, that would be very helpful~~
> 
> Thanks very much~
> 
> Yang

On Wednesday, June 6, 2012 1:24:17 AM UTC+8, Yang wrote:

> Dear all,
> 
> I'm playing with ES, but meet a problem, after I spent my whole day, I  
> couldn't get it done.  
> I just want to get the specific document by indexId, type and documentId  
> via the code below:  
> (all the classes come from org.apache.commons.httpclient)
> 
> String docURL = genDocumentURL(indexId, type, documentId);// just combine
> 
> > them as an url.  
> > HttpClient http = new HttpClient();  
> > GetMethod get = new GetMethod(docURL);  
> > int status = http.executeMethod(get);  
> > log.info("the status of request a document: [" + status + "]");  
> > String body = get.getResponseBodyAsString();  
> > log.info("resopnse body is: [" + body + "]");
> 
> After I run the code above, I got the exception below:
> 
> > the status of request a document: [500]  
> > resopnse body is: [{"error":"RemoteTransportException[Failed to  
> > deserialize response of type [org.elasticsearch.action.get.GetResponse]];  
> > nested: TransportSerializationException[Failed to deserialize response of  
> > type [org.elasticsearch.action.get.GetResponse]]; nested:  
> > IOException[Expected handle header, got [79]]; ","status":500}]
> 
> ES version: 0.19.4  
> All config of ES are default. I don't change anything.
> 
> Could anyone give me a hint or a reference, that would be very helpful~~
> 
> Thanks very much~
> 
> Yang

On Wednesday, June 6, 2012 1:24:17 AM UTC+8, Yang wrote:

> Dear all,
> 
> I'm playing with ES, but meet a problem, after I spent my whole day, I  
> couldn't get it done.  
> I just want to get the specific document by indexId, type and documentId  
> via the code below:  
> (all the classes come from org.apache.commons.httpclient)
> 
> String docURL = genDocumentURL(indexId, type, documentId);// just combine
> 
> > them as an url.  
> > HttpClient http = new HttpClient();  
> > GetMethod get = new GetMethod(docURL);  
> > int status = http.executeMethod(get);  
> > log.info("the status of request a document: [" + status + "]");  
> > String body = get.getResponseBodyAsString();  
> > log.info("resopnse body is: [" + body + "]");
> 
> After I run the code above, I got the exception below:
> 
> > the status of request a document: [500]  
> > resopnse body is: [{"error":"RemoteTransportException[Failed to  
> > deserialize response of type [org.elasticsearch.action.get.GetResponse]];  
> > nested: TransportSerializationException[Failed to deserialize response of  
> > type [org.elasticsearch.action.get.GetResponse]]; nested:  
> > IOException[Expected handle header, got [79]]; ","status":500}]
> 
> ES version: 0.19.4  
> All config of ES are default. I don't change anything.
> 
> Could anyone give me a hint or a reference, that would be very helpful~~
> 
> Thanks very much~
> 
> Yang

On Wednesday, June 6, 2012 1:24:17 AM UTC+8, Yang wrote:

> Dear all,
> 
> I'm playing with ES, but meet a problem, after I spent my whole day, I  
> couldn't get it done.  
> I just want to get the specific document by indexId, type and documentId  
> via the code below:  
> (all the classes come from org.apache.commons.httpclient)
> 
> String docURL = genDocumentURL(indexId, type, documentId);// just combine
> 
> > them as an url.  
> > HttpClient http = new HttpClient();  
> > GetMethod get = new GetMethod(docURL);  
> > int status = http.executeMethod(get);  
> > log.info("the status of request a document: [" + status + "]");  
> > String body = get.getResponseBodyAsString();  
> > log.info("resopnse body is: [" + body + "]");
> 
> After I run the code above, I got the exception below:
> 
> > the status of request a document: [500]  
> > resopnse body is: [{"error":"RemoteTransportException[Failed to  
> > deserialize response of type [org.elasticsearch.action.get.GetResponse]];  
> > nested: TransportSerializationException[Failed to deserialize response of  
> > type [org.elasticsearch.action.get.GetResponse]]; nested:  
> > IOException[Expected handle header, got [79]]; ","status":500}]
> 
> ES version: 0.19.4  
> All config of ES are default. I don't change anything.
> 
> Could anyone give me a hint or a reference, that would be very helpful~~
> 
> Thanks very much~
> 
> Yang

On Wednesday, June 6, 2012 1:24:17 AM UTC+8, Yang wrote:

> Dear all,
> 
> I'm playing with ES, but meet a problem, after I spent my whole day, I  
> couldn't get it done.  
> I just want to get the specific document by indexId, type and documentId  
> via the code below:  
> (all the classes come from org.apache.commons.httpclient)
> 
> String docURL = genDocumentURL(indexId, type, documentId);// just combine
> 
> > them as an url.  
> > HttpClient http = new HttpClient();  
> > GetMethod get = new GetMethod(docURL);  
> > int status = http.executeMethod(get);  
> > log.info("the status of request a document: [" + status + "]");  
> > String body = get.getResponseBodyAsString();  
> > log.info("resopnse body is: [" + body + "]");
> 
> After I run the code above, I got the exception below:
> 
> > the status of request a document: [500]  
> > resopnse body is: [{"error":"RemoteTransportException[Failed to  
> > deserialize response of type [org.elasticsearch.action.get.GetResponse]];  
> > nested: TransportSerializationException[Failed to deserialize response of  
> > type [org.elasticsearch.action.get.GetResponse]]; nested:  
> > IOException[Expected handle header, got [79]]; ","status":500}]
> 
> ES version: 0.19.4  
> All config of ES are default. I don't change anything.
> 
> Could anyone give me a hint or a reference, that would be very helpful~~
> 
> Thanks very much~
> 
> Yang

---

<div class="post-metadata">

**Author:** ![Igor\_Motov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_motov/32/45193_2.png) [@Igor\_Motov](https://discuss.elastic.co/u/Igor_Motov)\
**Post date:** [June 6, 2012, 1:36am UTC](https://discuss.elastic.co/t/get-an-exception-when-i-try-to-get-the-specific-document-in-es-with-indexid-type-and-documentid/7983/3 "2012-06-06T01:36:30Z")

</div>

It looks like you have more than one es node and they have problems  
communicating to each other. Do you see any errors in the log files?

On Tuesday, June 5, 2012 8:46:47 PM UTC-4, Yang wrote:

> Could anybody give me a hand?
> 
> On Wednesday, June 6, 2012 1:24:17 AM UTC+8, Yang wrote:
> 
> > Dear all,
> > 
> > I'm playing with ES, but meet a problem, after I spent my whole day, I  
> > couldn't get it done.  
> > I just want to get the specific document by indexId, type and documentId  
> > via the code below:  
> > (all the classes come from org.apache.commons.httpclient)
> > 
> > String docURL = genDocumentURL(indexId, type, documentId);// just combine
> > 
> > > them as an url.  
> > > HttpClient http = new HttpClient();  
> > > GetMethod get = new GetMethod(docURL);  
> > > int status = http.executeMethod(get);  
> > > log.info("the status of request a document: [" + status + "]");  
> > > String body = get.getResponseBodyAsString();  
> > > log.info("resopnse body is: [" + body + "]");
> > 
> > After I run the code above, I got the exception below:
> > 
> > > the status of request a document: [500]  
> > > resopnse body is: [{"error":"RemoteTransportException[Failed to  
> > > deserialize response of type [org.elasticsearch.action.get.GetResponse]];  
> > > nested: TransportSerializationException[Failed to deserialize response of  
> > > type [org.elasticsearch.action.get.GetResponse]]; nested:  
> > > IOException[Expected handle header, got [79]]; ","status":500}]
> > 
> > ES version: 0.19.4  
> > All config of ES are default. I don't change anything.
> > 
> > Could anyone give me a hint or a reference, that would be very helpful~~
> > 
> > Thanks very much~
> > 
> > Yang
> 
> On Wednesday, June 6, 2012 1:24:17 AM UTC+8, Yang wrote:
> 
> > Dear all,
> > 
> > I'm playing with ES, but meet a problem, after I spent my whole day, I  
> > couldn't get it done.  
> > I just want to get the specific document by indexId, type and documentId  
> > via the code below:  
> > (all the classes come from org.apache.commons.httpclient)
> > 
> > String docURL = genDocumentURL(indexId, type, documentId);// just combine
> > 
> > > them as an url.  
> > > HttpClient http = new HttpClient();  
> > > GetMethod get = new GetMethod(docURL);  
> > > int status = http.executeMethod(get);  
> > > log.info("the status of request a document: [" + status + "]");  
> > > String body = get.getResponseBodyAsString();  
> > > log.info("resopnse body is: [" + body + "]");
> > 
> > After I run the code above, I got the exception below:
> > 
> > > the status of request a document: [500]  
> > > resopnse body is: [{"error":"RemoteTransportException[Failed to  
> > > deserialize response of type [org.elasticsearch.action.get.GetResponse]];  
> > > nested: TransportSerializationException[Failed to deserialize response of  
> > > type [org.elasticsearch.action.get.GetResponse]]; nested:  
> > > IOException[Expected handle header, got [79]]; ","status":500}]
> > 
> > ES version: 0.19.4  
> > All config of ES are default. I don't change anything.
> > 
> > Could anyone give me a hint or a reference, that would be very helpful~~
> > 
> > Thanks very much~
> > 
> > Yang
> 
> On Wednesday, June 6, 2012 1:24:17 AM UTC+8, Yang wrote:
> 
> > Dear all,
> > 
> > I'm playing with ES, but meet a problem, after I spent my whole day, I  
> > couldn't get it done.  
> > I just want to get the specific document by indexId, type and documentId  
> > via the code below:  
> > (all the classes come from org.apache.commons.httpclient)
> > 
> > String docURL = genDocumentURL(indexId, type, documentId);// just combine
> > 
> > > them as an url.  
> > > HttpClient http = new HttpClient();  
> > > GetMethod get = new GetMethod(docURL);  
> > > int status = http.executeMethod(get);  
> > > log.info("the status of request a document: [" + status + "]");  
> > > String body = get.getResponseBodyAsString();  
> > > log.info("resopnse body is: [" + body + "]");
> > 
> > After I run the code above, I got the exception below:
> > 
> > > the status of request a document: [500]  
> > > resopnse body is: [{"error":"RemoteTransportException[Failed to  
> > > deserialize response of type [org.elasticsearch.action.get.GetResponse]];  
> > > nested: TransportSerializationException[Failed to deserialize response of  
> > > type [org.elasticsearch.action.get.GetResponse]]; nested:  
> > > IOException[Expected handle header, got [79]]; ","status":500}]
> > 
> > ES version: 0.19.4  
> > All config of ES are default. I don't change anything.
> > 
> > Could anyone give me a hint or a reference, that would be very helpful~~
> > 
> > Thanks very much~
> > 
> > Yang
> 
> On Wednesday, June 6, 2012 1:24:17 AM UTC+8, Yang wrote:
> 
> > Dear all,
> > 
> > I'm playing with ES, but meet a problem, after I spent my whole day, I  
> > couldn't get it done.  
> > I just want to get the specific document by indexId, type and documentId  
> > via the code below:  
> > (all the classes come from org.apache.commons.httpclient)
> > 
> > String docURL = genDocumentURL(indexId, type, documentId);// just combine
> > 
> > > them as an url.  
> > > HttpClient http = new HttpClient();  
> > > GetMethod get = new GetMethod(docURL);  
> > > int status = http.executeMethod(get);  
> > > log.info("the status of request a document: [" + status + "]");  
> > > String body = get.getResponseBodyAsString();  
> > > log.info("resopnse body is: [" + body + "]");
> > 
> > After I run the code above, I got the exception below:
> > 
> > > the status of request a document: [500]  
> > > resopnse body is: [{"error":"RemoteTransportException[Failed to  
> > > deserialize response of type [org.elasticsearch.action.get.GetResponse]];  
> > > nested: TransportSerializationException[Failed to deserialize response of  
> > > type [org.elasticsearch.action.get.GetResponse]]; nested:  
> > > IOException[Expected handle header, got [79]]; ","status":500}]
> > 
> > ES version: 0.19.4  
> > All config of ES are default. I don't change anything.
> > 
> > Could anyone give me a hint or a reference, that would be very helpful~~
> > 
> > Thanks very much~
> > 
> > Yang
> 
> On Wednesday, June 6, 2012 1:24:17 AM UTC+8, Yang wrote:
> 
> > Dear all,
> > 
> > I'm playing with ES, but meet a problem, after I spent my whole day, I  
> > couldn't get it done.  
> > I just want to get the specific document by indexId, type and documentId  
> > via the code below:  
> > (all the classes come from org.apache.commons.httpclient)
> > 
> > String docURL = genDocumentURL(indexId, type, documentId);// just combine
> > 
> > > them as an url.  
> > > HttpClient http = new HttpClient();  
> > > GetMethod get = new GetMethod(docURL);  
> > > int status = http.executeMethod(get);  
> > > log.info("the status of request a document: [" + status + "]");  
> > > String body = get.getResponseBodyAsString();  
> > > log.info("resopnse body is: [" + body + "]");
> > 
> > After I run the code above, I got the exception below:
> > 
> > > the status of request a document: [500]  
> > > resopnse body is: [{"error":"RemoteTransportException[Failed to  
> > > deserialize response of type [org.elasticsearch.action.get.GetResponse]];  
> > > nested: TransportSerializationException[Failed to deserialize response of  
> > > type [org.elasticsearch.action.get.GetResponse]]; nested:  
> > > IOException[Expected handle header, got [79]]; ","status":500}]
> > 
> > ES version: 0.19.4  
> > All config of ES are default. I don't change anything.
> > 
> > Could anyone give me a hint or a reference, that would be very helpful~~
> > 
> > Thanks very much~
> > 
> > Yang
> 
> On Wednesday, June 6, 2012 1:24:17 AM UTC+8, Yang wrote:
> 
> > Dear all,
> > 
> > I'm playing with ES, but meet a problem, after I spent my whole day, I  
> > couldn't get it done.  
> > I just want to get the specific document by indexId, type and documentId  
> > via the code below:  
> > (all the classes come from org.apache.commons.httpclient)
> > 
> > String docURL = genDocumentURL(indexId, type, documentId);// just combine
> > 
> > > them as an url.  
> > > HttpClient http = new HttpClient();  
> > > GetMethod get = new GetMethod(docURL);  
> > > int status = http.executeMethod(get);  
> > > log.info("the status of request a document: [" + status + "]");  
> > > String body = get.getResponseBodyAsString();  
> > > log.info("resopnse body is: [" + body + "]");
> > 
> > After I run the code above, I got the exception below:
> > 
> > > the status of request a document: [500]  
> > > resopnse body is: [{"error":"RemoteTransportException[Failed to  
> > > deserialize response of type [org.elasticsearch.action.get.GetResponse]];  
> > > nested: TransportSerializationException[Failed to deserialize response of  
> > > type [org.elasticsearch.action.get.GetResponse]]; nested:  
> > > IOException[Expected handle header, got [79]]; ","status":500}]
> > 
> > ES version: 0.19.4  
> > All config of ES are default. I don't change anything.
> > 
> > Could anyone give me a hint or a reference, that would be very helpful~~
> > 
> > Thanks very much~
> > 
> > Yang
> 
> On Wednesday, June 6, 2012 1:24:17 AM UTC+8, Yang wrote:
> 
> > Dear all,
> > 
> > I'm playing with ES, but meet a problem, after I spent my whole day, I  
> > couldn't get it done.  
> > I just want to get the specific document by indexId, type and documentId  
> > via the code below:  
> > (all the classes come from org.apache.commons.httpclient)
> > 
> > String docURL = genDocumentURL(indexId, type, documentId);// just combine
> > 
> > > them as an url.  
> > > HttpClient http = new HttpClient();  
> > > GetMethod get = new GetMethod(docURL);  
> > > int status = http.executeMethod(get);  
> > > log.info("the status of request a document: [" + status + "]");  
> > > String body = get.getResponseBodyAsString();  
> > > log.info("resopnse body is: [" + body + "]");
> > 
> > After I run the code above, I got the exception below:
> > 
> > > the status of request a document: [500]  
> > > resopnse body is: [{"error":"RemoteTransportException[Failed to  
> > > deserialize response of type [org.elasticsearch.action.get.GetResponse]];  
> > > nested: TransportSerializationException[Failed to deserialize response of  
> > > type [org.elasticsearch.action.get.GetResponse]]; nested:  
> > > IOException[Expected handle header, got [79]]; ","status":500}]
> > 
> > ES version: 0.19.4  
> > All config of ES are default. I don't change anything.
> > 
> > Could anyone give me a hint or a reference, that would be very helpful~~
> > 
> > Thanks very much~
> > 
> > Yang
> 
> On Wednesday, June 6, 2012 1:24:17 AM UTC+8, Yang wrote:
> 
> > Dear all,
> > 
> > I'm playing with ES, but meet a problem, after I spent my whole day, I  
> > couldn't get it done.  
> > I just want to get the specific document by indexId, type and documentId  
> > via the code below:  
> > (all the classes come from org.apache.commons.httpclient)
> > 
> > String docURL = genDocumentURL(indexId, type, documentId);// just combine
> > 
> > > them as an url.  
> > > HttpClient http = new HttpClient();  
> > > GetMethod get = new GetMethod(docURL);  
> > > int status = http.executeMethod(get);  
> > > log.info("the status of request a document: [" + status + "]");  
> > > String body = get.getResponseBodyAsString();  
> > > log.info("resopnse body is: [" + body + "]");
> > 
> > After I run the code above, I got the exception below:
> > 
> > > the status of request a document: [500]  
> > > resopnse body is: [{"error":"RemoteTransportException[Failed to  
> > > deserialize response of type [org.elasticsearch.action.get.GetResponse]];  
> > > nested: TransportSerializationException[Failed to deserialize response of  
> > > type [org.elasticsearch.action.get.GetResponse]]; nested:  
> > > IOException[Expected handle header, got [79]]; ","status":500}]
> > 
> > ES version: 0.19.4  
> > All config of ES are default. I don't change anything.
> > 
> > Could anyone give me a hint or a reference, that would be very helpful~~
> > 
> > Thanks very much~
> > 
> > Yang
> 
> On Wednesday, June 6, 2012 1:24:17 AM UTC+8, Yang wrote:
> 
> > Dear all,
> > 
> > I'm playing with ES, but meet a problem, after I spent my whole day, I  
> > couldn't get it done.  
> > I just want to get the specific document by indexId, type and documentId  
> > via the code below:  
> > (all the classes come from org.apache.commons.httpclient)
> > 
> > String docURL = genDocumentURL(indexId, type, documentId);// just combine
> > 
> > > them as an url.  
> > > HttpClient http = new HttpClient();  
> > > GetMethod get = new GetMethod(docURL);  
> > > int status = http.executeMethod(get);  
> > > log.info("the status of request a document: [" + status + "]");  
> > > String body = get.getResponseBodyAsString();  
> > > log.info("resopnse body is: [" + body + "]");
> > 
> > After I run the code above, I got the exception below:
> > 
> > > the status of request a document: [500]  
> > > resopnse body is: [{"error":"RemoteTransportException[Failed to  
> > > deserialize response of type [org.elasticsearch.action.get.GetResponse]];  
> > > nested: TransportSerializationException[Failed to deserialize response of  
> > > type [org.elasticsearch.action.get.GetResponse]]; nested:  
> > > IOException[Expected handle header, got [79]]; ","status":500}]
> > 
> > ES version: 0.19.4  
> > All config of ES are default. I don't change anything.
> > 
> > Could anyone give me a hint or a reference, that would be very helpful~~
> > 
> > Thanks very much~
> > 
> > Yang

---

<div class="post-metadata">

**Author:** ![Yang](https://avatars.discourse-cdn.com/v4/letter/y/77aa72/32.png) [@Yang](https://discuss.elastic.co/u/Yang)\
**Post date:** [June 6, 2012, 6:15am UTC](https://discuss.elastic.co/t/get-an-exception-when-i-try-to-get-the-specific-document-in-es-with-indexid-type-and-documentid/7983/4 "2012-06-06T06:15:07Z")

</div>

Dear Motov,

Thanks for your replying.  
I checked $es\_home$/logs, no other exception.  
But what you said remind me.

Actually, I used the code below to get a client and do "index" and "search"  
via java API:

NodeBuilder nb = NodeBuilder.nodeBuilder();

node = nb.client(true).node();

esClient = node.client();

Then I try to get a specific document via java API, but I meet the problem  
which is the same as I talked before.  
So I change the code to "rest", it works.  
But these days, it fails again, I don't even change anything.

On Wednesday, June 6, 2012 9:36:30 AM UTC+8, Igor Motov wrote:

> It looks like you have more than one es node and they have problems  
> communicating to each other. Do you see any errors in the log files?
> 
> On Tuesday, June 5, 2012 8:46:47 PM UTC-4, Yang wrote:
> 
> > Could anybody give me a hand?
> > 
> > On Wednesday, June 6, 2012 1:24:17 AM UTC+8, Yang wrote:
> > 
> > > Dear all,
> > > 
> > > I'm playing with ES, but meet a problem, after I spent my whole day, I  
> > > couldn't get it done.  
> > > I just want to get the specific document by indexId, type and documentId  
> > > via the code below:  
> > > (all the classes come from org.apache.commons.httpclient)
> > > 
> > > String docURL = genDocumentURL(indexId, type, documentId);// just
> > > 
> > > > combine them as an url.  
> > > > HttpClient http = new HttpClient();  
> > > > GetMethod get = new GetMethod(docURL);  
> > > > int status = http.executeMethod(get);  
> > > > log.info("the status of request a document: [" + status + "]");  
> > > > String body = get.getResponseBodyAsString();  
> > > > log.info("resopnse body is: [" + body + "]");
> > > 
> > > After I run the code above, I got the exception below:
> > > 
> > > > the status of request a document: [500]  
> > > > resopnse body is: [{"error":"RemoteTransportException[Failed to  
> > > > deserialize response of type [org.elasticsearch.action.get.GetResponse]];  
> > > > nested: TransportSerializationException[Failed to deserialize response of  
> > > > type [org.elasticsearch.action.get.GetResponse]]; nested:  
> > > > IOException[Expected handle header, got [79]]; ","status":500}]
> > > 
> > > ES version: 0.19.4  
> > > All config of ES are default. I don't change anything.
> > > 
> > > Could anyone give me a hint or a reference, that would be very helpful~~
> > > 
> > > Thanks very much~
> > > 
> > > Yang
> > 
> > On Wednesday, June 6, 2012 1:24:17 AM UTC+8, Yang wrote:
> > 
> > > Dear all,
> > > 
> > > I'm playing with ES, but meet a problem, after I spent my whole day, I  
> > > couldn't get it done.  
> > > I just want to get the specific document by indexId, type and documentId  
> > > via the code below:  
> > > (all the classes come from org.apache.commons.httpclient)
> > > 
> > > String docURL = genDocumentURL(indexId, type, documentId);// just
> > > 
> > > > combine them as an url.  
> > > > HttpClient http = new HttpClient();  
> > > > GetMethod get = new GetMethod(docURL);  
> > > > int status = http.executeMethod(get);  
> > > > log.info("the status of request a document: [" + status + "]");  
> > > > String body = get.getResponseBodyAsString();  
> > > > log.info("resopnse body is: [" + body + "]");
> > > 
> > > After I run the code above, I got the exception below:
> > > 
> > > > the status of request a document: [500]  
> > > > resopnse body is: [{"error":"RemoteTransportException[Failed to  
> > > > deserialize response of type [org.elasticsearch.action.get.GetResponse]];  
> > > > nested: TransportSerializationException[Failed to deserialize response of  
> > > > type [org.elasticsearch.action.get.GetResponse]]; nested:  
> > > > IOException[Expected handle header, got [79]]; ","status":500}]
> > > 
> > > ES version: 0.19.4  
> > > All config of ES are default. I don't change anything.
> > > 
> > > Could anyone give me a hint or a reference, that would be very helpful~~
> > > 
> > > Thanks very much~
> > > 
> > > Yang
> > 
> > On Wednesday, June 6, 2012 1:24:17 AM UTC+8, Yang wrote:
> > 
> > > Dear all,
> > > 
> > > I'm playing with ES, but meet a problem, after I spent my whole day, I  
> > > couldn't get it done.  
> > > I just want to get the specific document by indexId, type and documentId  
> > > via the code below:  
> > > (all the classes come from org.apache.commons.httpclient)
> > > 
> > > String docURL = genDocumentURL(indexId, type, documentId);// just
> > > 
> > > > combine them as an url.  
> > > > HttpClient http = new HttpClient();  
> > > > GetMethod get = new GetMethod(docURL);  
> > > > int status = http.executeMethod(get);  
> > > > log.info("the status of request a document: [" + status + "]");  
> > > > String body = get.getResponseBodyAsString();  
> > > > log.info("resopnse body is: [" + body + "]");
> > > 
> > > After I run the code above, I got the exception below:
> > > 
> > > > the status of request a document: [500]  
> > > > resopnse body is: [{"error":"RemoteTransportException[Failed to  
> > > > deserialize response of type [org.elasticsearch.action.get.GetResponse]];  
> > > > nested: TransportSerializationException[Failed to deserialize response of  
> > > > type [org.elasticsearch.action.get.GetResponse]]; nested:  
> > > > IOException[Expected handle header, got [79]]; ","status":500}]
> > > 
> > > ES version: 0.19.4  
> > > All config of ES are default. I don't change anything.
> > > 
> > > Could anyone give me a hint or a reference, that would be very helpful~~
> > > 
> > > Thanks very much~
> > > 
> > > Yang
> > 
> > On Wednesday, June 6, 2012 1:24:17 AM UTC+8, Yang wrote:
> > 
> > > Dear all,
> > > 
> > > I'm playing with ES, but meet a problem, after I spent my whole day, I  
> > > couldn't get it done.  
> > > I just want to get the specific document by indexId, type and documentId  
> > > via the code below:  
> > > (all the classes come from org.apache.commons.httpclient)
> > > 
> > > String docURL = genDocumentURL(indexId, type, documentId);// just
> > > 
> > > > combine them as an url.  
> > > > HttpClient http = new HttpClient();  
> > > > GetMethod get = new GetMethod(docURL);  
> > > > int status = http.executeMethod(get);  
> > > > log.info("the status of request a document: [" + status + "]");  
> > > > String body = get.getResponseBodyAsString();  
> > > > log.info("resopnse body is: [" + body + "]");
> > > 
> > > After I run the code above, I got the exception below:
> > > 
> > > > the status of request a document: [500]  
> > > > resopnse body is: [{"error":"RemoteTransportException[Failed to  
> > > > deserialize response of type [org.elasticsearch.action.get.GetResponse]];  
> > > > nested: TransportSerializationException[Failed to deserialize response of  
> > > > type [org.elasticsearch.action.get.GetResponse]]; nested:  
> > > > IOException[Expected handle header, got [79]]; ","status":500}]
> > > 
> > > ES version: 0.19.4  
> > > All config of ES are default. I don't change anything.
> > > 
> > > Could anyone give me a hint or a reference, that would be very helpful~~
> > > 
> > > Thanks very much~
> > > 
> > > Yang
> > 
> > On Wednesday, June 6, 2012 1:24:17 AM UTC+8, Yang wrote:
> > 
> > > Dear all,
> > > 
> > > I'm playing with ES, but meet a problem, after I spent my whole day, I  
> > > couldn't get it done.  
> > > I just want to get the specific document by indexId, type and documentId  
> > > via the code below:  
> > > (all the classes come from org.apache.commons.httpclient)
> > > 
> > > String docURL = genDocumentURL(indexId, type, documentId);// just
> > > 
> > > > combine them as an url.  
> > > > HttpClient http = new HttpClient();  
> > > > GetMethod get = new GetMethod(docURL);  
> > > > int status = http.executeMethod(get);  
> > > > log.info("the status of request a document: [" + status + "]");  
> > > > String body = get.getResponseBodyAsString();  
> > > > log.info("resopnse body is: [" + body + "]");
> > > 
> > > After I run the code above, I got the exception below:
> > > 
> > > > the status of request a document: [500]  
> > > > resopnse body is: [{"error":"RemoteTransportException[Failed to  
> > > > deserialize response of type [org.elasticsearch.action.get.GetResponse]];  
> > > > nested: TransportSerializationException[Failed to deserialize response of  
> > > > type [org.elasticsearch.action.get.GetResponse]]; nested:  
> > > > IOException[Expected handle header, got [79]]; ","status":500}]
> > > 
> > > ES version: 0.19.4  
> > > All config of ES are default. I don't change anything.
> > > 
> > > Could anyone give me a hint or a reference, that would be very helpful~~
> > > 
> > > Thanks very much~
> > > 
> > > Yang
> > 
> > On Wednesday, June 6, 2012 1:24:17 AM UTC+8, Yang wrote:
> > 
> > > Dear all,
> > > 
> > > I'm playing with ES, but meet a problem, after I spent my whole day, I  
> > > couldn't get it done.  
> > > I just want to get the specific document by indexId, type and documentId  
> > > via the code below:  
> > > (all the classes come from org.apache.commons.httpclient)
> > > 
> > > String docURL = genDocumentURL(indexId, type, documentId);// just
> > > 
> > > > combine them as an url.  
> > > > HttpClient http = new HttpClient();  
> > > > GetMethod get = new GetMethod(docURL);  
> > > > int status = http.executeMethod(get);  
> > > > log.info("the status of request a document: [" + status + "]");  
> > > > String body = get.getResponseBodyAsString();  
> > > > log.info("resopnse body is: [" + body + "]");
> > > 
> > > After I run the code above, I got the exception below:
> > > 
> > > > the status of request a document: [500]  
> > > > resopnse body is: [{"error":"RemoteTransportException[Failed to  
> > > > deserialize response of type [org.elasticsearch.action.get.GetResponse]];  
> > > > nested: TransportSerializationException[Failed to deserialize response of  
> > > > type [org.elasticsearch.action.get.GetResponse]]; nested:  
> > > > IOException[Expected handle header, got [79]]; ","status":500}]
> > > 
> > > ES version: 0.19.4  
> > > All config of ES are default. I don't change anything.
> > > 
> > > Could anyone give me a hint or a reference, that would be very helpful~~
> > > 
> > > Thanks very much~
> > > 
> > > Yang
> > 
> > On Wednesday, June 6, 2012 1:24:17 AM UTC+8, Yang wrote:
> > 
> > > Dear all,
> > > 
> > > I'm playing with ES, but meet a problem, after I spent my whole day, I  
> > > couldn't get it done.  
> > > I just want to get the specific document by indexId, type and documentId  
> > > via the code below:  
> > > (all the classes come from org.apache.commons.httpclient)
> > > 
> > > String docURL = genDocumentURL(indexId, type, documentId);// just
> > > 
> > > > combine them as an url.  
> > > > HttpClient http = new HttpClient();  
> > > > GetMethod get = new GetMethod(docURL);  
> > > > int status = http.executeMethod(get);  
> > > > log.info("the status of request a document: [" + status + "]");  
> > > > String body = get.getResponseBodyAsString();  
> > > > log.info("resopnse body is: [" + body + "]");
> > > 
> > > After I run the code above, I got the exception below:
> > > 
> > > > the status of request a document: [500]  
> > > > resopnse body is: [{"error":"RemoteTransportException[Failed to  
> > > > deserialize response of type [org.elasticsearch.action.get.GetResponse]];  
> > > > nested: TransportSerializationException[Failed to deserialize response of  
> > > > type [org.elasticsearch.action.get.GetResponse]]; nested:  
> > > > IOException[Expected handle header, got [79]]; ","status":500}]
> > > 
> > > ES version: 0.19.4  
> > > All config of ES are default. I don't change anything.
> > > 
> > > Could anyone give me a hint or a reference, that would be very helpful~~
> > > 
> > > Thanks very much~
> > > 
> > > Yang
> > 
> > On Wednesday, June 6, 2012 1:24:17 AM UTC+8, Yang wrote:
> > 
> > > Dear all,
> > > 
> > > I'm playing with ES, but meet a problem, after I spent my whole day, I  
> > > couldn't get it done.  
> > > I just want to get the specific document by indexId, type and documentId  
> > > via the code below:  
> > > (all the classes come from org.apache.commons.httpclient)
> > > 
> > > String docURL = genDocumentURL(indexId, type, documentId);// just
> > > 
> > > > combine them as an url.  
> > > > HttpClient http = new HttpClient();  
> > > > GetMethod get = new GetMethod(docURL);  
> > > > int status = http.executeMethod(get);  
> > > > log.info("the status of request a document: [" + status + "]");  
> > > > String body = get.getResponseBodyAsString();  
> > > > log.info("resopnse body is: [" + body + "]");
> > > 
> > > After I run the code above, I got the exception below:
> > > 
> > > > the status of request a document: [500]  
> > > > resopnse body is: [{"error":"RemoteTransportException[Failed to  
> > > > deserialize response of type [org.elasticsearch.action.get.GetResponse]];  
> > > > nested: TransportSerializationException[Failed to deserialize response of  
> > > > type [org.elasticsearch.action.get.GetResponse]]; nested:  
> > > > IOException[Expected handle header, got [79]]; ","status":500}]
> > > 
> > > ES version: 0.19.4  
> > > All config of ES are default. I don't change anything.
> > > 
> > > Could anyone give me a hint or a reference, that would be very helpful~~
> > > 
> > > Thanks very much~
> > > 
> > > Yang
> > 
> > On Wednesday, June 6, 2012 1:24:17 AM UTC+8, Yang wrote:
> > 
> > > Dear all,
> > > 
> > > I'm playing with ES, but meet a problem, after I spent my whole day, I  
> > > couldn't get it done.  
> > > I just want to get the specific document by indexId, type and documentId  
> > > via the code below:  
> > > (all the classes come from org.apache.commons.httpclient)
> > > 
> > > String docURL = genDocumentURL(indexId, type, documentId);// just
> > > 
> > > > combine them as an url.  
> > > > HttpClient http = new HttpClient();  
> > > > GetMethod get = new GetMethod(docURL);  
> > > > int status = http.executeMethod(get);  
> > > > log.info("the status of request a document: [" + status + "]");  
> > > > String body = get.getResponseBodyAsString();  
> > > > log.info("resopnse body is: [" + body + "]");
> > > 
> > > After I run the code above, I got the exception below:
> > > 
> > > > the status of request a document: [500]  
> > > > resopnse body is: [{"error":"RemoteTransportException[Failed to  
> > > > deserialize response of type [org.elasticsearch.action.get.GetResponse]];  
> > > > nested: TransportSerializationException[Failed to deserialize response of  
> > > > type [org.elasticsearch.action.get.GetResponse]]; nested:  
> > > > IOException[Expected handle header, got [79]]; ","status":500}]
> > > 
> > > ES version: 0.19.4  
> > > All config of ES are default. I don't change anything.
> > > 
> > > Could anyone give me a hint or a reference, that would be very helpful~~
> > > 
> > > Thanks very much~
> > > 
> > > Yang

---

<div class="post-metadata">

**Author:** ![Igor\_Motov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_motov/32/45193_2.png) [@Igor\_Motov](https://discuss.elastic.co/u/Igor_Motov)\
**Post date:** [June 6, 2012, 11:08am UTC](https://discuss.elastic.co/t/get-an-exception-when-i-try-to-get-the-specific-document-in-es-with-indexid-type-and-documentid/7983/5 "2012-06-06T11:08:55Z")

</div>

I think you should start with figuring out how many nodes you are running  
and making sure that they all have the same version. Run

curl -XGET '[http://localhost:9200/\_cluster/health?pretty=true](http://localhost:9200/_cluster/health?pretty=true)'

and

curl -XGET '[http://localhost:9200/\_cluster/nodes?pretty=true](http://localhost:9200/_cluster/nodes?pretty=true)'

to check how many data nodes you actually have in your cluster.

On Wednesday, June 6, 2012 2:15:07 AM UTC-4, Yang wrote:

> Dear Motov,
> 
> Thanks for your replying.  
> I checked $es\_home$/logs, no other exception.  
> But what you said remind me.
> 
> Actually, I used the code below to get a client and do "index" and  
> "search" via java API:
> 
> NodeBuilder nb = NodeBuilder.nodeBuilder();
> 
> node = nb.client(true).node();
> 
> esClient = node.client();
> 
> Then I try to get a specific document via java API, but I meet the problem  
> which is the same as I talked before.  
> So I change the code to "rest", it works.  
> But these days, it fails again, I don't even change anything.
> 
> On Wednesday, June 6, 2012 9:36:30 AM UTC+8, Igor Motov wrote:
> 
> > It looks like you have more than one es node and they have problems  
> > communicating to each other. Do you see any errors in the log files?
> > 
> > On Tuesday, June 5, 2012 8:46:47 PM UTC-4, Yang wrote:
> > 
> > > Could anybody give me a hand?
> > > 
> > > On Wednesday, June 6, 2012 1:24:17 AM UTC+8, Yang wrote:
> > > 
> > > > Dear all,
> > > > 
> > > > I'm playing with ES, but meet a problem, after I spent my whole day, I  
> > > > couldn't get it done.  
> > > > I just want to get the specific document by indexId, type and  
> > > > documentId via the code below:  
> > > > (all the classes come from org.apache.commons.httpclient)
> > > > 
> > > > String docURL = genDocumentURL(indexId, type, documentId);// just
> > > > 
> > > > > combine them as an url.  
> > > > > HttpClient http = new HttpClient();  
> > > > > GetMethod get = new GetMethod(docURL);  
> > > > > int status = http.executeMethod(get);  
> > > > > log.info("the status of request a document: [" + status + "]");  
> > > > > String body = get.getResponseBodyAsString();  
> > > > > log.info("resopnse body is: [" + body + "]");
> > > > 
> > > > After I run the code above, I got the exception below:
> > > > 
> > > > > the status of request a document: [500]  
> > > > > resopnse body is: [{"error":"RemoteTransportException[Failed to  
> > > > > deserialize response of type [org.elasticsearch.action.get.GetResponse]];  
> > > > > nested: TransportSerializationException[Failed to deserialize response of  
> > > > > type [org.elasticsearch.action.get.GetResponse]]; nested:  
> > > > > IOException[Expected handle header, got [79]]; ","status":500}]
> > > > 
> > > > ES version: 0.19.4  
> > > > All config of ES are default. I don't change anything.
> > > > 
> > > > Could anyone give me a hint or a reference, that would be very helpful~~
> > > > 
> > > > Thanks very much~
> > > > 
> > > > Yang
> > > 
> > > On Wednesday, June 6, 2012 1:24:17 AM UTC+8, Yang wrote:
> > > 
> > > > Dear all,
> > > > 
> > > > I'm playing with ES, but meet a problem, after I spent my whole day, I  
> > > > couldn't get it done.  
> > > > I just want to get the specific document by indexId, type and  
> > > > documentId via the code below:  
> > > > (all the classes come from org.apache.commons.httpclient)
> > > > 
> > > > String docURL = genDocumentURL(indexId, type, documentId);// just
> > > > 
> > > > > combine them as an url.  
> > > > > HttpClient http = new HttpClient();  
> > > > > GetMethod get = new GetMethod(docURL);  
> > > > > int status = http.executeMethod(get);  
> > > > > log.info("the status of request a document: [" + status + "]");  
> > > > > String body = get.getResponseBodyAsString();  
> > > > > log.info("resopnse body is: [" + body + "]");
> > > > 
> > > > After I run the code above, I got the exception below:
> > > > 
> > > > > the status of request a document: [500]  
> > > > > resopnse body is: [{"error":"RemoteTransportException[Failed to  
> > > > > deserialize response of type [org.elasticsearch.action.get.GetResponse]];  
> > > > > nested: TransportSerializationException[Failed to deserialize response of  
> > > > > type [org.elasticsearch.action.get.GetResponse]]; nested:  
> > > > > IOException[Expected handle header, got [79]]; ","status":500}]
> > > > 
> > > > ES version: 0.19.4  
> > > > All config of ES are default. I don't change anything.
> > > > 
> > > > Could anyone give me a hint or a reference, that would be very helpful~~
> > > > 
> > > > Thanks very much~
> > > > 
> > > > Yang
> > > 
> > > On Wednesday, June 6, 2012 1:24:17 AM UTC+8, Yang wrote:
> > > 
> > > > Dear all,
> > > > 
> > > > I'm playing with ES, but meet a problem, after I spent my whole day, I  
> > > > couldn't get it done.  
> > > > I just want to get the specific document by indexId, type and  
> > > > documentId via the code below:  
> > > > (all the classes come from org.apache.commons.httpclient)
> > > > 
> > > > String docURL = genDocumentURL(indexId, type, documentId);// just
> > > > 
> > > > > combine them as an url.  
> > > > > HttpClient http = new HttpClient();  
> > > > > GetMethod get = new GetMethod(docURL);  
> > > > > int status = http.executeMethod(get);  
> > > > > log.info("the status of request a document: [" + status + "]");  
> > > > > String body = get.getResponseBodyAsString();  
> > > > > log.info("resopnse body is: [" + body + "]");
> > > > 
> > > > After I run the code above, I got the exception below:
> > > > 
> > > > > the status of request a document: [500]  
> > > > > resopnse body is: [{"error":"RemoteTransportException[Failed to  
> > > > > deserialize response of type [org.elasticsearch.action.get.GetResponse]];  
> > > > > nested: TransportSerializationException[Failed to deserialize response of  
> > > > > type [org.elasticsearch.action.get.GetResponse]]; nested:  
> > > > > IOException[Expected handle header, got [79]]; ","status":500}]
> > > > 
> > > > ES version: 0.19.4  
> > > > All config of ES are default. I don't change anything.
> > > > 
> > > > Could anyone give me a hint or a reference, that would be very helpful~~
> > > > 
> > > > Thanks very much~
> > > > 
> > > > Yang
> > > 
> > > On Wednesday, June 6, 2012 1:24:17 AM UTC+8, Yang wrote:
> > > 
> > > > Dear all,
> > > > 
> > > > I'm playing with ES, but meet a problem, after I spent my whole day, I  
> > > > couldn't get it done.  
> > > > I just want to get the specific document by indexId, type and  
> > > > documentId via the code below:  
> > > > (all the classes come from org.apache.commons.httpclient)
> > > > 
> > > > String docURL = genDocumentURL(indexId, type, documentId);// just
> > > > 
> > > > > combine them as an url.  
> > > > > HttpClient http = new HttpClient();  
> > > > > GetMethod get = new GetMethod(docURL);  
> > > > > int status = http.executeMethod(get);  
> > > > > log.info("the status of request a document: [" + status + "]");  
> > > > > String body = get.getResponseBodyAsString();  
> > > > > log.info("resopnse body is: [" + body + "]");
> > > > 
> > > > After I run the code above, I got the exception below:
> > > > 
> > > > > the status of request a document: [500]  
> > > > > resopnse body is: [{"error":"RemoteTransportException[Failed to  
> > > > > deserialize response of type [org.elasticsearch.action.get.GetResponse]];  
> > > > > nested: TransportSerializationException[Failed to deserialize response of  
> > > > > type [org.elasticsearch.action.get.GetResponse]]; nested:  
> > > > > IOException[Expected handle header, got [79]]; ","status":500}]
> > > > 
> > > > ES version: 0.19.4  
> > > > All config of ES are default. I don't change anything.
> > > > 
> > > > Could anyone give me a hint or a reference, that would be very helpful~~
> > > > 
> > > > Thanks very much~
> > > > 
> > > > Yang
> > > 
> > > On Wednesday, June 6, 2012 1:24:17 AM UTC+8, Yang wrote:
> > > 
> > > > Dear all,
> > > > 
> > > > I'm playing with ES, but meet a problem, after I spent my whole day, I  
> > > > couldn't get it done.  
> > > > I just want to get the specific document by indexId, type and  
> > > > documentId via the code below:  
> > > > (all the classes come from org.apache.commons.httpclient)
> > > > 
> > > > String docURL = genDocumentURL(indexId, type, documentId);// just
> > > > 
> > > > > combine them as an url.  
> > > > > HttpClient http = new HttpClient();  
> > > > > GetMethod get = new GetMethod(docURL);  
> > > > > int status = http.executeMethod(get);  
> > > > > log.info("the status of request a document: [" + status + "]");  
> > > > > String body = get.getResponseBodyAsString();  
> > > > > log.info("resopnse body is: [" + body + "]");
> > > > 
> > > > After I run the code above, I got the exception below:
> > > > 
> > > > > the status of request a document: [500]  
> > > > > resopnse body is: [{"error":"RemoteTransportException[Failed to  
> > > > > deserialize response of type [org.elasticsearch.action.get.GetResponse]];  
> > > > > nested: TransportSerializationException[Failed to deserialize response of  
> > > > > type [org.elasticsearch.action.get.GetResponse]]; nested:  
> > > > > IOException[Expected handle header, got [79]]; ","status":500}]
> > > > 
> > > > ES version: 0.19.4  
> > > > All config of ES are default. I don't change anything.
> > > > 
> > > > Could anyone give me a hint or a reference, that would be very helpful~~
> > > > 
> > > > Thanks very much~
> > > > 
> > > > Yang
> > > 
> > > On Wednesday, June 6, 2012 1:24:17 AM UTC+8, Yang wrote:
> > > 
> > > > Dear all,
> > > > 
> > > > I'm playing with ES, but meet a problem, after I spent my whole day, I  
> > > > couldn't get it done.  
> > > > I just want to get the specific document by indexId, type and  
> > > > documentId via the code below:  
> > > > (all the classes come from org.apache.commons.httpclient)
> > > > 
> > > > String docURL = genDocumentURL(indexId, type, documentId);// just
> > > > 
> > > > > combine them as an url.  
> > > > > HttpClient http = new HttpClient();  
> > > > > GetMethod get = new GetMethod(docURL);  
> > > > > int status = http.executeMethod(get);  
> > > > > log.info("the status of request a document: [" + status + "]");  
> > > > > String body = get.getResponseBodyAsString();  
> > > > > log.info("resopnse body is: [" + body + "]");
> > > > 
> > > > After I run the code above, I got the exception below:
> > > > 
> > > > > the status of request a document: [500]  
> > > > > resopnse body is: [{"error":"RemoteTransportException[Failed to  
> > > > > deserialize response of type [org.elasticsearch.action.get.GetResponse]];  
> > > > > nested: TransportSerializationException[Failed to deserialize response of  
> > > > > type [org.elasticsearch.action.get.GetResponse]]; nested:  
> > > > > IOException[Expected handle header, got [79]]; ","status":500}]
> > > > 
> > > > ES version: 0.19.4  
> > > > All config of ES are default. I don't change anything.
> > > > 
> > > > Could anyone give me a hint or a reference, that would be very helpful~~
> > > > 
> > > > Thanks very much~
> > > > 
> > > > Yang
> > > 
> > > On Wednesday, June 6, 2012 1:24:17 AM UTC+8, Yang wrote:
> > > 
> > > > Dear all,
> > > > 
> > > > I'm playing with ES, but meet a problem, after I spent my whole day, I  
> > > > couldn't get it done.  
> > > > I just want to get the specific document by indexId, type and  
> > > > documentId via the code below:  
> > > > (all the classes come from org.apache.commons.httpclient)
> > > > 
> > > > String docURL = genDocumentURL(indexId, type, documentId);// just
> > > > 
> > > > > combine them as an url.  
> > > > > HttpClient http = new HttpClient();  
> > > > > GetMethod get = new GetMethod(docURL);  
> > > > > int status = http.executeMethod(get);  
> > > > > log.info("the status of request a document: [" + status + "]");  
> > > > > String body = get.getResponseBodyAsString();  
> > > > > log.info("resopnse body is: [" + body + "]");
> > > > 
> > > > After I run the code above, I got the exception below:
> > > > 
> > > > > the status of request a document: [500]  
> > > > > resopnse body is: [{"error":"RemoteTransportException[Failed to  
> > > > > deserialize response of type [org.elasticsearch.action.get.GetResponse]];  
> > > > > nested: TransportSerializationException[Failed to deserialize response of  
> > > > > type [org.elasticsearch.action.get.GetResponse]]; nested:  
> > > > > IOException[Expected handle header, got [79]]; ","status":500}]
> > > > 
> > > > ES version: 0.19.4  
> > > > All config of ES are default. I don't change anything.
> > > > 
> > > > Could anyone give me a hint or a reference, that would be very helpful~~
> > > > 
> > > > Thanks very much~
> > > > 
> > > > Yang
> > > 
> > > On Wednesday, June 6, 2012 1:24:17 AM UTC+8, Yang wrote:
> > > 
> > > > Dear all,
> > > > 
> > > > I'm playing with ES, but meet a problem, after I spent my whole day, I  
> > > > couldn't get it done.  
> > > > I just want to get the specific document by indexId, type and  
> > > > documentId via the code below:  
> > > > (all the classes come from org.apache.commons.httpclient)
> > > > 
> > > > String docURL = genDocumentURL(indexId, type, documentId);// just
> > > > 
> > > > > combine them as an url.  
> > > > > HttpClient http = new HttpClient();  
> > > > > GetMethod get = new GetMethod(docURL);  
> > > > > int status = http.executeMethod(get);  
> > > > > log.info("the status of request a document: [" + status + "]");  
> > > > > String body = get.getResponseBodyAsString();  
> > > > > log.info("resopnse body is: [" + body + "]");
> > > > 
> > > > After I run the code above, I got the exception below:
> > > > 
> > > > > the status of request a document: [500]  
> > > > > resopnse body is: [{"error":"RemoteTransportException[Failed to  
> > > > > deserialize response of type [org.elasticsearch.action.get.GetResponse]];  
> > > > > nested: TransportSerializationException[Failed to deserialize response of  
> > > > > type [org.elasticsearch.action.get.GetResponse]]; nested:  
> > > > > IOException[Expected handle header, got [79]]; ","status":500}]
> > > > 
> > > > ES version: 0.19.4  
> > > > All config of ES are default. I don't change anything.
> > > > 
> > > > Could anyone give me a hint or a reference, that would be very helpful~~
> > > > 
> > > > Thanks very much~
> > > > 
> > > > Yang
> > > 
> > > On Wednesday, June 6, 2012 1:24:17 AM UTC+8, Yang wrote:
> > > 
> > > > Dear all,
> > > > 
> > > > I'm playing with ES, but meet a problem, after I spent my whole day, I  
> > > > couldn't get it done.  
> > > > I just want to get the specific document by indexId, type and  
> > > > documentId via the code below:  
> > > > (all the classes come from org.apache.commons.httpclient)
> > > > 
> > > > String docURL = genDocumentURL(indexId, type, documentId);// just
> > > > 
> > > > > combine them as an url.  
> > > > > HttpClient http = new HttpClient();  
> > > > > GetMethod get = new GetMethod(docURL);  
> > > > > int status = http.executeMethod(get);  
> > > > > log.info("the status of request a document: [" + status + "]");  
> > > > > String body = get.getResponseBodyAsString();  
> > > > > log.info("resopnse body is: [" + body + "]");
> > > > 
> > > > After I run the code above, I got the exception below:
> > > > 
> > > > > the status of request a document: [500]  
> > > > > resopnse body is: [{"error":"RemoteTransportException[Failed to  
> > > > > deserialize response of type [org.elasticsearch.action.get.GetResponse]];  
> > > > > nested: TransportSerializationException[Failed to deserialize response of  
> > > > > type [org.elasticsearch.action.get.GetResponse]]; nested:  
> > > > > IOException[Expected handle header, got [79]]; ","status":500}]
> > > > 
> > > > ES version: 0.19.4  
> > > > All config of ES are default. I don't change anything.
> > > > 
> > > > Could anyone give me a hint or a reference, that would be very helpful~~
> > > > 
> > > > Thanks very much~
> > > > 
> > > > Yang

---

<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, 3:25am UTC](https://discuss.elastic.co/t/get-an-exception-when-i-try-to-get-the-specific-document-in-es-with-indexid-type-and-documentid/7983/6 "2017-07-06T03:25:28Z")

</div>


