Single node yellow

Hi have a single node elastic cluster which is yellow:

GET /_cluster/health:
    "cluster_name": "log",
    "status": "yellow",
    "timed_out": false,
    "number_of_nodes": 1,
    "number_of_data_nodes": 1,
    "active_primary_shards": 133,
    "active_shards": 133,
    "relocating_shards": 0,
    "initializing_shards": 0,
    "unassigned_shards": 93,
    "delayed_unassigned_shards": 0,
    "number_of_pending_tasks": 0,
    "number_of_in_flight_fetch": 0,
    "task_max_waiting_in_queue_millis": 0,
    "active_shards_percent_as_number": 58.849557522123895

/_cluster/allocation/explain gives me the following:

    "note": "No shard was specified in the explain API request, so this response explains a randomly chosen unassigned shard. There may be other unassigned shards in this cluster which cannot be assigned for different reasons. It may not be possible to assign this shard until one of the other shards is assigned correctly. To explain the allocation of other shards (whether assigned or unassigned) you must specify the target shard in the request to this API.",
    "index": ".ds-logs-pfelk-nginx-2023.05.06-000010",
    "shard": 0,
    "primary": false,
    "current_state": "unassigned",
    "unassigned_info": {
        "reason": "INDEX_CREATED",
        "at": "2023-05-06T18:15:58.198Z",
        "last_allocation_status": "no_attempt"
    "can_allocate": "no",
    "allocate_explanation": "Elasticsearch isn't allowed to allocate this shard to any of the nodes in the cluster. Choose a node to which you expect this shard to be allocated, find this node in the node-by-node explanation, and address the reasons which prevent Elasticsearch from allocating this shard there.",
    "node_allocation_decisions": [
            "node_id": "DEl05HEjStW1F3OSTc3HkQ",
            "node_name": "log",
            "transport_address": "",
            "node_attributes": {
                "ml.machine_memory": "33672753152",
                "ml.allocated_processors": "4",
                "ml.max_jvm_size": "16835936256",
                "ml.allocated_processors_double": "4.0",
                "xpack.installed": "true"
            "node_decision": "no",
            "weight_ranking": 1,
            "deciders": [
                    "decider": "same_shard",
                    "decision": "NO",
                    "explanation": "a copy of this shard is already allocated to this node [[.ds-logs-pfelk-nginx-2023.05.06-000010][0], node[DEl05HEjStW1F3OSTc3HkQ], [P], s[STARTED], a[id=ZDTE-5vATISXeyGFKtxchA], failed_attempts[0]]"

I cannot understand how I could fix.

Could you help me please?

This happens because per default the indices will have one replica, but since you only have one node you cannot have any replica.

To solve hits you need to edit the template you are using for your indice and set the number of replicas to zero.

What I understand is that I have to edit the replica settings to 0 for every index and every template I have into my Elasticsearch server.

Is there a way to bulk update this for every index?

Thank you!

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