elasticsearch single node appears unassigned_shards

View single node Elasticsearch health status

Use plug-ins to view the status of the cluster head

 

 

As can be seen from the screenshot above there are five unassigned fragmentation, the new index blog5 when the number of fragments is 5, the number of copies to 1, after the new state of the cluster becomes yellow, the fundamental reason is because there is not enabled cluster copy points piece, let's look at a copy of the official website given slice of introduction:

The main purpose of a copy of fragmentation is to fail, as in  principle within the cluster  in question: if a node holds the master slice hung up, a copy of the fragment will be promoted to the role-based slice.

You can see a copy of the fragmentation and master slice is not placed above a node, but only one node in the cluster, a copy of fragmentation is no way to assign to other nodes, so there are all copies of the fragments are unassigned too Happening. Because only one node, if there is the master node slice hung up, then the whole cluster should have hung up, a copy of fragmentation liter cases based slice does not exist.

The solution is, in elasticsearch single cluster node, delete the index copy of fragmentation exists, a copy of the new index are set to 0. Then check the cluster status

New index number of copies is set to 0

 

Guess you like

Origin www.cnblogs.com/chenmz1995/p/12034285.html