# Such query 'curl localhost:9200/\_stats' returns an 500 error

**URL:** <https://discuss.elastic.co/t/such-query-curl-localhost-9200--stats-returns-an-500-error/2300>\
**Category:** Elasticsearch\
**Created:** [June 10, 2015, 11:13am UTC](https://discuss.elastic.co/t/such-query-curl-localhost-9200--stats-returns-an-500-error/2300 "2015-06-10T11:13:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rafal\_n](https://avatars.discourse-cdn.com/v4/letter/r/b19c9b/32.png) [@rafal\_n](https://discuss.elastic.co/u/rafal_n)\
**Post date:** [June 10, 2015, 11:13am UTC](https://discuss.elastic.co/t/such-query-curl-localhost-9200--stats-returns-an-500-error/2300/1 "2015-06-10T11:13:31Z")

</div>

Hi,  
I have a question regarding statistics which can be shown using such query: 'curl localhost:9200/\_stats'  
It should return high level aggregation and index level stats for all indices. In my case it returns an error:  
{"error":"NullPointerException[null]","status":500}

Worth of mention is that all specific stats are working properly e.g. curl [http://localhost:9200/\_stats/indices](http://localhost:9200/_stats/indices) shows proper data.  
There is only problem with all statistics.I am using 1.5.1 version.

Thanks,  
Rafal

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [June 10, 2015, 10:34pm UTC](https://discuss.elastic.co/t/such-query-curl-localhost-9200--stats-returns-an-500-error/2300/2 "2015-06-10T22:34:01Z")

</div>

That's very unusual, is there anything in your logs at the time of the request?

---

<div class="post-metadata">

**Author:** ![rafal\_n](https://avatars.discourse-cdn.com/v4/letter/r/b19c9b/32.png) [@rafal\_n](https://discuss.elastic.co/u/rafal_n)\
**Post date:** [June 12, 2015, 11:38am UTC](https://discuss.elastic.co/t/such-query-curl-localhost-9200--stats-returns-an-500-error/2300/3 "2015-06-12T11:38:31Z")

</div>

Unfortunatelly there is nothing in the log which could lead me to something... I hoped that someone saw such error before.

---

<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, 12:07am UTC](https://discuss.elastic.co/t/such-query-curl-localhost-9200--stats-returns-an-500-error/2300/4 "2017-07-06T00:07:53Z")

</div>


