# Elasticsearch returning blank response

**URL:** <https://discuss.elastic.co/t/elasticsearch-returning-blank-response/16105>\
**Category:** Elasticsearch\
**Created:** [March 3, 2014, 1:44pm UTC](https://discuss.elastic.co/t/elasticsearch-returning-blank-response/16105 "2014-03-03T13:44:54Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tom\_Pryor](https://avatars.discourse-cdn.com/v4/letter/t/96bed5/32.png) [@Tom\_Pryor](https://discuss.elastic.co/u/Tom_Pryor)\
**Post date:** [March 3, 2014, 1:44pm UTC](https://discuss.elastic.co/t/elasticsearch-returning-blank-response/16105/1 "2014-03-03T13:44:54Z")

</div>

Hi,

Having a strange issue when trying to get a document by id, i.e GET  
to [http://localhost:9200/index/type/](http://localhost:9200/index/type/)

Sometimes Elasticsearch returns a HTTP 200 but a totally empty response.  
The other strange thing is that the content-type of the response  
is text/plain; charset=UTF-8 rather than the expected JSON.

This is causing major problems because when it occurs when I'm trying to  
update a document my client library thinks there is no data for the  
document and just indexes the document with purely the updated data,  
causing data loss.

Anyone got any ideas?

Thanks.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/98d31ba6-c7fb-4151-ac6f-1f273338aa5b%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/98d31ba6-c7fb-4151-ac6f-1f273338aa5b%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [March 3, 2014, 2:02pm UTC](https://discuss.elastic.co/t/elasticsearch-returning-blank-response/16105/2 "2014-03-03T14:02:31Z")

</div>

Did you disable \_source?

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet | @elasticsearchfr

Le 3 mars 2014 à 14:44:58, Tom Pryor ([tomwpryor@gmail.com](mailto:tomwpryor@gmail.com)) a écrit:

Hi,

Having a strange issue when trying to get a document by id, i.e GET to [http://localhost:9200/index/type/](http://localhost:9200/index/type/)

Sometimes Elasticsearch returns a HTTP 200 but a totally empty response. The other strange thing is that the content-type of the response is text/plain; charset=UTF-8 rather than the expected JSON.

This is causing major problems because when it occurs when I'm trying to update a document my client library thinks there is no data for the document and just indexes the document with purely the updated data, causing data loss.

Anyone got any ideas?

## Thanks.

You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/98d31ba6-c7fb-4151-ac6f-1f273338aa5b%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/98d31ba6-c7fb-4151-ac6f-1f273338aa5b%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/etPan.53148b77.1190cde7.50c7%40MacBook-Air-de-David.local](https://groups.google.com/d/msgid/elasticsearch/etPan.53148b77.1190cde7.50c7%40MacBook-Air-de-David.local).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Tom\_Pryor](https://avatars.discourse-cdn.com/v4/letter/t/96bed5/32.png) [@Tom\_Pryor](https://discuss.elastic.co/u/Tom_Pryor)\
**Post date:** [March 3, 2014, 2:14pm UTC](https://discuss.elastic.co/t/elasticsearch-returning-blank-response/16105/3 "2014-03-03T14:14:16Z")

</div>

\_source is enabled, if I fetch other documents, or fetch one of the  
documents after update & data loss, the \_source is present.

The response I'm occasionally seeing is completely blank (no json or  
anything), just an empty string.

On Monday, March 3, 2014 2:02:31 PM UTC, David Pilato wrote:

> Did you disable \_source?
> 
> --  
> _David Pilato_ | _Technical Advocate_ | _[Elasticsearch.com](http://Elasticsearch.com)_  
> @dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr[https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr)
> 
> Le 3 mars 2014 à 14:44:58, Tom Pryor ([tomw...@gmail.com](mailto:tomw...@gmail.com) \<javascript:\>) a  
> écrit:
> 
> Hi,
> 
> Having a strange issue when trying to get a document by id, i.e GET to  
> [http://localhost:9200/index/type/](http://localhost:9200/index/type/)
> 
> Sometimes Elasticsearch returns a HTTP 200 but a totally empty response.  
> The other strange thing is that the content-type of the response  
> is text/plain; charset=UTF-8 rather than the expected JSON.
> 
> This is causing major problems because when it occurs when I'm trying to  
> update a document my client library thinks there is no data for the  
> document and just indexes the document with purely the updated data,  
> causing data loss.
> 
> Anyone got any ideas?
> 
> ## Thanks.
> 
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/98d31ba6-c7fb-4151-ac6f-1f273338aa5b%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/98d31ba6-c7fb-4151-ac6f-1f273338aa5b%40googlegroups.com)  
> .  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/ae6ec54c-9fc4-4a2e-b171-91586cf73cb7%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/ae6ec54c-9fc4-4a2e-b171-91586cf73cb7%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [March 3, 2014, 2:15pm UTC](https://discuss.elastic.co/t/elasticsearch-returning-blank-response/16105/4 "2014-03-03T14:15:43Z")

</div>

Weird.

Can you reproduce it on a clean index?

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet | @elasticsearchfr

Le 3 mars 2014 à 15:14:19, Tom Pryor ([tomwpryor@gmail.com](mailto:tomwpryor@gmail.com)) a écrit:

\_source is enabled, if I fetch other documents, or fetch one of the documents after update & data loss, the \_source is present.

The response I'm occasionally seeing is completely blank (no json or anything), just an empty string.

On Monday, March 3, 2014 2:02:31 PM UTC, David Pilato wrote:  
Did you disable \_source?

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet | @elasticsearchfr

Le 3 mars 2014 à 14:44:58, Tom Pryor ([tomw...@gmail.com](mailto:tomw...@gmail.com)) a écrit:

Hi,

Having a strange issue when trying to get a document by id, i.e GET to [http://localhost:9200/index/type/](http://localhost:9200/index/type/)

Sometimes Elasticsearch returns a HTTP 200 but a totally empty response. The other strange thing is that the content-type of the response is text/plain; charset=UTF-8 rather than the expected JSON.

This is causing major problems because when it occurs when I'm trying to update a document my client library thinks there is no data for the document and just indexes the document with purely the updated data, causing data loss.

Anyone got any ideas?

## Thanks.

## You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com). To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/98d31ba6-c7fb-4151-ac6f-1f273338aa5b%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/98d31ba6-c7fb-4151-ac6f-1f273338aa5b%40googlegroups.com). For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/ae6ec54c-9fc4-4a2e-b171-91586cf73cb7%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/ae6ec54c-9fc4-4a2e-b171-91586cf73cb7%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/etPan.53148e90.109cf92e.50c7%40MacBook-Air-de-David.local](https://groups.google.com/d/msgid/elasticsearch/etPan.53148e90.109cf92e.50c7%40MacBook-Air-de-David.local).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Tom\_Pryor](https://avatars.discourse-cdn.com/v4/letter/t/96bed5/32.png) [@Tom\_Pryor](https://discuss.elastic.co/u/Tom_Pryor)\
**Post date:** [March 3, 2014, 4:27pm UTC](https://discuss.elastic.co/t/elasticsearch-returning-blank-response/16105/5 "2014-03-03T16:27:30Z")

</div>

Not tried it on a clean index but found a way around the problem. If I tell  
my client library to not use persistent (i.e keep alive) connections then  
this issue goes away.

On Monday, March 3, 2014 2:15:43 PM UTC, David Pilato wrote:

> Weird.
> 
> Can you reproduce it on a clean index?
> 
> --  
> _David Pilato_ | _Technical Advocate_ | _[Elasticsearch.com](http://Elasticsearch.com)_  
> @dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr[https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr)
> 
> Le 3 mars 2014 à 15:14:19, Tom Pryor ([tomw...@gmail.com](mailto:tomw...@gmail.com) \<javascript:\>) a  
> écrit:
> 
> \_source is enabled, if I fetch other documents, or fetch one of the  
> documents after update & data loss, the \_source is present.
> 
> The response I'm occasionally seeing is completely blank (no json or  
> anything), just an empty string.
> 
> On Monday, March 3, 2014 2:02:31 PM UTC, David Pilato wrote:
> 
> > Did you disable \_source?
> > 
> > ```
> > -- 
> > 
> > ```
> > 
> > _David Pilato_ | _Technical Advocate_ | _[Elasticsearch.com](http://Elasticsearch.com)_  
> > @dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr[https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr)
> > 
> > Le 3 mars 2014 à 14:44:58, Tom Pryor ([tomw...@gmail.com](mailto:tomw...@gmail.com)) a écrit:
> > 
> > Hi,
> > 
> > Having a strange issue when trying to get a document by id, i.e GET to  
> > [http://localhost:9200/index/type/](http://localhost:9200/index/type/)
> > 
> > Sometimes Elasticsearch returns a HTTP 200 but a totally empty response.  
> > The other strange thing is that the content-type of the response  
> > is text/plain; charset=UTF-8 rather than the expected JSON.
> > 
> > This is causing major problems because when it occurs when I'm trying to  
> > update a document my client library thinks there is no data for the  
> > document and just indexes the document with purely the updated data,  
> > causing data loss.
> > 
> > Anyone got any ideas?
> > 
> > ## Thanks.
> > 
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/98d31ba6-c7fb-4151-ac6f-1f273338aa5b%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/98d31ba6-c7fb-4151-ac6f-1f273338aa5b%40googlegroups.com)  
> > .  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/ae6ec54c-9fc4-4a2e-b171-91586cf73cb7%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/ae6ec54c-9fc4-4a2e-b171-91586cf73cb7%40googlegroups.com)  
> > .  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/74493cd0-b282-4d9f-bb0e-8d223ef61416%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/74493cd0-b282-4d9f-bb0e-8d223ef61416%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 1:46am UTC](https://discuss.elastic.co/t/elasticsearch-returning-blank-response/16105/6 "2017-07-06T01:46:10Z")

</div>


