Cluster Health RED unassigned primary and replica shards

Hello to everyone,
Cluster health turned red when a node fell from the cluster. When I re-add the node, some directories automatically turned from red to green, but there is an index still red and I don't know what to do. It looks like it is trying to assign the primary and replica shard of the directory to the same node. There was no change when I set the replication number to 0. How do I assign a primary shard? I did some research and finally got this printout, but I have no idea what to do.

GET /_cat/shard?h=index,shard,prirep,state,unassigned.reason
ticket             2   p   INITIALIZING          NODE_LEFT
ticket             2   r   UNASSIGNED            REPLICA_ADDED

and

GET /_cluster/allocation/explain?pretty

 {

"index" : "ticket",

"shard" : 2,

"primary" : false,

 "current_state" : "unassigned",

  "unassigned_info" : {

"reason" : "REPLICA_ADDED",

"at" : "2020-12-16T13:18:24.160Z",

"last_allocation_status" : "no_attempt"

},

"can_allocate" : "no",

"allocate_explanation" : "cannot allocate because allocation is not permitted to any of the nodes",

"node_allocation_decisions" : [

{

  "node_id" : "2nEK_Bt1R5yfObiZTBha2Q",

 "node_name" : "data-9",

  "transport_address" : "192.168.3.57:9300",

  "node_attributes" : {

    "ml.machine_memory" : "270435311616",

    "ml.max_open_jobs" : "20",

    "xpack.installed" : "true",

    "disk_type" : "ssd"

  },

"node_decision" : "no",

  "deciders" : [

    {

      "decider" : "replica_after_primary_active",

      "decision" : "NO",

      "explanation" : "primary shard for this replica is not yet active"

    },

    {

      "decider" : "throttling",

      "decision" : "NO",

      "explanation" : "primary shard for this replica is not yet active"

    }

  ]

},

{

  "node_id" : "NVXXnkg9RcS1LJHbxE4JWw",

  "node_name" : "data-4",

  "transport_address" : "192.168.3.66:9300",

  "node_attributes" : {

    "ml.machine_memory" : "405356519424",

    "ml.max_open_jobs" : "20",

    "xpack.installed" : "true",

    "disk_type" : "ssd"

  },

  "node_decision" : "no",

  "deciders" : [

    {

      "decider" : "replica_after_primary_active",

      "decision" : "NO",

      "explanation" : "primary shard for this replica is not yet active"

    },

    {

      "decider" : "throttling",

      "decision" : "NO",

      "explanation" : "primary shard for this replica is not yet active"

    }

  ]

},

{

  "node_id" : "RViUJd6gQJui6Hu5clZh1g",

  "node_name" : "data-6",

  "transport_address" : "192.168.3.64:9300",

  "node_attributes" : {

    "ml.machine_memory" : "270435397632",

    "ml.max_open_jobs" : "20",

    "xpack.installed" : "true",

    "disk_type" : "ssd"

  },

  "node_decision" : "no",

  "deciders" : [

    {

      "decider" : "replica_after_primary_active",

      "decision" : "NO",

      "explanation" : "primary shard for this replica is not yet active"

    },

    {

      "decider" : "throttling",

      "decision" : "NO",

      "explanation" : "primary shard for this replica is not yet active"

    }

  ]

},

{

  "node_id" : "U8_onApfRnG7fpToARusIw",

  "node_name" : "data-7",

  "transport_address" : "192.168.3.63:9300",

  "node_attributes" : {

    "ml.machine_memory" : "270413611008",

    "ml.max_open_jobs" : "20",

    "xpack.installed" : "true",

    "disk_type" : "ssd"

  },

  "node_decision" : "no",

  "deciders" : [

    {

      "decider" : "replica_after_primary_active",

      "decision" : "NO",

      "explanation" : "primary shard for this replica is not yet active"

    },

    {

      "decider" : "throttling",

      "decision" : "NO",

      "explanation" : "primary shard for this replica is not yet active"

   }

  ]

},

{

  "node_id" : "U_Gj7l6MToOyiHIVf8PKeQ",

  "node_name" : "data-10",

  "transport_address" : "192.168.3.72:9300",

  "node_attributes" : {

    "ml.machine_memory" : "67515105280",

    "ml.max_open_jobs" : "20",

    "xpack.installed" : "true",

    "disk_type" : "ssd"

  },

  "node_decision" : "no",

  "deciders" : [

    {

      "decider" : "replica_after_primary_active",

      "decision" : "NO",

      "explanation" : "primary shard for this replica is not yet active"

    },

    {

      "decider" : "throttling",

      "decision" : "NO",

      "explanation" : "primary shard for this replica is not yet active"

    }

  ]

},

{

  "node_id" : "_BUmAFaYTGi-6aaYnPlqvw",

  "node_name" : "data-1",

  "transport_address" : "192.168.3.68:9300",

  "node_attributes" : {

    "ml.machine_memory" : "270073581568",

    "ml.max_open_jobs" : "20",

    "xpack.installed" : "true",

    "disk_type" : "ssd"

  },

  "node_decision" : "no",

  "deciders" : [

    {

      "decider" : "replica_after_primary_active",

      "decision" : "NO",

      "explanation" : "primary shard for this replica is not yet active"

    },

    {

      "decider" : "throttling",

      "decision" : "NO",

      "explanation" : "primary shard for this replica is not yet active"

    }

  ]

},

{

  "node_id" : "jFQih3_gQ8-MdAzbTwlHFg",

  "node_name" : "data-5",

  "transport_address" : "192.168.3.65:9300",

  "node_attributes" : {

    "ml.machine_memory" : "270435397632",

    "ml.max_open_jobs" : "20",

    "xpack.installed" : "true",

    "disk_type" : "ssd"

  },

  "node_decision" : "no",

  "deciders" : [

    {

      "decider" : "replica_after_primary_active",

      "decision" : "NO",

      "explanation" : "primary shard for this replica is not yet active"

    },

    {

      "decider" : "throttling",

      "decision" : "NO",

      "explanation" : "primary shard for this replica is not yet active"

    }

  ]

},

{

  "node_id" : "nNuEnLSOQMWbx7C6u37bfQ",

  "node_name" : "data-11",

  "transport_address" : "192.168.3.71:9300",

  "node_attributes" : {

    "ml.machine_memory" : "67508068352",

    "ml.max_open_jobs" : "20",

    "xpack.installed" : "true",

    "disk_type" : "ssd"

  },

  "node_decision" : "no",

  "deciders" : [

    {

      "decider" : "replica_after_primary_active",

      "decision" : "NO",

      "explanation" : "primary shard for this replica is not yet active"

    },

    {

      "decider" : "throttling",

      "decision" : "NO",

      "explanation" : "primary shard for this replica is not yet active"

    }

  ]

},

{

  "node_id" : "pro3gLa8TuqWDxjBjVTZVw",

  "node_name" : "data-3",

  "transport_address" : "192.168.3.67:9300",

  "node_attributes" : {

    "ml.machine_memory" : "270073495552",

    "ml.max_open_jobs" : "20",

    "xpack.installed" : "true",

    "disk_type" : "ssd"

  },

  "node_decision" : "no",

  "deciders" : [

    {

      "decider" : "replica_after_primary_active",

      "decision" : "NO",

      "explanation" : "primary shard for this replica is not yet active"

    },

    {

      "decider" : "throttling",

      "decision" : "NO",

      "explanation" : "primary shard for this replica is not yet active"

    }

  ]

},

{

  "node_id" : "vKA6qG2WRr2VJnK4wNVYOA",

  "node_name" : "data-2",

  "transport_address" : "192.168.3.69:9300",

  "node_attributes" : {

    "ml.machine_memory" : "405356605440",

    "ml.max_open_jobs" : "20",

    "xpack.installed" : "true",

    "disk_type" : "ssd"

  },

  "node_decision" : "no",

  "deciders" : [

    {

      "decider" : "replica_after_primary_active",

      "decision" : "NO",

      "explanation" : "primary shard for this replica is not yet active"

    },

    {

      "decider" : "throttling",

      "decision" : "NO",

      "explanation" : "primary shard for this replica is not yet active"

    }

  ]

},

{

  "node_id" : "z7D9_J50QzW1d_5y2mqYZQ",

  "node_name" : "data-8",

  "transport_address" : "192.168.3.56:9300",

  "node_attributes" : {

    "ml.machine_memory" : "270073581568",

    "ml.max_open_jobs" : "20",

    "xpack.installed" : "true",

    "disk_type" : "ssd"

  },

  "node_decision" : "no",

  "deciders" : [

    {

      "decider" : "replica_after_primary_active",

      "decision" : "NO",

      "explanation" : "primary shard for this replica is not yet active"

    },

    {

      "decider" : "same_shard",

      "decision" : "NO",

      "explanation" : "the shard cannot be allocated to the same node on which a copy of the shard already exists [[ticket][2], node[z7D9_J50QzW1d_5y2mqYZQ], [P], recovery_source[existing store recovery; bootstrap_history_uuid=false], s[INITIALIZING], a[id=IsvJcBeMQ3O1YMOyTkVO-A], unassigned_info[[reason=NODE_LEFT], at[2020-12-16T14:01:00.681Z], delayed=false, details[node_left [z7D9_J50QzW1d_5y2mqYZQ]], allocation_status[fetching_shard_data]]]"

    },

    {

      "decider" : "throttling",

      "decision" : "NO",

      "explanation" : "primary shard for this replica is not yet active"

    }

  ]

}

]

}

What is the output from the _cat/recovery?v endpoint?

Thank you for your answer. I could not find a solution. Finally I delete the index and re-created it. There is no problem right now.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.