HTTPS TLS Error: SSL_CTX_use_certificate_chain


(Matt Vasquez) #1

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"
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


(Matt Vasquez) #2

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


(system) #3

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