# Percentile Query throwing Exception in ElasticSearch

**URL:** <https://discuss.elastic.co/t/percentile-query-throwing-exception-in-elasticsearch/77333>\
**Category:** Elasticsearch\
**Created:** [March 3, 2017, 3:49pm UTC](https://discuss.elastic.co/t/percentile-query-throwing-exception-in-elasticsearch/77333 "2017-03-03T15:49:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vignesh\_Chandrasekar](https://avatars.discourse-cdn.com/v4/letter/v/e9bcb4/32.png) [@Vignesh\_Chandrasekar](https://discuss.elastic.co/u/Vignesh_Chandrasekar)\
**Post date:** [March 3, 2017, 3:49pm UTC](https://discuss.elastic.co/t/percentile-query-throwing-exception-in-elasticsearch/77333/1 "2017-03-03T15:49:11Z")

</div>

Hi,  
I use ElasticSearch v5.1.1. When I try to run a percentile aggregation query using Kibana, ES throws an exception and restarts. I am running Kibana version 5.1.2

```
java.lang.NoSuchMethodError: org.elasticsearch.search.aggregations.metrics.percentiles.tdigest.TDigestState.centroidCount()I
	at org.elasticsearch.search.aggregations.metrics.percentiles.tdigest.TDigestState.write(TDigestState.java:47) ~[elasticsearch-5.1.1.jar:5.1.1]
	at org.elasticsearch.search.aggregations.metrics.percentiles.tdigest.AbstractInternalTDigestPercentiles.doWriteTo(AbstractInternalTDigestPercentiles.java:65) ~[elasticsearch-5.1.1.jar:5.1.1]
	at org.elasticsearch.search.aggregations.InternalAggregation.writeTo(InternalAggregation.java:117) ~[elasticsearch-5.1.1.jar:5.1.1]
	at org.elasticsearch.common.io.stream.StreamOutput.writeNamedWriteable(StreamOutput.java:831) ~[elasticsearch-5.1.1.jar:5.1.1]
	at org.elasticsearch.common.io.stream.StreamOutput.writeNamedWriteableList(StreamOutput.java:909) ~[elasticsearch-5.1.1.jar:5.1.1]
	at org.elasticsearch.search.aggregations.InternalAggregations.writeTo(InternalAggregations.java:208) ~[elasticsearch-5.1.1.jar:5.1.1]
	at org.elasticsearch.search.aggregations.bucket.histogram.InternalDateHistogram$Bucket.writeTo(InternalDateHistogram.java:85) ~[elasticsearch-5.1.1.jar:5.1.1]
	at org.elasticsearch.common.io.stream.StreamOutput.writeList(StreamOutput.java:889) ~[elasticsearch-5.1.1.jar:5.1.1]
	at org.elasticsearch.search.aggregations.bucket.histogram.InternalDateHistogram.doWriteTo(InternalDateHistogram.java:227) ~[elasticsearch-5.1.1.jar:5.1.1]
	at org.elasticsearch.search.aggregations.InternalAggregation.writeTo(InternalAggregation.java:117) ~[elasticsearch-5.1.1.jar:5.1.1]
	at org.elasticsearch.common.io.stream.StreamOutput.writeNamedWriteable(StreamOutput.java:831) ~[elasticsearch-5.1.1.jar:5.1.1]
	at org.elasticsearch.common.io.stream.StreamOutput.writeNamedWriteableList(StreamOutput.java:909) ~[elasticsearch-5.1.1.jar:5.1.1]
	at org.elasticsearch.search.aggregations.InternalAggregations.writeTo(InternalAggregations.java:208) ~[elasticsearch-5.1.1.jar:5.1.1]
	at org.elasticsearch.search.query.QuerySearchResult.writeToNoId(QuerySearchResult.java:256) ~[elasticsearch-5.1.1.jar:5.1.1]
	at org.elasticsearch.indices.IndicesService.lambda$loadIntoContext$18(IndicesService.java:1161) ~[elasticsearch-5.1.1.jar:5.1.1]
	at org.elasticsearch.indices.IndicesService.lambda$cacheShardLevelResult$20(IndicesService.java:1229) ~[elasticsearch-5.1.1.jar:5.1.1]
	at org.elasticsearch.indices.IndicesRequestCache$Loader.load(IndicesRequestCache.java:150) ~[elasticsearch-5.1.1.jar:5.1.1]
	at org.elasticsearch.indices.IndicesRequestCache$Loader.load(IndicesRequestCache.java:133) ~[elasticsearch-5.1.1.jar:5.1.1]
	at org.elasticsearch.common.cache.Cache.computeIfAbsent(Cache.java:398) ~[elasticsearch-5.1.1.jar:5.1.1]
	at org.elasticsearch.indices.IndicesRequestCache.getOrCompute(IndicesRequestCache.java:116) ~[elasticsearch-5.1.1.jar:5.1.1]
	at org.elasticsearch.indices.IndicesService.cacheShardLevelResult(IndicesService.java:1235) ~[elasticsearch-5.1.1.jar:5.1.1]
	at org.elasticsearch.indices.IndicesService.loadIntoContext(IndicesService.java:1158) ~[elasticsearch-5.1.1.jar:5.1.1]
	at org.elasticsearch.search.SearchService.loadOrExecuteQueryPhase(SearchService.java:257) ~[elasticsearch-5.1.1.jar:5.1.1]
	at org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:273) ~[elasticsearch-5.1.1.jar:5.1.1]
	at org.elasticsearch.action.search.SearchTransportService$6.messageReceived(SearchTransportService.java:300) ~[elasticsearch-5.1.1.jar:5.1.1]
	at org.elasticsearch.action.search.SearchTransportService$6.messageReceived(SearchTransportService.java:297) ~[elasticsearch-5.1.1.jar:5.1.1]
	at org.elasticsearch.transport.RequestHandlerRegistry.processMessageReceived(RequestHandlerRegistry.java:69) ~[elasticsearch-5.1.1.jar:5.1.1]
	at org.elasticsearch.transport.TransportService$6.doRun(TransportService.java:577) ~[elasticsearch-5.1.1.jar:5.1.1]
	at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:527) ~[elasticsearch-5.1.1.jar:5.1.1]
	at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) ~[elasticsearch-5.1.1.jar:5.1.1]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[?:1.8.0_112]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[?:1.8.0_112]
	at java.lang.Thread.run(Thread.java:745) [?:1.8.0_112]

```

Most of the other queries seem to be working fine. Percentile aggregations causes my entire cluster to restart. Any help on how to debug/solve this would be greatly appreciated

Thanks,  
Vignesh

---

<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:** [March 31, 2017, 3:49pm UTC](https://discuss.elastic.co/t/percentile-query-throwing-exception-in-elasticsearch/77333/2 "2017-03-31T15:49:30Z")

</div>

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