Something happened during the night to my ES cluster (composed of 5 data nodes, 3 master nodes).
I have no idea what happened but all the indices and data were deleted and the cluster entered a "read only" mode, possibly hacked?
When trying to get Kibana running, I get the following:
Tried restarting Kibana - it restarted, nothing changed. Tried restarting Elastic - it restarted (all nodes), nothing changed.
I then had a look at the cluster settings and this is what I got:
{
"persistent": {
"cluster": {
"routing": {
"allocation": {
"enable": "all"
}
},
"blocks": {
"read_only": "true"
}
}
},
"transient": {
"cluster": {
"routing": {
"allocation": {
"enable": "all"
}
}
}
}
}
I tried undoing the read only as follows:
PUT _cluster/settings
{
"persistent": {
"blocks.read_only": false
}
}
No luck as you can see:
{
"error": {
"root_cause": [
{
"type": "cluster_block_exception",
"reason": "blocked by: [FORBIDDEN/6/cluster read-only (api)];"
}
],
"type": "cluster_block_exception",
"reason": "blocked by: [FORBIDDEN/6/cluster read-only (api)];"
},
"status": 403
}
Any ideas?
UPDATE: Problem solved by Andrei Stefan, now for the more important part - why? What happened and why? I've lost all data and my cluster entered a read-only mode.
To close all indices, use _all or * . By default, you must explicitly name the indices you are closing. To specify indices to close with _all , * , or other wildcard expressions, change the action. destructive_requires_name setting to false .
The master node is responsible for lightweight cluster-wide actions such as creating or deleting an index, tracking which nodes are part of the cluster, and deciding which shards to allocate to which nodes. It is important for cluster health to have a stable master node.
Client nodes were removed from Elasticsearch after version 2.4 and became coordinating nodes. Coordinating nodes are nodes that do not hold any configured role. They don't hold data and are not part of the master eligible group nor execute ingest pipelines.
The correct command is:
PUT /_cluster/settings
{
"persistent" : {
"cluster.blocks.read_only" : false
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With