# Elastic search 8.7.1 cluster is not forming, Here is yml: and command to create a token run on CENTOS7

**URL:** https://discuss.elastic.co/t/elastic-search-8-7-1-cluster-is-not-forming-here-is-yml-and-command-to-create-a-token-run-on-centos7/350613
**Category:** Elasticsearch
**Created:** [January 8, 2024, 8:51pm UTC](https://discuss.elastic.co/t/elastic-search-8-7-1-cluster-is-not-forming-here-is-yml-and-command-to-create-a-token-run-on-centos7/350613 "2024-01-08T20:51:16Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![Varinder](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/varinder/32/123243_2.png) [@Varinder](https://discuss.elastic.co/u/Varinder)
#### Post date: [January 8, 2024, 8:51pm UTC](https://discuss.elastic.co/t/elastic-search-8-7-1-cluster-is-not-forming-here-is-yml-and-command-to-create-a-token-run-on-centos7/350613/1 "2024-01-08T20:51:16Z")

</div>

path.data: /var/lib/elasticsearch  
path.logs: /var/log/elasticsearch  
xpack.security.enabled: false  
xpack.security.enrollment.enabled: true  
xpack.security.http.ssl:  
enabled: false  
keystore.path: certs/http.p12  
xpack.security.transport.ssl:  
enabled: true  
verification\_mode: certificate  
keystore.path: certs/transport.p12  
truststore.path: certs/transport.p12  
#cluster.initial\_master\_nodes:  
#- IP-1  
#- IP-2  
#IP-3  
#http.host: 0.0.0.0  
#cluster.name: elasticsearch  
node.name: NODE-1  
network.host: localhost,IP  
http.port: 9200  
searchguard.enterprise\_modules\_enabled: false  
thread\_pool.write.queue\_size: 1000  
#node.master: true  
#node.data: true  
discovery.seed\_hosts:  
#discovery.zen.ping.unicast.hosts

- IP1
- IP2
- IP3  
http.max\_content\_length: 500mb  
indices.query.bool.max\_clause\_count: 200000  
thread\_pool.search.size: 50  
searchguard.ssl.transport.pemkey\_filepath: key.pem  
searchguard.ssl.transport.pemcert\_filepath: cert.pem  
searchguard.ssl.transport.pemtrustedcas\_filepath: cacert.pem  
searchguard.ssl.transport.enforce\_hostname\_verification: false  
searchguard.ssl.transport.enabled\_protocols:
- TLSv1.2  
searchguard.ssl.http.pemkey\_filepath: key.pem  
searchguard.ssl.http.pemcert\_filepath: cert.pem  
searchguard.ssl.http.pemtrustedcas\_filepath: cacert.pem  
searchguard.ssl.http.enabled: true  
searchguard.ssl.http.enabled\_protocols:
- TLSv1.2  
searchguard.authcz.admin\_dn:
- CN=Server,O=XXX  
searchguard.nodes\_dn:

* * *

##Command to create a token run on Centos-7  
[root@localhost bin]# ./elasticsearch-create-enrollment-token -s node

ERROR: Failed to determine the health of the cluster.  
[root@localhost bin]# pwd  
/usr/share/elasticsearch/bin

[root@localhost ~]# curl -XGET -k -u admin:Admin1.# [https://IP:9200/\_cat/health](https://IP:9200/_cat/health)  
1704589901 21:05:01 elasticsearch green 1 0 10 10 0 1 1 0 - 100.0%

Health is totally fine.

---

<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: [January 8, 2024, 9:03pm UTC](https://discuss.elastic.co/t/elastic-search-8-7-1-cluster-is-not-forming-here-is-yml-and-command-to-create-a-token-run-on-centos7/350613/2 "2024-01-08T21:03:31Z")

</div>

The enrollment token only works when you enable security and use the automated configuration.

You disabled security with `xpack.security.enabled: false` and are using a third-party security plugin, so enrollment token will not work for obvious reasons, it is a Elastic feature that relies on Elastic security.

Since you are using a third party security plugin you need to check with Search Guard how to add new nodes.

---

<div class="post-metadata">

### Author: ![Varinder](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/varinder/32/123243_2.png) [@Varinder](https://discuss.elastic.co/u/Varinder)
#### Post date: [January 9, 2024, 4:50pm UTC](https://discuss.elastic.co/t/elastic-search-8-7-1-cluster-is-not-forming-here-is-yml-and-command-to-create-a-token-run-on-centos7/350613/3 "2024-01-09T16:50:17Z")

</div>

Hi @leandrojmp ,  
Thanks for your feed back. When I did `xpack.security.enabled: true. Then ES service fails.

Can you please elaborate more, how can I add new nodes to cluster.  
Which file I have to change/edit and what to edit.  
It will be great if you can share some detailed steps.  
I have installed ES8.7.1 on three servers.

Thanks

---

<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: [January 9, 2024, 5:00pm UTC](https://discuss.elastic.co/t/elastic-search-8-7-1-cluster-is-not-forming-here-is-yml-and-command-to-create-a-token-run-on-centos7/350613/4 "2024-01-09T17:00:36Z")

</div>

> [@Varinder](#):
>
> Can you please elaborate more, how can I add new nodes to cluster.

You are using a third party security plugin.

For example, these settings are not Elasticsearch settings:

```auto
searchguard.ssl.transport.pemkey_filepath: key.pem
searchguard.ssl.transport.pemcert_filepath: cert.pem
searchguard.ssl.transport.pemtrustedcas_filepath: cacert.pem
searchguard.ssl.transport.enforce_hostname_verification: false
searchguard.ssl.transport.enabled_protocols:

```

They are related to the Search Guard plugin which is not made by Elastic and is not supported on this forum, not sure what instructions you followed, but you need to check in a Search Guard forum on how to add new nodes.

Is not sure where this come from or what instructions are you following, but they are not official instructions by Elastic.

The Elastic instructions when you do not use third-party plugins for security are [here](https://www.elastic.co/guide/en/elasticsearch/reference/current/configuring-stack-security.html).

---

<div class="post-metadata">

### Author: ![Varinder](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/varinder/32/123243_2.png) [@Varinder](https://discuss.elastic.co/u/Varinder)
#### Post date: [January 10, 2024, 4:41am UTC](https://discuss.elastic.co/t/elastic-search-8-7-1-cluster-is-not-forming-here-is-yml-and-command-to-create-a-token-run-on-centos7/350613/5 "2024-01-10T04:41:15Z")

</div>

Got it,  
Thanks @leandrojmp for your your valuable answer.

How can I edit my post , I have tried but it did not work now.  
If I can’t edit then how can I delete my post .

Thanks

---

<div class="post-metadata">

### Author: ![Varinder](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/varinder/32/123243_2.png) [@Varinder](https://discuss.elastic.co/u/Varinder)
#### Post date: [January 10, 2024, 4:45pm UTC](https://discuss.elastic.co/t/elastic-search-8-7-1-cluster-is-not-forming-here-is-yml-and-command-to-create-a-token-run-on-centos7/350613/6 "2024-01-10T16:45:41Z")

</div>

Please delete this post. I dont know how can i contact this page officials.

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [January 10, 2024, 5:29pm UTC](https://discuss.elastic.co/t/elastic-search-8-7-1-cluster-is-not-forming-here-is-yml-and-command-to-create-a-token-run-on-centos7/350613/7 "2024-01-10T17:29:17Z")

</div>

We can just keep the discussion here in case someone else is having a similar question.  
Would that be ok for you?

---

<div class="post-metadata">

### Author: ![Varinder](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/varinder/32/123243_2.png) [@Varinder](https://discuss.elastic.co/u/Varinder)
#### Post date: [January 10, 2024, 5:48pm UTC](https://discuss.elastic.co/t/elastic-search-8-7-1-cluster-is-not-forming-here-is-yml-and-command-to-create-a-token-run-on-centos7/350613/8 "2024-01-10T17:48:04Z")

</div>

I have no problem in that . Actually I want to edit one line then I am ok with this I post.  
Can you please help me in editing this ?

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [January 10, 2024, 6:11pm UTC](https://discuss.elastic.co/t/elastic-search-8-7-1-cluster-is-not-forming-here-is-yml-and-command-to-create-a-token-run-on-centos7/350613/9 "2024-01-10T18:11:46Z")

</div>

I think it needs another level to be able to edit a post. As you just joined, that might explain.

Could you tell me what needs to be changed?  
You can send me a private message (by clicking on my name I think).

---

<div class="post-metadata">

### Author: ![Varinder](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/varinder/32/123243_2.png) [@Varinder](https://discuss.elastic.co/u/Varinder)
#### Post date: [January 10, 2024, 7:10pm UTC](https://discuss.elastic.co/t/elastic-search-8-7-1-cluster-is-not-forming-here-is-yml-and-command-to-create-a-token-run-on-centos7/350613/10 "2024-01-10T19:10:56Z")

</div>

Thanks @dadoonet ,  
Just sent you an email.

---

<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: [February 7, 2024, 7:11pm UTC](https://discuss.elastic.co/t/elastic-search-8-7-1-cluster-is-not-forming-here-is-yml-and-command-to-create-a-token-run-on-centos7/350613/11 "2024-02-07T19:11:01Z")

</div>

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