# Http request curl: (52) Empty reply from server

**URL:** <https://discuss.elastic.co/t/http-request-curl-52-empty-reply-from-server/320750>\
**Category:** Elasticsearch\
**Created:** [December 8, 2022, 6:53am UTC](https://discuss.elastic.co/t/http-request-curl-52-empty-reply-from-server/320750 "2022-12-08T06:53:40Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![hello5346](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hello5346/32/68209_2.png) [@hello5346](https://discuss.elastic.co/u/hello5346)\
**Post date:** [December 8, 2022, 6:53am UTC](https://discuss.elastic.co/t/http-request-curl-52-empty-reply-from-server/320750/1 "2022-12-08T06:53:40Z")

</div>

We started a new Elasticsearch instance of 8.4.3 and the ES is up and running but when i am trying to send an HTTP request to the server I get a reply of `curl: (52) Empty reply from server` but when I pass the certificates like `curl --cacert /etc/elasticsearch/certs/http_ca.crt --user elastic:dummy -X GET "https://10.0.0.90:9200/_cat/nodes?pretty"` I am able to get the response.

How can i get the response on just HTTP request?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [December 8, 2022, 6:57am UTC](https://discuss.elastic.co/t/http-request-curl-52-empty-reply-from-server/320750/2 "2022-12-08T06:57:34Z")

</div>

Have you tried `curl -k --user elastic:dummy -X GET "https://10.0.0.90:9200/_cat/nodes?pretty"`? As the cluster is secured you will need to use HTTPS, and plain HTTP requests will not work.

---

<div class="post-metadata">

**Author:** ![hello5346](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hello5346/32/68209_2.png) [@hello5346](https://discuss.elastic.co/u/hello5346)\
**Post date:** [December 8, 2022, 7:03am UTC](https://discuss.elastic.co/t/http-request-curl-52-empty-reply-from-server/320750/3 "2022-12-08T07:03:18Z")

</div>

I was able to get a response on HTTP via ES head on ES7.6 even though xpack is enabled.  
Is there any workaround for 8.4.3 as well such that i can access ES via HTTP even when xpack is enabled?  
Any Help is much appreciated.

I am able to get a response with `curl -k --user elastic:dummy -X GET "https://10.0.0.90:9200/_cat/nodes?pretty"`

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [December 8, 2022, 7:18am UTC](https://discuss.elastic.co/t/http-request-curl-52-empty-reply-from-server/320750/4 "2022-12-08T07:18:21Z")

</div>

> [@hello5346](#):
>
> I was able to get a response on HTTP via ES head on ES7.6 even though xpack is enabled.

Then you have not secured the cluster. I would not recommend running an unsecured cluster.

Why do you need HTTP access, which is not secure?

---

<div class="post-metadata">

**Author:** ![hello5346](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hello5346/32/68209_2.png) [@hello5346](https://discuss.elastic.co/u/hello5346)\
**Post date:** [December 8, 2022, 7:45am UTC](https://discuss.elastic.co/t/http-request-curl-52-empty-reply-from-server/320750/5 "2022-12-08T07:45:53Z")

</div>

> [@Christian\_Dahlqvist](#):
>
> Why do you need HTTP access, which is not secure?

We have enabled the security by enabling XPACK actually we have upgraded our ES cluster then from an earlier version which doesn't have an xpack.

WE want to connect to ES from ES head over a browser

---

<div class="post-metadata">

**Author:** ![hello5346](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hello5346/32/68209_2.png) [@hello5346](https://discuss.elastic.co/u/hello5346)\
**Post date:** [December 8, 2022, 7:56am UTC](https://discuss.elastic.co/t/http-request-curl-52-empty-reply-from-server/320750/6 "2022-12-08T07:56:28Z")

</div>

How can we connect to the ES over HTTPS from the java side to actually use this ES as a DB for our application

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [December 8, 2022, 8:48am UTC](https://discuss.elastic.co/t/http-request-curl-52-empty-reply-from-server/320750/7 "2022-12-08T08:48:09Z")

</div>

> [@hello5346](#):
>
> How can we connect to the ES over HTTPS from the java side to actually use this ES as a DB for our application

All official language clients support HTTPS. Have a look at the official documentation for examples.

> [@hello5346](#):
>
> WE want to connect to ES from ES head over a browser

Browsers support HTTPS so I am not sure why this would be a problem. If you are using self-signed certificates you however may need to allow this from the browser.

---

<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:** [January 5, 2023, 8:48am UTC](https://discuss.elastic.co/t/http-request-curl-52-empty-reply-from-server/320750/8 "2023-01-05T08:48:38Z")

</div>

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