# Can't connect kibana to elasticsearch though https

**URL:** <https://discuss.elastic.co/t/cant-connect-kibana-to-elasticsearch-though-https/189875>\
**Category:** Kibana\
**Tags:** docker\
**Created:** [July 10, 2019, 9:23pm UTC](https://discuss.elastic.co/t/cant-connect-kibana-to-elasticsearch-though-https/189875 "2019-07-10T21:23:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hjsjar](https://avatars.discourse-cdn.com/v4/letter/h/db5fbb/32.png) [@hjsjar](https://discuss.elastic.co/u/hjsjar)\
**Post date:** [July 10, 2019, 9:23pm UTC](https://discuss.elastic.co/t/cant-connect-kibana-to-elasticsearch-though-https/189875/1 "2019-07-10T21:23:09Z")

</div>

I have an elasticsearch cluster running on aws, ive enabled transport ssl to encrypt internode communications and the cluster is behind a load balancer that enforces ssl for external communications

I'm trying to run a local kibana container with the following configuration

```
elasticsearch.hosts: ["https://xxxxxx.com"]
elasticsearch.username: "kibana"
elasticsearch.password: "xxxxxxxxxxxxxxxxx"
elasticsearch.ssl.verificationMode: certificate
elasticsearch.ssl.certificateAuthorities: /usr/share/kibana/config/certificates/ca.pem

```

I have tested the certificate using curl as follows:

`curl --cacert ca.pem -X GET "https://xxxxx.com/_cluster/health" -ukibana:xxxxxx`

and i get success response from the cluster

When I start the kibana container i get the following logs, and if i try

```
curl localhost:5601 

```

I get connection reset by peer

```
  log [19:53:34.089] [warning][reporting] Generating a random key for xpack.reporting.encryptionKey. To prevent pending reports from failing on restart, please set xpack.reporting.encryptionKey in kibana.yml
  log [19:53:34.146] [info][status][plugin:reporting@7.1.1] Status changed from uninitialized to green - Ready
  log [19:53:36.226] [info][listening] Server running at http://localhost:5601
  log [19:53:36.524] [info][status][plugin:spaces@7.1.1] Status changed from red to green - Ready
```

---

<div class="post-metadata">

**Author:** ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)\
**Post date:** [July 12, 2019, 9:34am UTC](https://discuss.elastic.co/t/cant-connect-kibana-to-elasticsearch-though-https/189875/2 "2019-07-12T09:34:40Z")

</div>

Do you have more logs in kibana? From that list it shows that nothing is really wrong in Kibana.

---

<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:** [August 9, 2019, 9:34am UTC](https://discuss.elastic.co/t/cant-connect-kibana-to-elasticsearch-though-https/189875/3 "2019-08-09T09:34:42Z")

</div>

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