# X-Pack / Elastic - Cannot read security-version string in index .security

**URL:** <https://discuss.elastic.co/t/x-pack-elastic-cannot-read-security-version-string-in-index-security/257595>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security, docker\
**Created:** [December 3, 2020, 10:08pm UTC](https://discuss.elastic.co/t/x-pack-elastic-cannot-read-security-version-string-in-index-security/257595 "2020-12-03T22:08:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![luffy937](https://avatars.discourse-cdn.com/v4/letter/l/dec6dc/32.png) [@luffy937](https://discuss.elastic.co/u/luffy937)\
**Post date:** [December 3, 2020, 10:08pm UTC](https://discuss.elastic.co/t/x-pack-elastic-cannot-read-security-version-string-in-index-security/257595/1 "2020-12-03T22:08:13Z")

</div>

Hello All,

I'm coming to you because I think I checked all possibilities to correct my issue...  
I run an Elastic stack in a docker-compose file, the stack run well but I have a lot of error message in my `docker-compose logs`  
You can find this error message in next screenshots :  
` {"type": "server", "timestamp": "2020-12-03T18:05:07,539Z", "level": "INFO", "component": "o.e.x.s.s.SecurityIndexManager", "cluster.name": "docker-cluster", "node.name": "22decff2f1e9", "message": "Missing _meta field in mapping [_doc] of index [.security]", "cluster.uuid": "X9GEjI3UQt-YFn29tohRmA", "node.id": "F_ZHmVV1Ri-92A3NBWun6w" } elasticsearch_1 | {"type": "server", "timestamp": "2020-12-03T18:05:07,540Z", "level": "WARN", "component": "o.e.c.s.ClusterApplierService", "cluster.name": "docker-cluster", "node.name": "22decff2f1e9", "message": "failed to notify ClusterStateListener", "cluster.uuid": "X9GEjI3UQt-YFn29tohRmA", "node.id": "F_ZHmVV1Ri-92A3NBWun6w" , elasticsearch_1 | "stacktrace": ["java.lang.IllegalStateException: Cannot read security-version string in index .security",`

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/5/9/59eac914270a4d89f43c3731d3f502b61574b198.png)

And:  
`kibana_1 | {"type":"log","@timestamp":"2020-12-03T22:02:17Z","tags":["error","plugins","security","authorization"],"pid":8,"message":"Error registering Kibana Privileges with Elasticsearch for kibana-.kibana: [status_exception] Cluster state has not been recovered yet, cannot write to the [null] index"} `

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/a/7/a72b68538f939ac34a41b3e687e617cfd5de6f61.png)

I supposed that this error come from this :

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/4/d/4d47c9c412e49f6d9267d1936c516cef108866d0.png)

As you can see, I have two differents .security index and elasticsearch try to read "security-version" in the mapping of this index but it do not have this field :

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/3/c/3ca8014b56c64408202c3d091e68d05325c4eaaa.png)  
This field is present in the `.security-7` index :  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/4/8/48c2cc64787d3bb9b12aa2216c28caa288cd3f66.png)

Elastic version: 7.9.3

I want create users but I can't because of this issue...  
Thank you so much for your help (and sorry for my bad english)

Regards

---

<div class="post-metadata">

**Author:** ![TimV](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timv/32/13162_2.png) [@TimV](https://discuss.elastic.co/u/TimV)\
**Post date:** [December 4, 2020, 4:48am UTC](https://discuss.elastic.co/t/x-pack-elastic-cannot-read-security-version-string-in-index-security/257595/2 "2020-12-04T04:48:27Z")

</div>

I don't know what happened here, but it does look like something went wrong on your cluster.

The simplest solution will be to delete the `.security-7` and `.security` indices, and they will be automatically recreated.  
But you will lose any data in those indices (users, roles, etc).

---

<div class="post-metadata">

**Author:** ![luffy937](https://avatars.discourse-cdn.com/v4/letter/l/dec6dc/32.png) [@luffy937](https://discuss.elastic.co/u/luffy937)\
**Post date:** [December 4, 2020, 8:28am UTC](https://discuss.elastic.co/t/x-pack-elastic-cannot-read-security-version-string-in-index-security/257595/3 "2020-12-04T08:28:15Z")

</div>

Hello Tim

Thanks a lot for your help, its working !  
I was afraid to remove these indices because I thinked that it will crash my Elastic...

I more question please, if I want export all my users account (I case of disaster plan for example), how can I proceed ? (Sould I open another topic?)

Thanks again ! 😃

---

<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:** [January 1, 2021, 8:28am UTC](https://discuss.elastic.co/t/x-pack-elastic-cannot-read-security-version-string-in-index-security/257595/4 "2021-01-01T08:28:26Z")

</div>

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