# How to run curl with Basic Security ( TLS / HTTPS )

**URL:** <https://discuss.elastic.co/t/how-to-run-curl-with-basic-security-tls-https/309479>\
**Category:** Elasticsearch\
**Created:** [July 13, 2022, 6:26am UTC](https://discuss.elastic.co/t/how-to-run-curl-with-basic-security-tls-https/309479 "2022-07-13T06:26:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Atul\_Chadha](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/atul_chadha/32/75469_2.png) [@Atul\_Chadha](https://discuss.elastic.co/u/Atul_Chadha)\
**Post date:** [July 13, 2022, 6:26am UTC](https://discuss.elastic.co/t/how-to-run-curl-with-basic-security-tls-https/309479/1 "2022-07-13T06:26:03Z")

</div>

I have configured elasticsearch 7.17 to use TLS and HTTPS and trying to run curl commands to get index stats.

The response i get is `curl: (52) Empty reply from server`. I am debugging an issue wherein post TLS implementation we are not getting data in Checkmk for elastic shard monitoring.

How can i run curl on TLS enabled nodes, i have tried the "-k" flag with curl however had little success.

---

<div class="post-metadata">

**Author:** ![vincenbr](https://avatars.discourse-cdn.com/v4/letter/v/8edcca/32.png) [@vincenbr](https://discuss.elastic.co/u/vincenbr)\
**Post date:** [July 13, 2022, 8:39am UTC](https://discuss.elastic.co/t/how-to-run-curl-with-basic-security-tls-https/309479/2 "2022-07-13T08:39:44Z")

</div>

Hi, are you sure you start the URL in curl with " **https** ://...." ?  
if so, can you post the complete command (except the password !) and output ?

---

<div class="post-metadata">

**Author:** ![Atul\_Chadha](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/atul_chadha/32/75469_2.png) [@Atul\_Chadha](https://discuss.elastic.co/u/Atul_Chadha)\
**Post date:** [July 14, 2022, 1:38am UTC](https://discuss.elastic.co/t/how-to-run-curl-with-basic-security-tls-https/309479/3 "2022-07-14T01:38:17Z")

</div>

I was wrongly invoking the command, didnt had the https before the hostname ( copied the same command from history when there was no https ) . Appreciate your help!

---

<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 11, 2022, 1:38am UTC](https://discuss.elastic.co/t/how-to-run-curl-with-basic-security-tls-https/309479/4 "2022-08-11T01:38:39Z")

</div>

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