Since closing all indexes at once is a dangerous action, it may be disabled by default on your cluster. You must ensure that your elasticsearch.yml configuration file does not contain this:
action.destructive_requires_name: true
You can install this in your configuration file and restart the cluster, but I strongly disagree with the fact that since it opens the door to all kinds of other destructive actions, such as deleting all your indexes at once.
action.destructive_requires_name: false
Instead, you should temporarily update the cluster settings with
curl -XPUT localhost:9200/_cluster/settings -d '{ "persistent" : { "action.destructive_requires_name" : false } }'
Then close all your indexes
curl -XPOST localhost:9200/_all/_close
And then reset the settings for a safer value:
curl -XPUT localhost:9200/_cluster/settings -d '{ "persistent" : { "action.destructive_requires_name" : true } }'
source share