# An election requires a node with id \[STALE\_STATE\_CONFIG\]

**URL:** <https://discuss.elastic.co/t/an-election-requires-a-node-with-id-stale-state-config/224146>\
**Category:** Elastic Cloud on Kubernetes (ECK)\
**Created:** [March 18, 2020, 3:58pm UTC](https://discuss.elastic.co/t/an-election-requires-a-node-with-id-stale-state-config/224146 "2020-03-18T15:58:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![admidelu](https://avatars.discourse-cdn.com/v4/letter/a/ecb155/32.png) [@admidelu](https://discuss.elastic.co/u/admidelu)\
**Post date:** [March 18, 2020, 3:58pm UTC](https://discuss.elastic.co/t/an-election-requires-a-node-with-id-stale-state-config/224146/1 "2020-03-18T15:58:52Z")

</div>

Hey, can't seem to form a cluster using defaults, logs:

```auto
{"type": "server", "timestamp": "2020-03-18T14:54:03,323Z", "level": "WARN", "component": "o.e.c.c.ClusterFormationFailureHelper", "cluster.name": "ig-cluster", "node.name": "ig-cluster-es-masternode-1", "message": "master not discovered or elected yet, an election requires a node with id [STALE_STATE_CONFIG], have discovered [{ig-cluster-es-masternode-1}{xZ7cq3T5QlOb_FfvxHAqIg}{d8bAOYWLTuexRQQWpbQ8qg}{10.38.128.2}{10.38.128.2:9300}{lm}{ml.machine_memory=21474836480, xpack.installed=true, ml.max_open_jobs=20}, {ig-cluster-es-masternode-2}{85-4QFMIRyG4BGwYKELtNw}{M1u0PE58TzWKy291KGcMig}{10.38.0.1}{10.38.0.1:9300}{lm}{ml.machine_memory=21474836480, ml.max_open_jobs=20, xpack.installed=true}, {ig-cluster-es-masternode-0}{4PRMeSNYSUS2lPvdfL-LVg}{zOjwCE8LT0uJQsWG_rIByg}{10.41.64.1}{10.41.64.1:9300}{lm}{ml.machine_memory=21474836480, ml.max_open_jobs=20, xpack.installed=true}] which is not a quorum; discovery will continue using [127.0.0.1:9300, 127.0.0.1:9301, 127.0.0.1:9302, 127.0.0.1:9303, 127.0.0.1:9304, 127.0.0.1:9305, 10.38.0.1:9300, 10.41.64.1:9300] from hosts providers and [{ig-cluster-es-masternode-1}{xZ7cq3T5QlOb_FfvxHAqIg}{d8bAOYWLTuexRQQWpbQ8qg}{10.38.128.2}{10.38.128.2:9300}{lm}{ml.machine_memory=21474836480, xpack.installed=true, ml.max_open_jobs=20}] from last-known cluster state; node term 3, last-accepted version 34 in term 3" }

```

My config:

```auto
  apiVersion: elasticsearch.k8s.elastic.co/v1
   kind: Elasticsearch
   metadata:
     name: ig-cluster
   spec:
     version: 7.6.1
     nodeSets:
       - name: masternode
         count: 3
         config:
           node.master: true
           node.data: false
           node.ingest: false
           cluster.remote.connect: true
         volumeClaimTemplates:
           - metadata:
               name: elasticsearch-data
             spec:
               accessModes:
                 - ReadWriteOnce
               resources:
                 requests:
                   storage: 500Gi
               storageClassName: local-storage
         podTemplate:
           spec:
             nodeSelector:
               server: datababe
             containers:
               - name: elasticsearch
                 resources:
                   limits:
                     memory: 20Gi
                     cpu: 4
                   requests:
                     memory: 20Gi
                     cpu: 1
                 env:
                   - name: ES_JAVA_OPTS
                     value: -Xms10g -Xmx10g
                   # - name: bootstrap.memory_lock
                   # value: true
       - name: datanode
         count: 9
         config:
           node.master: false
           node.data: true
           node.ingest: true
           cluster.remote.connect: true
         volumeClaimTemplates:
           - metadata:
               name: elasticsearch-data
             spec:
               accessModes:
                 - ReadWriteOnce
               resources:
                 requests:
                   storage: 750Gi
               storageClassName: local-storage
         podTemplate:
           spec:
             nodeSelector:
               server: datababe
             containers:
               - name: elasticsearch
                 resources:
                   limits:
                     memory: 28Gi
                     cpu: 5
                   requests:
                     memory: 28Gi
                     cpu: 1
                 env:
                   - name: ES_JAVA_OPTS
                     value: -Xms14g -Xmx14g
                   # - name: bootstrap.memory_lock
                   # value: true

```

What does [STALE\_STATE\_CONFIG] mean and should I override cluster.initial\_master\_nodes in podTemplate?

---

<div class="post-metadata">

**Author:** ![Anya\_Sabo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anya_sabo/32/49903_2.png) [@Anya\_Sabo](https://discuss.elastic.co/u/Anya_Sabo)\
**Post date:** [March 18, 2020, 6:19pm UTC](https://discuss.elastic.co/t/an-election-requires-a-node-with-id-stale-state-config/224146/2 "2020-03-18T18:19:00Z")

</div>

That's interesting and new to me. Can you provide some more background information on what actions you took against the cluster before it ended up in this state? From the message it seems like the node you copied that log from used to be a data node, but now is a master node. Can you share which node that log is from? Is it happening on all of the master nodes? I'd want to find out why the cluster cannot form a quorum.

For what it's worth I cannot reproduce this deploying your provided yaml from scratch (with some modifications to the storage and node selectors to allow it to deploy on my cluster).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [November 4, 2022, 7:49am UTC](https://discuss.elastic.co/t/an-election-requires-a-node-with-id-stale-state-config/224146/3 "2022-11-04T07:49:49Z")

</div>


