# Kibana issue with PEM format

**URL:** https://discuss.elastic.co/t/kibana-issue-with-pem-format/246356
**Category:** Kibana
**Tags:** elastic-stack-security
**Created:** [August 25, 2020, 8:24pm UTC](https://discuss.elastic.co/t/kibana-issue-with-pem-format/246356 "2020-08-25T20:24:01Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![ManuelF](https://avatars.discourse-cdn.com/v4/letter/m/e99b99/32.png) [@ManuelF](https://discuss.elastic.co/u/ManuelF)
#### Post date: [August 25, 2020, 8:24pm UTC](https://discuss.elastic.co/t/kibana-issue-with-pem-format/246356/1 "2020-08-25T20:24:01Z")

</div>

\*Running ELK 7.9

Apparently Kibana is not being able to read/parse certificate/key files in PEM format. These file where generated via `/usr/share/elasticsearch/bin/elasticsearch-certutil csr` , so it should work like a charm, but instead I am getting the following error:

`{"type":"log","@timestamp":"2020-08-25T20:09:08Z","tags":["fatal","root"],"pid":14464,"message":"Error: error:0909006C:PEM routines:get_name:no start line\n at Object.createSecureContext (_tls_common.js:135:17)\n at Server (_tls_wrap.js:903:27)\n at new Server (https.js:62:14)\n at Object.createServer (https.js:85:10)\n at module.exports.internals.Core._createListener (/usr/share/kibana/node_modules/hapi/lib/core.js:491:79)\n at new module.exports.internals.Core (/usr/share/kibana/node_modules/hapi/lib/core.js:112:30)\n at new module.exports (/usr/share/kibana/node_modules/hapi/lib/server.js:25:18)\n at createServer (/usr/share/kibana/src/core/server/http/http_tools.js:110:18)\n at HttpServer.setup (/usr/share/kibana/src/core/server/http/http_server.js:84:48)\n at HttpService.runNotReadyServer (/usr/share/kibana/src/core/server/http/http_service.js:162:26)\n at HttpService.setup (/usr/share/kibana/src/core/server/http/http_service.js:78:18)"}`

My kibana.yml:

```
server.ssl.enabled: true
server.ssl.certificate: "/etc/kibana/certs/kibana-server.csr"
server.ssl.key: "/etc/kibana/certs/kibana-server.key"
elasticsearch.ssl.certificateAuthorities: ["/etc/kibana/certs/elastic-stack-ca.p12"]
elasticsearch.ssl.verificationMode: certificate

```

Steps:

[https://www.elastic.co/guide/en/elasticsearch/reference/7.9/configuring-tls.html#tls-http](https://www.elastic.co/guide/en/elasticsearch/reference/7.9/configuring-tls.html#tls-http)  
[https://www.elastic.co/guide/en/kibana/7.9/configuring-tls.html](https://www.elastic.co/guide/en/kibana/7.9/configuring-tls.html)

Am I doing something wrong?  
Please help!

Thank you

---

<div class="post-metadata">

### Author: ![ManuelF](https://avatars.discourse-cdn.com/v4/letter/m/e99b99/32.png) [@ManuelF](https://discuss.elastic.co/u/ManuelF)
#### Post date: [August 25, 2020, 9:01pm UTC](https://discuss.elastic.co/t/kibana-issue-with-pem-format/246356/2 "2020-08-25T21:01:38Z")

</div>

**Update:**

I was able to confirm that Kibana support PKCS#12 format, so I won't need the PEM format.

> [@Certificate format for Kibana](https://discuss.elastic.co/t/certificate-format-for-kibana/246329):
>
> Hi, Note: Running ELK 7.9 I am trying to configure TLS in Kibana to try out the Alerts beta feature. By following the [official documentation](https://www.elastic.co/guide/en/kibana/7.9/configuring-tls.html), the bin/elasticsearch-certutil csr tool will generate a cert in PEM format, but in the same article (step 2.b) it looks like I could (somehow) generate the cert in PKCS#12 format. Also in the same article you can find the following in the 3rd paragraph: Kibana supports certificates and private keys in PEM or PKCS#12 format In this other [thread](https://discuss.elastic.co/t/why-does-elasticsearch-use-pkcs-12-while-kibana-needs-pem/161756/2) is exp…

I believe there's still an issue with the PEM format and Kibana that might be affecting other users, so ELK team, please feel free to just close this thread or to continue investigating for those who might need a solution.

Thank you

---

<div class="post-metadata">

### Author: ![ikakavas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ikakavas/32/34430_2.png) [@ikakavas](https://discuss.elastic.co/u/ikakavas)
#### Post date: [August 25, 2020, 9:38pm UTC](https://discuss.elastic.co/t/kibana-issue-with-pem-format/246356/3 "2020-08-25T21:38:08Z")

</div>

Glad you got this working! Also note that you were trying to use a CSR file which is not a certificate, but a a certificate signing request ( I.e. something that you would provide to your CA in order to get back a certificate ) and this is why you were getting the error above.

---

<div class="post-metadata">

### Author: ![ManuelF](https://avatars.discourse-cdn.com/v4/letter/m/e99b99/32.png) [@ManuelF](https://discuss.elastic.co/u/ManuelF)
#### Post date: [August 26, 2020, 12:34pm UTC](https://discuss.elastic.co/t/kibana-issue-with-pem-format/246356/4 "2020-08-26T12:34:30Z")

</div>

I did not notice that little detail. 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: [September 23, 2020, 12:34pm UTC](https://discuss.elastic.co/t/kibana-issue-with-pem-format/246356/5 "2020-09-23T12:34:32Z")

</div>

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