# Can't connect to elasticsearch over ssl

**URL:** <https://community.temporal.io/t/cant-connect-to-elasticsearch-over-ssl/215>\
**Category:** Community Support\
**Created:** [July 18, 2020, 2:27am UTC](https://community.temporal.io/t/cant-connect-to-elasticsearch-over-ssl/215 "2020-07-18T02:27:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![KyleNightfall](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/kylenightfall/32/95_2.png) [@KyleNightfall](https://community.temporal.io/u/KyleNightfall)\
**Post date:** [July 18, 2020, 2:27am UTC](https://community.temporal.io/t/cant-connect-to-elasticsearch-over-ssl/215/1 "2020-07-18T02:27:55Z")

</div>

I’m not able to connect to elasticsearch over https. The temporal helm chart has a property for scheme which makes it seem like https would be supported, but my services won’t start up because they hang on wait\_for\_es in the start script.

Looking at how the client is created in temporal I think https would probably work there, but looking in start.sh I see that http is hard coded in some places. I think this is a bug, but I wanted to make sure there wasn’t anything I was missing 🙂

---

<div class="post-metadata">

**Author:** ![markmark](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/markmark/32/88_2.png) [@markmark](https://community.temporal.io/u/markmark)\
**Post date:** [July 18, 2020, 6:18am UTC](https://community.temporal.io/t/cant-connect-to-elasticsearch-over-ssl/215/3 "2020-07-18T06:18:07Z")

</div>

Hey Kyle,

Thank you for the report. Your analysis makes perfect sense, thank you!

I created a github issue for this –

> <https://github.com/temporalio/temporal/issues/562>
>
> Is your feature request related to a problem? Please describe.
> From a customer report (thank you, Kyle!)
> "I’m not able to connect to...

and prepared code changes:

> <https://github.com/temporalio/temporal/pull/563>

  

> <https://github.com/temporalio/helm-charts/pull/49>

I tested that the scheme setting actually takes effect, but I have yet to test that httpS connections actually succeed (I didn’t have an instance of ElasticSearch + https handy).

If you get a chance to try this, I would be interested if this works for you!

Thank you!  
Mark.

---

<div class="post-metadata">

**Author:** ![KyleNightfall](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/kylenightfall/32/95_2.png) [@KyleNightfall](https://community.temporal.io/u/KyleNightfall)\
**Post date:** [July 20, 2020, 10:59pm UTC](https://community.temporal.io/t/cant-connect-to-elasticsearch-over-ssl/215/4 "2020-07-20T22:59:46Z")

</div>

Well, at least initially, this seems to be failing. The start script does work. Checking elasticsearch I can see it created an index. But Temporal crashes on startup with this error:

```
2020/07/20 22:38:15 error creating elastic search client: context deadline exceeded

{"acknowledged":true}{"error":{"root_cause":[{"type":"resource_already_exists_exception","reason":"index [temporal-visibility-dev/ItLz16j-QJOxwYEhlLm0Mg] already exists","index_uuid":"ItLz16j-QJOxwYEhlLm0Mg","index":"temporal-visibility-dev"}],"type":"resource_already_exists_exception","reason":"index [temporal-visibility-dev/ItLz16j-QJOxwYEhlLm0Mg] already exists","index_uuid":"ItLz16j-QJOxwYEhlLm0Mg","index":"temporal-visibility-dev"},"status":400}

```

I’m still troubleshooting it, I’ll let you know if I find anything. I’m having trouble getting the config or environment of my container because it keeps dying.
