# HTTPS TLS Error: SSL\_CTX\_use\_certificate\_chain

**URL:** <https://discuss.elastic.co/t/https-tls-error-ssl-ctx-use-certificate-chain/149190>\
**Category:** Kibana\
**Created:** [September 19, 2018, 8:38pm UTC](https://discuss.elastic.co/t/https-tls-error-ssl-ctx-use-certificate-chain/149190 "2018-09-19T20:38:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matt\_Vasquez](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/matt_vasquez/32/22088_2.png) [@Matt\_Vasquez](https://discuss.elastic.co/u/Matt_Vasquez)\
**Post date:** [September 19, 2018, 8:38pm UTC](https://discuss.elastic.co/t/https-tls-error-ssl-ctx-use-certificate-chain/149190/1 "2018-09-19T20:38:09Z")

</div>

I am running Elastic Stack 6.4 (Single Node Elasticsearch and Single Node Kibana) on Windows Server 2008 R2.

I have generated a CSR and had it signed by my local CA. I have elasticsearch working with HTTPS TLS just fine. I am usiing the same cert for both elasticsearch and kibana since they reside on the same server. Kibana gives me the following error when trying to use HTTPS TLS:

```
log [20:13:39.051] [debug][server] starting server :tada:
  log [20:13:39.054] [debug][http] registering route handler for [/core]
 error [20:13:39.088] [error][root] Error: SSL_CTX_use_certificate_chain
    at Object.createSecureContext (_tls_common.js:88:17)
    at Server (_tls_wrap.js:805:25)
    at new Server (https.js:54:14)
    at Object.createServer (https.js:76:10)
    at module.exports.internals.Core._createListener (E:\Elastic Stack\Kibana\node_modules\hapi-latest\lib\core.js:493:79)
    at new module.exports.internals.Core (E:\Elastic Stack\Kibana\node_modules\hapi-latest\lib\core.js:110:30)
    at new module.exports (E:\Elastic Stack\Kibana\node_modules\hapi-latest\lib\server.js:25:18)
    at Object.createServer (E:\Elastic Stack\Kibana\src\core\server\http\http_tools.js:70:20)
    at HttpServer.start (E:\Elastic Stack\Kibana\src\core\server\http\http_server.js:39:36)
    at HttpService.start (E:\Elastic Stack\Kibana\src\core\server\http\http_service.js:45:31)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
  log [20:13:39.105] [debug][server] stopping server
  log [20:13:39.109] [info][server][http] stopping http server
  log [20:13:39.125] [info][server][http][redirect] stopping HTTPS redirect server
  ops [20:13:39.380] memory: 160.5MB uptime: 0:00:26 load: [0.00 0.00 0.00] delay: 401.116
  log [20:13:39.392] [debug][kibana-monitoring][monitoring-ui] Received Kibana Ops event data
 error [20:13:39.395] [fatal] Error: SSL_CTX_use_certificate_chain
    at Object.createSecureContext (_tls_common.js:88:17)
    at Server (_tls_wrap.js:805:25)
    at new Server (https.js:54:14)
    at Object.createServer (https.js:76:10)
    at module.exports.internals.Core._createListener (E:\Elastic Stack\Kibana\node_modules\hapi-latest\lib\core.js:493:79)
    at new module.exports.internals.Core (E:\Elastic Stack\Kibana\node_modules\hapi-latest\lib\core.js:110:30)
    at new module.exports (E:\Elastic Stack\Kibana\node_modules\hapi-latest\lib\server.js:25:18)
    at Object.createServer (E:\Elastic Stack\Kibana\src\core\server\http\http_tools.js:70:20)
    at HttpServer.start (E:\Elastic Stack\Kibana\src\core\server\http\http_server.js:39:36)
    at HttpService.start (E:\Elastic Stack\Kibana\src\core\server\http\http_service.js:45:31)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
FATAL { Error: SSL_CTX_use_certificate_chain
    at Object.createSecureContext (_tls_common.js:88:17)
    at Server (_tls_wrap.js:805:25)
    at new Server (https.js:54:14)
    at Object.createServer (https.js:76:10)
    at module.exports.internals.Core._createListener (E:\Elastic Stack\Kibana\node_modules\hapi-latest\lib\core.js:493:79)
    at new module.exports.internals.Core (E:\Elastic Stack\Kibana\node_modules\hapi-latest\lib\core.js:110:30)
    at new module.exports (E:\Elastic Stack\Kibana\node_modules\hapi-latest\lib\server.js:25:18)
    at Object.createServer (E:\Elastic Stack\Kibana\src\core\server\http\http_tools.js:70:20)
    at HttpServer.start (E:\Elastic Stack\Kibana\src\core\server\http\http_server.js:39:36)
    at HttpService.start (E:\Elastic Stack\Kibana\src\core\server\http\http_service.js:45:31)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
  cause: Error: SSL_CTX_use_certificate_chain
    at Object.createSecureContext (_tls_common.js:88:17)
    at Server (_tls_wrap.js:805:25)
    at new Server (https.js:54:14)
    at Object.createServer (https.js:76:10)
    at module.exports.internals.Core._createListener (E:\Elastic Stack\Kibana\node_modules\hapi-latest\lib\core.js:493:79)
    at new module.exports.internals.Core (E:\Elastic Stack\Kibana\node_modules\hapi-latest\lib\core.js:110:30)
    at new module.exports (E:\Elastic Stack\Kibana\node_modules\hapi-latest\lib\server.js:25:18)
    at Object.createServer (E:\Elastic Stack\Kibana\src\core\server\http\http_tools.js:70:20)
    at HttpServer.start (E:\Elastic Stack\Kibana\src\core\server\http\http_server.js:39:36)
    at HttpService.start (E:\Elastic Stack\Kibana\src\core\server\http\http_service.js:45:31)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7),
  isOperational: true }

```

Here is my kibana.yml config file:  
server.port: 5601  
server.host: "prodserver"  
server.maxPayloadBytes: 1048576  
elasticsearch.url: "[https://prodserver:9200](https://prodserver:9200)"  
kibana.index: ".kibana"  
kibana.defaultAppId: "home"  
elasticsearch.username: "kibana"  
elasticsearch.password: "**"  
server.ssl.enabled: true  
server.ssl.certificate: E:\Elastic Stack\Kibana\config\certs\server.crt  
server.ssl.key: E:\Elastic Stack\Kibana\config\certs\server.key  
server.ssl.keyPassphrase: "**"  
elasticsearch.pingTimeout: 1500  
elasticsearch.requestTimeout: 30000  
elasticsearch.requestHeadersWhitelist: [authorization]  
elasticsearch.customHeaders: {}  
elasticsearch.shardTimeout: 30000  
elasticsearch.startupTimeout: 5000  
elasticsearch.logQueries: false  
logging.dest: stdout  
logging.silent: false  
logging.quiet: false  
logging.verbose: true  
ops.interval: 5000  
i18n.defaultLocale: "en"  
xpack.security.encryptionKey: "\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*"  
xpack.security.sessionTimeout: 900000

---

<div class="post-metadata">

**Author:** ![Matt\_Vasquez](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/matt_vasquez/32/22088_2.png) [@Matt\_Vasquez](https://discuss.elastic.co/u/Matt_Vasquez)\
**Post date:** [September 19, 2018, 9:03pm UTC](https://discuss.elastic.co/t/https-tls-error-ssl-ctx-use-certificate-chain/149190/2 "2018-09-19T21:03:34Z")

</div>

Got it working... there was a blank line right before the " -----END CERTIFICATE-----" took it out and it works now without error

---

<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:** [October 17, 2018, 9:03pm UTC](https://discuss.elastic.co/t/https-tls-error-ssl-ctx-use-certificate-chain/149190/3 "2018-10-17T21:03:37Z")

</div>

Closed on October 17, 2018, 9:03pm UTC

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