# UnavailableShardsException: at least one primary shard for the index \[.security-7\] is unavailable

**URL:** https://discuss.elastic.co/t/unavailableshardsexception-at-least-one-primary-shard-for-the-index-security-7-is-unavailable/347393
**Category:** Elasticsearch
**Created:** [November 17, 2023, 9:37am UTC](https://discuss.elastic.co/t/unavailableshardsexception-at-least-one-primary-shard-for-the-index-security-7-is-unavailable/347393 "2023-11-17T09:37:55Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![NIK2501nc](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nik2501nc/32/126630_2.png) [@NIK2501nc](https://discuss.elastic.co/u/NIK2501nc)
#### Post date: [November 20, 2023, 9:03am UTC](https://discuss.elastic.co/t/unavailableshardsexception-at-least-one-primary-shard-for-the-index-security-7-is-unavailable/347393/4 "2023-11-20T09:03:48Z")

</div>

Hi @rahul_sirugudi

It seems your nodes are unable to store the system index (.security index). Try to change your master node role as data\_content by adding data\_content role in node\_roles of your nodes YML file.

Refer the below post for more detail-

> [@Failed to retrieve password hash for reserved user \[elastic\] org.elasticsearch.action.UnavailableShardsException: at least one primary shard for the index \[.security-7\] is unavailable](https://discuss.elastic.co/t/failed-to-retrieve-password-hash-for-reserved-user-elastic-org-elasticsearch-action-unavailableshardsexception-at-least-one-primary-shard-for-the-index-security-7-is-unavailable/347499/1):
>
> failed to retrieve password hash for reserved user [elastic] org.elasticsearch.action.UnavailableShardsException: at least one primary shard for the index [.security-7] is unavailable You'll get this issue when in your cluster, the nodes are unable to contain the system index ( like ".index, .security, .kibana etc." ) for resolving this issue- Add the node role as "data\_content" the YML setting will be- node roles: [data\_content, other node roles whichever you want separated by comma] For D…

After changing the role UUID of the node will change so in such case for existing cluster you need to kill all elastic node process then change the node role and restart your other node which results your cluster up and after that you'll not face this issue.

incase of any doubt share your YML settings or if it resolves let us know for the same.

Good luck!

---

_[View the full topic](https://discuss.elastic.co/t/unavailableshardsexception-at-least-one-primary-shard-for-the-index-security-7-is-unavailable/347393)._
