# Unable to load pie charts with sub-buckets aggregation after migrating to es/kibana 5.4.0

**URL:** https://discuss.elastic.co/t/unable-to-load-pie-charts-with-sub-buckets-aggregation-after-migrating-to-es-kibana-5-4-0/85407
**Category:** Kibana
**Created:** [May 11, 2017, 1:24pm UTC](https://discuss.elastic.co/t/unable-to-load-pie-charts-with-sub-buckets-aggregation-after-migrating-to-es-kibana-5-4-0/85407 "2017-05-11T13:24:43Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![maniel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/maniel/32/5380_2.png) [@maniel](https://discuss.elastic.co/u/maniel)
#### Post date: [May 11, 2017, 1:24pm UTC](https://discuss.elastic.co/t/unable-to-load-pie-charts-with-sub-buckets-aggregation-after-migrating-to-es-kibana-5-4-0/85407/1 "2017-05-11T13:24:44Z")

</div>

Hi  
Today i migrated my stack to elasticsearch and kibana to 5.4.0, from elasticsearch 2.4.0 and kibana 4.5, now every time i try to create a pie chart with sub-buckets i get the following error:

> Error: Request to Elasticsearch failed: {"error":{"root\_cause":[{"type":"null\_pointer\_exception","reason":null}],"type":"search\_phase\_execution\_exception","reason":"all shards failed","phase":"query","grouped":true,"failed\_shards":[{"shard":0,"index":"graylog\_240","node":"BZsKa72CQim7i76BsbaGsg","reason":{"type":"null\_pointer\_exception","reason":null}}]},"status":500}  
> at [http://192.168.0.135:5601/bundles/kibana.bundle.js?v=15063:28:9088](http://192.168.0.135:5601/bundles/kibana.bundle.js?v=15063:28:9088)  
> at Function.Promise.try ([http://192.168.0.135:5601/bundles/commons.bundle.js?v=15063:82:22203](http://192.168.0.135:5601/bundles/commons.bundle.js?v=15063:82:22203))  
> at [http://192.168.0.135:5601/bundles/commons.bundle.js?v=15063:82:21573](http://192.168.0.135:5601/bundles/commons.bundle.js?v=15063:82:21573)  
> at Array.map (native)  
> at Function.Promise.map ([http://192.168.0.135:5601/bundles/commons.bundle.js?v=15063:82:21528](http://192.168.0.135:5601/bundles/commons.bundle.js?v=15063:82:21528))  
> at callResponseHandlers ([http://192.168.0.135:5601/bundles/kibana.bundle.js?v=15063:28:8704](http://192.168.0.135:5601/bundles/kibana.bundle.js?v=15063:28:8704))  
> at [http://192.168.0.135:5601/bundles/kibana.bundle.js?v=15063:27:28290](http://192.168.0.135:5601/bundles/kibana.bundle.js?v=15063:27:28290)  
> at processQueue ([http://192.168.0.135:5601/bundles/commons.bundle.js?v=15063:38:23621](http://192.168.0.135:5601/bundles/commons.bundle.js?v=15063:38:23621))  
> at [http://192.168.0.135:5601/bundles/commons.bundle.js?v=15063:38:23888](http://192.168.0.135:5601/bundles/commons.bundle.js?v=15063:38:23888)  
> at Scope.$eval ([http://192.168.0.135:5601/bundles/commons.bundle.js?v=15063:39:4619](http://192.168.0.135:5601/bundles/commons.bundle.js?v=15063:39:4619))

is it common problem? i mean it doesn't look like a user error to me, right? also i have the following message in my es logs:

> [2017-05-11T13:19:29,075][WARN][o.e.d.r.a.RestFieldStatsAction] [\_field\_stats] endpoint is deprecated! Use [\_field\_caps] instead or run a min/max aggregations on the desired fields.

**EDIT:**  
i just noticed that problem only occurs when i aggregate by scripted `xfer` field which looks like this:

> doc['sent'].value+doc['rcvd'].value

what i've done wrong?🙂

---

<div class="post-metadata">

### Author: ![lukas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukas/32/6812_2.png) [@lukas](https://discuss.elastic.co/u/lukas)
#### Post date: [May 11, 2017, 4:01pm UTC](https://discuss.elastic.co/t/unable-to-load-pie-charts-with-sub-buckets-aggregation-after-migrating-to-es-kibana-5-4-0/85407/2 "2017-05-11T16:01:30Z")

</div>

Hmm, I'm not exactly sure what's happening, but could you go into your index pattern and try clicking on the "refresh field list" button and see if that helps?

---

<div class="post-metadata">

### Author: ![maniel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/maniel/32/5380_2.png) [@maniel](https://discuss.elastic.co/u/maniel)
#### Post date: [May 12, 2017, 6:13am UTC](https://discuss.elastic.co/t/unable-to-load-pie-charts-with-sub-buckets-aggregation-after-migrating-to-es-kibana-5-4-0/85407/3 "2017-05-12T06:13:19Z")

</div>

it didn't help, but there is the same message in es logs:

> [2017-05-12T06:09:21,486][WARN][o.e.d.r.a.RestFieldStatsAction] [\_field\_stats] endpoint is deprecated! Use [\_field\_caps] instead or run a min/max aggregations on the desired fields.

when refreshing field list

**EDIT:**  
everything works fine after i changed a scripted field type to `painless` instead of `expression`

---

<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: [June 9, 2017, 6:20am UTC](https://discuss.elastic.co/t/unable-to-load-pie-charts-with-sub-buckets-aggregation-after-migrating-to-es-kibana-5-4-0/85407/4 "2017-06-09T06:20:33Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
