Elasticseach failed shard allocation

My ES is in yellow state after another one node adding and restarting cluster. I have 4 unassigned shards (from 33), and here is response for one of unassigned shards:

{
  "index" : "MY INDEX NAME",
  "shard" : 0,
  "primary" : false,
  "current_state" : "unassigned",
  "unassigned_info" : {
    "reason" : "ALLOCATION_FAILED",
    "at" : "2021-04-29TTIME",
    "failed_allocation_attempts" : 5,
    "details" : "failed shard on node [9yWBUCXXXTIIbiA]: failed to create index,     failure  IllegalArgumentException[IOException while reading synonyms_path_path: /etc/elasticsearch/synonyms.txt]; nested: NoSuchFileException[/etc/elasticsearch/synonyms.txt]; ",
    "last_allocation_status" : "no_attempt"
  },

How I can fix it?

You need to make sure that the synonym file is available on all machines.

Yeah, looks like this is the reason, new VM does not have this file.

Should I restart ES on all nodes after that? Or do something else?

@dadoonet add file and restarted ES, but looks like I need to run allocation again? Is it possible?

Did you restart everything? What is the error now?

  1. Added missing file
  2. Restarted ES
  3. Run POST /_cluster/reroute?retry_failed=true to start again allocation (I used Kibana Dev Toosl)

@dadoonet thank you for your help!

So it's all good now?

Yeah, after run POST /_cluster/reroute?retry_failed=true cluaster became green (after allocation)!