# Can't get rid of warning "this node is locked into cluster UUID but \[cluster.initial\_master\_nodes\] is set to \[Z56EEW81\]; remove this setting to avoid possible data loss caused by subsequent cluster bootstrap attempts"

**URL:** <https://discuss.elastic.co/t/cant-get-rid-of-warning-this-node-is-locked-into-cluster-uuid-but-cluster-initial-master-nodes-is-set-to-z56eew81-remove-this-setting-to-avoid-possible-data-loss-caused-by-subsequent-cluster-bootstrap-attempts/335889>\
**Category:** Elasticsearch\
**Created:** [June 13, 2023, 3:38pm UTC](https://discuss.elastic.co/t/cant-get-rid-of-warning-this-node-is-locked-into-cluster-uuid-but-cluster-initial-master-nodes-is-set-to-z56eew81-remove-this-setting-to-avoid-possible-data-loss-caused-by-subsequent-cluster-bootstrap-attempts/335889 "2023-06-13T15:38:53Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![CodeTradition](https://avatars.discourse-cdn.com/v4/letter/c/a9a28c/32.png) [@CodeTradition](https://discuss.elastic.co/u/CodeTradition)\
**Post date:** [June 13, 2023, 3:38pm UTC](https://discuss.elastic.co/t/cant-get-rid-of-warning-this-node-is-locked-into-cluster-uuid-but-cluster-initial-master-nodes-is-set-to-z56eew81-remove-this-setting-to-avoid-possible-data-loss-caused-by-subsequent-cluster-bootstrap-attempts/335889/1 "2023-06-13T15:38:53Z")

</div>

Hello all,

I am using Elasticsearch v8.8.0 on a Windows Server 2019.  
Below is my Elasticsearch configuration file "elasticsearch.yml" :

```auto
cluster.name: MyCOMPANY-R7
node.name: ${HOSTNAME}
node.roles : [master, data, ingest, remote_cluster_client]
discovery.type: single-node
path:
    data: "E:\\MyCompany\\LOGS\\ElasticSearch\\data"
    logs: "E:\\MyCompany\\LOGS\\ElasticSearch\\logs"

network.host: 0.0.0.0
http.port: 9200
discovery.seed_hosts: []
xpack.security.enabled: false

```

When I'm starting my Elasticsearch service for the first time everything goes fine ! (No warning, no error).  
But everytime I'm restarting the service (without deleting the DATA folder before) I get this warning :  
"[2023-06-13T16:39:39,378][WARN][o.e.c.c.ClusterBootstrapService] [Z56EEW81] this node is locked into cluster UUID [69HTSDhuTzu7S2\_zy-7h\_Q] but [cluster.initial\_master\_nodes] is set to [Z56EEW81]; remove this setting to avoid possible data loss caused by subsequent cluster bootstrap attempts; for further information see [Important Elasticsearch configuration | Elasticsearch Guide [8.8] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/8.8/important-settings.html#initial_master_nodes)"

I read the documentation and differents pages about how to set the important configuration and tried differents values for the "network.host", "discovery.seed\_hosts", "cluster.initial\_master\_nodes",...but I either get an error then, when starting Elasticsearch, or I get more warnings...  
So I wanted to know if it was possible to get rid of this warning without having to loss the data.

Thank you,

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [June 13, 2023, 5:03pm UTC](https://discuss.elastic.co/t/cant-get-rid-of-warning-this-node-is-locked-into-cluster-uuid-but-cluster-initial-master-nodes-is-set-to-z56eew81-remove-this-setting-to-avoid-possible-data-loss-caused-by-subsequent-cluster-bootstrap-attempts/335889/2 "2023-06-13T17:03:52Z")

</div>

> [@CodeTradition](#):
>
> [2023-06-13T16:39:39,378][WARN][o.e.c.c.ClusterBootstrapService] [Z56EEW81] this node is locked into cluster UUID [69HTSDhuTzu7S2\_zy-7h\_Q] but [cluster.initial\_master\_nodes] is set to [Z56EEW81]

This is weird, the `elasticsearch.yml` that you shared does not have the `cluster.initial_master_nodes` setting on it, so this log line makes no sense.

Did you remove the setting or it is still in the `elasticsearch.yml` file?

---

<div class="post-metadata">

**Author:** ![CodeTradition](https://avatars.discourse-cdn.com/v4/letter/c/a9a28c/32.png) [@CodeTradition](https://discuss.elastic.co/u/CodeTradition)\
**Post date:** [June 14, 2023, 10:30am UTC](https://discuss.elastic.co/t/cant-get-rid-of-warning-this-node-is-locked-into-cluster-uuid-but-cluster-initial-master-nodes-is-set-to-z56eew81-remove-this-setting-to-avoid-possible-data-loss-caused-by-subsequent-cluster-bootstrap-attempts/335889/3 "2023-06-14T10:30:32Z")

</div>

The setting "cluster.initial\_master\_nodes" is definitely removed from the file.  
But as I said, when I'm starting the Elasticsearch Service for the first time (without data) everything goes fine (no warning, no error), this seems to happens everytime I'm starting it again (but with data then), so maybe there is something going on when the service is restarting but I can't figure what...

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [June 14, 2023, 11:03am UTC](https://discuss.elastic.co/t/cant-get-rid-of-warning-this-node-is-locked-into-cluster-uuid-but-cluster-initial-master-nodes-is-set-to-z56eew81-remove-this-setting-to-avoid-possible-data-loss-caused-by-subsequent-cluster-bootstrap-attempts/335889/4 "2023-06-14T11:03:22Z")

</div>

> [@CodeTradition](#):
>
> maybe there is something going on when the service is restarting

This warning only happens on a restart. But it definitely means that Elasticsearch is seeing the `cluster.initial_master_nodes` setting coming from somewhere. If it's not in the `elasticsearch.yml` file you're looking at then either Elasticsearch is looking at a different `elasticsearch.yml`, or it's being passed in on the command line used to invoke Elasticsearch.

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [June 15, 2023, 1:57pm UTC](https://discuss.elastic.co/t/cant-get-rid-of-warning-this-node-is-locked-into-cluster-uuid-but-cluster-initial-master-nodes-is-set-to-z56eew81-remove-this-setting-to-avoid-possible-data-loss-caused-by-subsequent-cluster-bootstrap-attempts/335889/5 "2023-06-15T13:57:15Z")

</div>

Ah wait, in another similar thread a user points out that this warning appears to be emitted incorrectly in the case of `discovery.type: single-node`:

> [@How to avoid warning when starting with discovery.type set to single node](https://discuss.elastic.co/t/how-to-avoid-warning-when-starting-with-discovery-type-set-to-single-node/334087/4):
>
> I believe there is a bug in de code that logs the warning ([elasticsearch/server/src/main/java/org/elasticsearch/cluster/coordination/ClusterBootstrapService.java at main · elastic/elasticsearch · GitHub](https://github.com/elastic/elasticsearch/blob/main/server/src/main/java/org/elasticsearch/cluster/coordination/ClusterBootstrapService.java)). The assumption is made that bootstrapRequirements is filled with the cluster.initial\_master\_nodes setting, but in fact it is filled with the node.name setting in case of single node discovery

---

<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:** [July 13, 2023, 1:57pm UTC](https://discuss.elastic.co/t/cant-get-rid-of-warning-this-node-is-locked-into-cluster-uuid-but-cluster-initial-master-nodes-is-set-to-z56eew81-remove-this-setting-to-avoid-possible-data-loss-caused-by-subsequent-cluster-bootstrap-attempts/335889/6 "2023-07-13T13:57:31Z")

</div>

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