# Kibana error 500 when viewing metrics

**URL:** https://discuss.elastic.co/t/kibana-error-500-when-viewing-metrics/256429
**Category:** Beats
**Created:** [November 24, 2020, 1:59am UTC](https://discuss.elastic.co/t/kibana-error-500-when-viewing-metrics/256429 "2020-11-24T01:59:26Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![daq](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/daq/32/33426_2.png) [@daq](https://discuss.elastic.co/u/daq)
#### Post date: [November 24, 2020, 1:59am UTC](https://discuss.elastic.co/t/kibana-error-500-when-viewing-metrics/256429/1 "2020-11-24T01:59:26Z")

</div>

I'm having a problem viewing metrics in Kibana. My issue seems identical to [this bug report.](https://github.com/elastic/kibana/issues/64793) except the workaround there doesn't solve the problem for me.

Every time I open metrics tab I get the following error:  
`[illegal_argument_exception] Text fields are not optimised for operations that require per-document field data like aggregations and sorting, so these operations are disabled by default.`

I deleted all metricbeat indices.  
I also deleted index template and made sure it was re-created with  
`metricbeat setup`  
command before ingesting any new data.

Just in case I also deleted metricbeat index pattern and all visualizations. I don't think this was necessary and I'll probably need to figure out how to restore those next. Kibana reinstall?

I'm running Kibana 7.6.2 with same version of Metricbeat. Tried on two different servers just in case with same result.

I tried ingesting via our normal path of  
metricbeat -\> logstash -\> es  
and just to be sure logstash wasn't causing any issues directly  
metricbeat -\> es

Any ideas?

---

<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: [December 22, 2020, 1:59am UTC](https://discuss.elastic.co/t/kibana-error-500-when-viewing-metrics/256429/2 "2020-12-22T01:59:35Z")

</div>

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