Unassigned indicies after purging /nsm/elasticsearch/indices folder #10855
-
Hello, community and SO developers. Thank you for this product; I've been using it for years, and SO has never disappointed me in any of my security needs. I encountered a big problem: Elasticsearch on my production Manager node crashed and didn't respond to any localhost:9200 requests. In an attempt to fix it, I decided to purge all data in the /nsm/elasticsearch/indices directory on Manager, as the indices were not critical, and I was prepared to lose them. However, I didn't realize that this directory contained all Kibana and security indices and shards. As a result, the Elasticsearch service on my Manager node got stuck. If anyone has any advice, I will attach the response of the so-elasticsearch-shards-list command:
The so-index-list command gives an empty response, as expected. The output of curl -K /opt/so/conf/elasticsearch/curl.config -k -X GET "https://localhost:9200/_cluster/allocation/explain" | jq returns the following:
I've also tried to delete shards via the API endpoint or reroute them, but neither approach yielded any result. I've spent a lot of time trying to fix this, but now I believe that the only way to resolve my problem is to reinstall Manager. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Update: My issue was: Steps to fix: 1.Disable shards allocation on the Manager Node
|
Beta Was this translation helpful? Give feedback.
Update:
I managed to solve my problem by disabling xpack.security in /opt/so/saltstack/local/salt/elasticsearch/defaults.yaml.
Then, the unsecured API allowed me to purge all indices and data streams needed. I reenabled xpack.security, reapplied the Elasticsearch Salt state, and the system recreated the indices I needed.
Now, my system works as expected. I hope my topic will help someone else who may encounter such a disaster.
My issue was:
Due to purging all indices in /nsm/elasticsearch/indices, my security and other indices were also purged.
Deletion of shards and indices was also not available due to broken xpack.security roles.
Steps to fix:
1.Disable shards allocation on the Manager…