Search code examples
amazon-web-serviceselasticsearchelastic-stack

"Message":"Your request: '/_cluster/allocation/reroute' is not allowed."}


Am working on AWS cluster re-assigning the replica shard in an AWS ES cluster of node 1. Where i want both primary and replica shards to be reside. But when a run the below command am getting an error

curl  -XPOST 'http://AWS-CLuster-name.com/_cluster/allocation/reroute' -d '{ "commands": [{"allocate_replica":{"index": ".kibana", "shard": 0, node: "nodename" "primary": false }'

When run the above command am getting below error.

{"Message":"Your request: '/_cluster/allocation/reroute' is not allowed."}

Does this mean manual shard allocation is not allowed in AWS? Could anyone please clarify.

Thanks


Solution

  • This is not allowed in elasticsearch, since it would violate the concept as replicas for failover or distributed at all. https://www.elastic.co/guide/en/elasticsearch/guide/master/replica-shards.html

    Having the same primary and replica shard on the same node is useless and simpy not allowed. Has nothing to do with AWS.