# Change the Certificate

**URL:** https://discuss.elastic.co/t/change-the-certificate/319804
**Category:** Elasticsearch
**Created:** [November 25, 2022, 9:28am UTC](https://discuss.elastic.co/t/change-the-certificate/319804 "2022-11-25T09:28:54Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![sa002](https://avatars.discourse-cdn.com/v4/letter/s/ed8c4c/32.png) [@sa002](https://discuss.elastic.co/u/sa002)
#### Post date: [November 25, 2022, 9:28am UTC](https://discuss.elastic.co/t/change-the-certificate/319804/1 "2022-11-25T09:28:54Z")

</div>

we have an Elasticsearch cluster with the version "7.17.5"  
The certificate has expired. I have renewed the certificate but somehow the cluster does not accept the certificate. It still has the old certificate because the error in the logs refers to the date of the old certificate.  
the configuration of the cluster is:

bootstrap.memory\_lock: true  
cluster.initial\_master\_nodes:

- gl-vn01-es.
- gl-vn02-es  
cluster.name: Graylog  
discovery.seed\_hosts:
- gl-vn01-es.
- gl-vn02-es.
- gl-vn03-es.  
http.port: 9200  
network.host: 0.0.0.0  
network.publish\_host: gl-vn01-es.  
node.name: gl-vn01-es.  
node.roles:
- data
- master  
transport.port: 9300

#################################### Paths ####################################

# Path to directory containing configuration (this file and logging.yml):

path.data: /mnt/elasticsearch

path.logs: /var/log/elasticsearch

action.auto\_create\_index: true

xpack.security.enabled: true

xpack.security.transport.ssl.enabled: true  
xpack.security.transport.ssl.verification\_mode: "certificate"  
xpack.security.transport.ssl.key: "/etc/elasticsearch/es.key"  
xpack.security.transport.ssl.certificate: "/etc/elasticsearch/es.crt"

xpack.security.http.ssl.enabled: true  
xpack.security.http.ssl.key: "/etc/elasticsearch/es.key"

the error in the logs is:

io.netty.handler.codec.DecoderException: javax.net.ssl.SSLHandshakeException: PKIX path validation failed: java.security.cert.CertPathValidatorExcep  
tion: validity check failed  
Caused by: java.security.cert.CertificateExpiredException: NotAfter: Fri Oct 21 11:55:10 CEST 2022

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [November 30, 2022, 1:12am UTC](https://discuss.elastic.co/t/change-the-certificate/319804/2 "2022-11-30T01:12:05Z")

</div>

Welcome to our community! 😃

Did you restart Elasticsearch after you replaced the certificate? If not, you need to.

---

<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: [December 28, 2022, 1:12am UTC](https://discuss.elastic.co/t/change-the-certificate/319804/3 "2022-12-28T01:12:28Z")

</div>

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