Unfortunately I have deleted some index files

unfortunately i have deleted some index files in below path.

home/Elasticsearch/data/nodes/0/indices/

Elasticsearch is stopped and we are trying to restart the Elasticsearch but am getting below error.

"[2021-10-25T11:11:54,159][ERROR][o.e.g.GatewayMetaState ] [app_node] failed to read or upgrade local state, exiting...
java.io.IOException: failed to find metadata for existing index appnode-2021.09.25 [location: gyK9xHNfTO-vTzqEg0YqpQ, generation: 18]"

Directly deleting files from the data directory is not supported and can cause corruption, which seems to be the case here. If you have a single node cluster I suspect you will need to restore data from a snapshot.

Otherwise you will need to delete all the data in the cluster and reingest it.

Hi, Thanks Christian.
Is possible can you please elaborate how to restore from snapshot.

This requires that you have previously backed up your data using the snapshot API. If you have done that you just spin up a new clean node and use the restore API.

If you do not have a snapshot to fall back on I suspect your data may be lost.

Thanks,

is there any possibility to import the index files which are available now in data folder OR any possibilities to edit the .st file.

Not that I know of, but others with more in-depth knowledge in this area might know better.

Thanks Warkolm,

Is there any possibility to import the index files which are available now in data folder OR any possibilities to edit the .st file.

Okay, Thank you

If it is the cluster that that is corrupted I suspect the data is lost. If it was a single index you might have been able to recover at least some of the data.

HI,

I have created another subpolder into it and changed the data path in Elasticsearch.yml and started Elasticsearch.

Now Elasticsearch is running but KIBANA is not starting, getting below error. Can you please help me.

Failed to poll for work: [search_phase_execution_exception] all shards failed :: {

Please don't post pictures of text or code. They are difficult to read, impossible to search and replicate (if it's code), and some people may not be even able to see them :slight_smile:

Hi, while am starting KIBANA, am facing below error.

type":"log","@timestamp":"2021-11-08T09:07:04Z","tags":["error","Elasticsearch","admin"],"pid":30607,"message":"Request error, retrying\nPOST

Hi, while am starting KIBANA, am facing below error.

type":"log","@timestamp":"2021-11-08T09:07:04Z","tags":["error","Elasticsearch","admin"],"pid":30607,"message":"Request error, retrying\nPOST

Is Elasticsearch healthy? Is the status green?

its running healthy

its running, cluster is showing yellow

HI,

am checking the metricbeat dashboards, but am unable to see any info in system overview.

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