# Error fetching fields for index pattern

**URL:** <https://discuss.elastic.co/t/error-fetching-fields-for-index-pattern/273193>\
**Category:** Kibana\
**Tags:** elastic-stack-security\
**Created:** [May 17, 2021, 3:32pm UTC](https://discuss.elastic.co/t/error-fetching-fields-for-index-pattern/273193 "2021-05-17T15:32:15Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![tabo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tabo/32/82472_2.png) [@tabo](https://discuss.elastic.co/u/tabo)\
**Post date:** [May 17, 2021, 3:32pm UTC](https://discuss.elastic.co/t/error-fetching-fields-for-index-pattern/273193/1 "2021-05-17T15:32:15Z")

</div>

I've just upgraded a k8s self managed installation of es with Kibana.  
When it was not secured, I created some indexes and dashboards.

When I added xpack,  
In elasticasearch.yaml file:  
(xpack.security.enabled: true  
xpack.security.authc:  
anonymous:  
authz\_exception: true  
roles: superuser  
username: anonymous)

and then adding

- name: STATUS\_ALLOWANONYMOUS  
value: "true"

to kibana in order to make the healtch check pass.

But now, I can access securely, but I cannot create indexes patterns based in my indeces.

When creating it,  
Error fetching fields for index pattern sda\*

also, I cannot list dashboards: \* Fetching listing failed

The dashboard listing could not be fetched: Failed to fetch.\*

Thanks

---

<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:** [May 17, 2021, 11:14pm UTC](https://discuss.elastic.co/t/error-fetching-fields-for-index-pattern/273193/2 "2021-05-17T23:14:54Z")

</div>

Welcome to our community! 😃

Please format your code/logs/config using the `</>` button, or markdown style back ticks. It helps to make things easy to read which helps us help you 🙂 As your post is now, it's a little hard to follow what is code/errors and what is text.

If you are getting errors, then sharing the entire thing is helpful. If it's in Kibana, then take a screenshot and attach it here. If it's something text, copy and past the entirety, making sure to code format it.

---

<div class="post-metadata">

**Author:** ![tabo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tabo/32/82472_2.png) [@tabo](https://discuss.elastic.co/u/tabo)\
**Post date:** [May 18, 2021, 5:50am UTC](https://discuss.elastic.co/t/error-fetching-fields-for-index-pattern/273193/3 "2021-05-18T05:50:51Z")

</div>

Firstly, I think what I’m trying to do is not possible.

I have a es +Kibana working with no x pack.

I have to have users in Kibana that would use the same data/dashboards I have in ES.

In order to do that, installed xpack in ES as mentioned earlier in my first message.

Anything else I should do?

---

<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:** [May 18, 2021, 10:03am UTC](https://discuss.elastic.co/t/error-fetching-fields-for-index-pattern/273193/4 "2021-05-18T10:03:42Z")

</div>

What version are you working with here?

---

<div class="post-metadata">

**Author:** ![tabo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tabo/32/82472_2.png) [@tabo](https://discuss.elastic.co/u/tabo)\
**Post date:** [May 18, 2021, 10:15am UTC](https://discuss.elastic.co/t/error-fetching-fields-for-index-pattern/273193/5 "2021-05-18T10:15:20Z")

</div>

7.12.1

---

<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:** [May 18, 2021, 10:19am UTC](https://discuss.elastic.co/t/error-fetching-fields-for-index-pattern/273193/6 "2021-05-18T10:19:58Z")

</div>

Ok, you don't need to install X-Pack, it's bundled. You do need to configure it.

If you want to enable anonymous access then please check out [Enabling anonymous access | Elasticsearch Guide [7.12] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/7.12/anonymous-access.html) and make sure you have followed the appropriate steps.  
It is not recommended to use anonymous access for Kibana though, you should set that up properly using the included Kibana system user and role. If you do that then you won't run into these permission errors.

---

<div class="post-metadata">

**Author:** ![tabo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tabo/32/82472_2.png) [@tabo](https://discuss.elastic.co/u/tabo)\
**Post date:** [May 18, 2021, 10:43am UTC](https://discuss.elastic.co/t/error-fetching-fields-for-index-pattern/273193/7 "2021-05-18T10:43:24Z")

</div>

I’ve done that, but afterwards when using the default users and passwords I cannot see my index pttern or dashboards.

---

<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:** [May 18, 2021, 10:45am UTC](https://discuss.elastic.co/t/error-fetching-fields-for-index-pattern/273193/8 "2021-05-18T10:45:40Z")

</div>

Ok, can you show us a screenshot of your index patterns in the relevant Kibana settings page?

---

<div class="post-metadata">

**Author:** ![tabo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tabo/32/82472_2.png) [@tabo](https://discuss.elastic.co/u/tabo)\
**Post date:** [May 19, 2021, 6:34am UTC](https://discuss.elastic.co/t/error-fetching-fields-for-index-pattern/273193/9 "2021-05-19T06:34:04Z")

</div>

I know what happened.  
If you use _Brave_ it won't work.  
Note: it worked when no security was enabled. That was what shocked me, and thought it wasn't working. Would be nice to add that kind of message.

> Blockquote  
> Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.

> Blockquote

but works fine with safari.

---

<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 16, 2021, 6:34am UTC](https://discuss.elastic.co/t/error-fetching-fields-for-index-pattern/273193/10 "2021-06-16T06:34:13Z")

</div>

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