How to fix unassigned shards issue in Elasticsearch? - Big Data In Real World

How to fix unassigned shards issue in Elasticsearch?

How to recursively upload a folder to S3 using AWS CLI?
July 3, 2023
Stream Processing vs. Message Processing: What’s the Difference?
July 17, 2023
How to recursively upload a folder to S3 using AWS CLI?
July 3, 2023
Stream Processing vs. Message Processing: What’s the Difference?
July 17, 2023

By default shards should be automatically allocated to nodes. But in extreme cases where you had to add or remove nodes to the cluster or after several results your server might be in a non green status and you could have shards that are not allocated.

Solution

cluster.routing.allocation.enable is a cluster level property and it is a dynamic property. Set this to all at the cluster and monitor the cluster to see whether the error goes away.

In most cases below should fix the issue.

curl -XPUT 'localhost:9200/_cluster/settings' -d '{ 
"transient" : { "cluster.routing.allocation.enable" : "all" } }'
Big Data In Real World
Big Data In Real World
We are a group of Big Data engineers who are passionate about Big Data and related Big Data technologies. We have designed, developed, deployed and maintained Big Data applications ranging from batch to real time streaming big data platforms. We have seen a wide range of real world big data problems, implemented some innovative and complex (or simple, depending on how you look at it) solutions.

Comments are closed.

How to fix unassigned shards issue in Elasticsearch?
This website uses cookies to improve your experience. By using this website you agree to our Data Protection Policy.

Hadoop In Real World is now Big Data In Real World!

X