# Self-signed certificate in certificate chain

**URL:** https://discuss.elastic.co/t/self-signed-certificate-in-certificate-chain/368976
**Category:** Kibana
**Tags:** elastic-stack-security
**Created:** [October 17, 2024, 7:32am UTC](https://discuss.elastic.co/t/self-signed-certificate-in-certificate-chain/368976 "2024-10-17T07:32:57Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![SamehSaeed](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/samehsaeed/32/145262_2.png) [@SamehSaeed](https://discuss.elastic.co/u/SamehSaeed)
#### Post date: [October 17, 2024, 7:32am UTC](https://discuss.elastic.co/t/self-signed-certificate-in-certificate-chain/368976/1 "2024-10-17T07:32:57Z")

</div>

Im having trouble running secure kibana on linux, i keep getting the below error :

```auto
[ERROR][elasticsearch-service] Unable to retrieve version information from Elasticsearch nodes. self-signed certificate in certificate chain

```

**ELK stack version : 8.15.2**

I'm already using the same truststore and keystore in elasticsearch and its working fine, its not self-signed so i dont know why i keep getting this error

this is my configuration : kibana.yml

```auto
server.port: 443

server.host: " ****"
elasticsearch.hosts: ["https:// **** :2810"]
elasticsearch.username: "kibana_system"
elasticsearch.password: " ****"

server.ssl.enabled: true

server.ssl.keystore.path: "/stc/ELK/kibana-8.15.2/config/certs/keystore.p12"
server.ssl.keystore.password: " ****"
server.ssl.truststore.path: "/stc/ELK/kibana-8.15.2/config/certs/cacerts.p12"
server.ssl.truststore.password: " ****"

```

I tried replacing ssl keystore & truststore with certificate and key as below :

```auto
server.ssl.certificate: "/stc/ELK/kibana-8.15.2/config/certs/uccws_ha.stc.com.sa.cer"
server.ssl.certificate.password: " ****"
server.ssl.key: "/stc/ELK/kibana-8.15.2/config/certs/uccws_ha.stc.com.sa.key"
server.ssl.key.password: " ****"
server.ssl.verificationMode: certificate

```

and got this error :

```auto
\u001b[37m\u001b[41m FATAL \u001b[49m\u001b[39m Error: [config validation of [server].ssl.certificate]: expected value of type [string] but got [Object]

```

**note : i have the same configuration (certificate and key) on another windows server and it's working fine on version 8.13.2**

---

<div class="post-metadata">

### Author: ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)
#### Post date: [October 18, 2024, 5:18am UTC](https://discuss.elastic.co/t/self-signed-certificate-in-certificate-chain/368976/2 "2024-10-18T05:18:50Z")

</div>

> [@SamehSaeed](#):
>
> ```auto
> [ERROR][elasticsearch-service] Unable to retrieve version information from Elasticsearch nodes. self-signed certificate in certificate chain
> 
> ```

This error is not related to the `server.ssl>8` settings those settings are for the kiban HTTP settings.

It mean that kibana server can not connect to elasticsearch server because you are connecting over HTTPS with a self signed cert.

You need to provide the CA for that connection or set `elasticsearch.ssl.verificationMode` to none

```auto
elasticsearch.hosts: ["https:// **** :2810"]

```

See the `elasticsearch.ssl.*` setting on this page.

> **[General settings in Kibana | Kibana](https://www.elastic.co/docs/reference/kibana/configuration-reference/general-settings)**

---

<div class="post-metadata">

### Author: ![SamehSaeed](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/samehsaeed/32/145262_2.png) [@SamehSaeed](https://discuss.elastic.co/u/SamehSaeed)
#### Post date: [October 21, 2024, 3:14am UTC](https://discuss.elastic.co/t/self-signed-certificate-in-certificate-chain/368976/3 "2024-10-21T03:14:06Z")

</div>

Thanks alot for your help, that worked!
