# How to re-generate certificate for nodes elasticsearch to enable xpack

**URL:** <https://discuss.elastic.co/t/how-to-re-generate-certificate-for-nodes-elasticsearch-to-enable-xpack/262554>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security\
**Created:** [January 28, 2021, 7:31pm UTC](https://discuss.elastic.co/t/how-to-re-generate-certificate-for-nodes-elasticsearch-to-enable-xpack/262554 "2021-01-28T19:31:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![testsemd\_email](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/testsemd_email/32/82657_2.png) [@testsemd\_email](https://discuss.elastic.co/u/testsemd_email)\
**Post date:** [January 28, 2021, 7:31pm UTC](https://discuss.elastic.co/t/how-to-re-generate-certificate-for-nodes-elasticsearch-to-enable-xpack/262554/1 "2021-01-28T19:31:16Z")

</div>

How to re-generate certificate for nodes elasticsearch after the password is generated for elastic cluster.  
I re-generated the certificate for nodes, got the error  
"client did not trust this server's certificate, closing connection Netty4TcpChannel{localAddress"

Is there way to re-generate certificates for nodes?  
I used "bin/elasticsearch-certutil ca" and "bin/elasticsearch-certutil cert --ca elastic-stack-ca.p12 --dns localhost --ip 192.168.21.12 --out config/certs/node1.p12"

Thank You!

---

<div class="post-metadata">

**Author:** ![TimV](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timv/32/13162_2.png) [@TimV](https://discuss.elastic.co/u/TimV)\
**Post date:** [January 29, 2021, 5:50am UTC](https://discuss.elastic.co/t/how-to-re-generate-certificate-for-nodes-elasticsearch-to-enable-xpack/262554/2 "2021-01-29T05:50:19Z")

</div>

Can you clarify what you're trying to do here?  
I don't really follow what you're asking.

Do you want to replace all the certificates in an existing cluster?

---

<div class="post-metadata">

**Author:** ![testsemd\_email](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/testsemd_email/32/82657_2.png) [@testsemd\_email](https://discuss.elastic.co/u/testsemd_email)\
**Post date:** [January 29, 2021, 7:07am UTC](https://discuss.elastic.co/t/how-to-re-generate-certificate-for-nodes-elasticsearch-to-enable-xpack/262554/3 "2021-01-29T07:07:39Z")

</div>

yes...I want to replace all nodes' certificates by re-generating all certificates.  
Is it possible to do?

Thank You!

---

<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 26, 2021, 7:08am UTC](https://discuss.elastic.co/t/how-to-re-generate-certificate-for-nodes-elasticsearch-to-enable-xpack/262554/4 "2021-02-26T07:08:17Z")

</div>

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