# Setup Elasticsearch and Kibana on the same server with TLS/SSL

**URL:** <https://discuss.elastic.co/t/setup-elasticsearch-and-kibana-on-the-same-server-with-tls-ssl/214012>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security\
**Created:** [January 7, 2020, 9:25am UTC](https://discuss.elastic.co/t/setup-elasticsearch-and-kibana-on-the-same-server-with-tls-ssl/214012 "2020-01-07T09:25:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![HrDahl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hrdahl/32/60408_2.png) [@HrDahl](https://discuss.elastic.co/u/HrDahl)\
**Post date:** [January 7, 2020, 9:25am UTC](https://discuss.elastic.co/t/setup-elasticsearch-and-kibana-on-the-same-server-with-tls-ssl/214012/1 "2020-01-07T09:25:28Z")

</div>

I have tried for the past week to get ES and Kibana working over https on the same server with proper DNS names. 😕

I am using a wildcard certificate for everything e.g. ES DNS, Kibana DNS and server certificate.

I have succesfully setup ES with https and I am able to connect to it from outside the server with my DNS name specified in the certificate. The problem occurs when I am trying to run Kibana.. it seems it does not want to connect to ES over https (even though it is on the same server).

Can anyone see what I am doing wrong?

**Elasticsearch.yml**

```
bootstrap.memory_lock: true
network.host: 0.0.0.0
node.name: node-syst
path.data: F:\Elasticsearch\Data
path.logs: F:\Elasticsearch\Logs

xpack.license.self_generated.type: basic
xpack.security.enabled: true

xpack.security.http.ssl.enabled: true
xpack.security.http.ssl.key: certs/wildcard_cert.key
xpack.security.http.ssl.certificate: certs/wildcard_cert.crt
xpack.security.http.ssl.certificate_authorities: certs/wildcard_cert.ca.crt

xpack.security.transport.ssl.enabled: true
xpack.security.transport.ssl.verification_mode: certificate
xpack.security.transport.ssl.key: certs/wildcard_cert.key
xpack.security.transport.ssl.certificate: certs/wildcard_cert.crt
xpack.security.transport.ssl.certificate_authorities: certs/wildcard_cert.ca.crt

discovery.seed_hosts: node-syst.sigmaestimates.com

```

**Kibana.yml**

```
server.name: kibana-syst
server.ssl.enabled: true
server.ssl.key: certs/wildcard_cert.key
server.ssl.certificate: certs/wildcard_cert.crt
xpack_security_enabled: true
elasticsearch.hosts: https://node-syst.sigmaestimates.com:9200
elasticsearch.username: "kibana"
elasticsearch.password: "XieS0gMFB9NIUKdMiI91"
elasticsearch.ssl.certificate: certs/wildcard_cert.crt
elasticsearch.ssl.key: certs/wildcard_cert.key
elasticsearch.ssl.certificateAuthorities: ["certs/wildcard_cert.ca.crt"]
elasticsearch.ssl.verificationMode: certificate

```

**Kibana log:**

```
  log [09:03:57.842] [info][plugins-system] Starting [8] plugins: [security,licensing,code,timelion,features,spaces,translations,data]
  log [09:03:57.889] [error][data][elasticsearch] Request error, retrying GET https://node-syst.sigmaestimates.com:9200/_xpack => unable to get issuer certificate
  log [09:03:57.983] [error][admin][elasticsearch] Request error, retrying GET https://node-syst.sigmaestimates.com:9200/.kibana => unable to get issuer certificate
  log [09:03:57.999] [warning][data][elasticsearch] Unable to revive connection: https://node-syst.sigmaestimates.com:9200/
  log [09:03:58.014] [warning][data][elasticsearch] No living connections
  log [09:03:58.014] [warning][licensing][plugins] License information could not be obtained from Elasticsearch for the [data] cluster. Error: No Living connections
  log [09:03:58.014] [error][admin][elasticsearch] Request error, retrying GET https://node-syst.sigmaestimates.com:9200/.kibana_task_manager => unable to get issuer certificate
  log [09:03:58.062] [warning][admin][elasticsearch] Unable to revive connection: https://node-syst.sigmaestimates.com:9200/
  log [09:03:58.062] [warning][admin][elasticsearch] No living connections
  log [09:03:58.062] [warning][migrations] Unable to connect to Elasticsearch. Error: No Living connections
  log [09:03:58.108] [warning][admin][elasticsearch] Unable to revive connection: https://node-syst.sigmaestimates.com:9200/
  log [09:03:58.108] [warning][admin][elasticsearch] No living connections
  log [09:04:00.606] [warning][admin][elasticsearch] Unable to revive connection: https://node-syst.sigmaestimates.com:9200/
  log [09:04:00.622] [warning][admin][elasticsearch] No living connections
  log [09:04:00.653] [warning][admin][elasticsearch] Unable to revive connection: https://node-syst.sigmaestimates.com:9200/
  log [09:04:00.653] [warning][admin][elasticsearch] No living connections

```

**Elasticsearch log:**

```
[2020-01-07T09:02:45,799][INFO][o.e.d.DiscoveryModule] [node-syst] using discovery type [zen] and seed hosts providers [settings]
[2020-01-07T09:02:47,533][INFO][o.e.n.Node] [node-syst] initialized
[2020-01-07T09:02:47,533][INFO][o.e.n.Node] [node-syst] starting ...
[2020-01-07T09:02:47,939][INFO][o.e.t.TransportService] [node-syst] publish_address {10.1.0.4:9300}, bound_addresses {[::]:9300}
[2020-01-07T09:02:48,330][INFO][o.e.b.BootstrapChecks] [node-syst] bound or publishing to a non-loopback address, enforcing bootstrap checks
[2020-01-07T09:02:48,330][INFO][o.e.c.c.Coordinator] [node-syst] cluster UUID [KRcR7wptQd2qpNIG7XYz3g]
[2020-01-07T09:02:50,642][INFO][o.e.c.s.MasterService] [node-syst] elected-as-master ([1] nodes joined)[{node-syst}{YjVR-WUtSJ2POC-HxSVqfA}{c10k4Sg8TnCLJWlRZrxpVg}{10.1.0.4}{10.1.0.4:9300}{dilm}{ml.machine_memory=8588939264, xpack.installed=true, ml.max_open_jobs=20} elect leader, _BECOME_MASTER_TASK_, _FINISH_ELECTION_], term: 10, version: 73, delta: master node changed {previous [], current [{node-syst}{YjVR-WUtSJ2POC-HxSVqfA}{c10k4Sg8TnCLJWlRZrxpVg}{10.1.0.4}{10.1.0.4:9300}{dilm}{ml.machine_memory=8588939264, xpack.installed=true, ml.max_open_jobs=20}]}
[2020-01-07T09:02:50,971][INFO][o.e.c.s.ClusterApplierService] [node-syst] master node changed {previous [], current [{node-syst}{YjVR-WUtSJ2POC-HxSVqfA}{c10k4Sg8TnCLJWlRZrxpVg}{10.1.0.4}{10.1.0.4:9300}{dilm}{ml.machine_memory=8588939264, xpack.installed=true, ml.max_open_jobs=20}]}, term: 10, version: 73, reason: Publication{term=10, version=73}
[2020-01-07T09:02:51,424][INFO][o.e.h.AbstractHttpServerTransport] [node-syst] publish_address {10.1.0.4:9200}, bound_addresses {[::]:9200}
[2020-01-07T09:02:51,424][INFO][o.e.n.Node] [node-syst] started
[2020-01-07T09:02:51,752][INFO][o.e.l.LicenseService] [node-syst] license [488a9dde-99fa-44a2-aabb-337aab7b0cf3] mode [basic] - valid
[2020-01-07T09:02:51,752][INFO][o.e.x.s.s.SecurityStatusChangeListener] [node-syst] Active license is now [BASIC]; Security is enabled
[2020-01-07T09:02:51,783][INFO][o.e.g.GatewayService] [node-syst] recovered [4] indices into cluster_state
```

---

<div class="post-metadata">

**Author:** ![elasticforme](https://avatars.discourse-cdn.com/v4/letter/e/f05b48/32.png) [@elasticforme](https://discuss.elastic.co/u/elasticforme)\
**Post date:** [January 7, 2020, 6:44pm UTC](https://discuss.elastic.co/t/setup-elasticsearch-and-kibana-on-the-same-server-with-tls-ssl/214012/2 "2020-01-07T18:44:09Z")

</div>

I followed this artical. it took me while but it did worked. it was just test though

[https://www.elastic.co/blog/configuring-ssl-tls-and-https-to-secure-elasticsearch-kibana-beats-and-logstash](https://www.elastic.co/blog/configuring-ssl-tls-and-https-to-secure-elasticsearch-kibana-beats-and-logstash)

may be you need to put full path for all .crt and .key.  
that is the only difference I see on my test setup and your kibana config.

plus I didn't had following two line in my kibana.yml file  
elasticsearch.ssl.certificate: certs/wildcard\_cert.crt  
elasticsearch.ssl.key: certs/wildcard\_cert.key

---

<div class="post-metadata">

**Author:** ![TimV](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timv/32/13162_2.png) [@TimV](https://discuss.elastic.co/u/TimV)\
**Post date:** [January 8, 2020, 6:51am UTC](https://discuss.elastic.co/t/setup-elasticsearch-and-kibana-on-the-same-server-with-tls-ssl/214012/4 "2020-01-08T06:51:19Z")

</div>

It would appear that the `certs/wildcard_cert.ca.crt` file you are using in Kibana is not the actual issuing certificate chain for the `certs/wildcard_cert.crt` certificate you have configured in Elasticsearch.

Where did these certificates come from, and what is the connection between them?

---

<div class="post-metadata">

**Author:** ![HrDahl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hrdahl/32/60408_2.png) [@HrDahl](https://discuss.elastic.co/u/HrDahl)\
**Post date:** [January 8, 2020, 9:57am UTC](https://discuss.elastic.co/t/setup-elasticsearch-and-kibana-on-the-same-server-with-tls-ssl/214012/6 "2020-01-08T09:57:04Z")

</div>

Okay so you were right Tim 🙂

I tried to reissue my certificates and reinstall them on the server. Now Kibana can connect to ES! Hurray!

The only issue now is that I can not connect to Kibana from outside the server.

**EDIT**  
I solved it by changing the server.name to full DNS name and server.host to 0.0.0.0 in kibana.yml

---

<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:** [February 5, 2020, 9:57am UTC](https://discuss.elastic.co/t/setup-elasticsearch-and-kibana-on-the-same-server-with-tls-ssl/214012/7 "2020-02-05T09:57:13Z")

</div>

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