# SSL(curl) connection error in ElasticSearch setup

**URL:** <https://discuss.elastic.co/t/ssl-curl-connection-error-in-elasticsearch-setup/318137>\
**Category:** Elasticsearch\
**Tags:** docker\
**Created:** [November 3, 2022, 8:44pm UTC](https://discuss.elastic.co/t/ssl-curl-connection-error-in-elasticsearch-setup/318137 "2022-11-03T20:44:45Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Boodle](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/boodle/32/86046_2.png) [@Boodle](https://discuss.elastic.co/u/Boodle)\
**Post date:** [November 3, 2022, 10:15pm UTC](https://discuss.elastic.co/t/ssl-curl-connection-error-in-elasticsearch-setup/318137/5 "2022-11-03T22:15:40Z")

</div>

> [@warkolm](#):
>
> You need to use port 9200 in the container, or 9216

Recieves below error when trying to use 9200 or 9216 on http/s

```auto
sudo curl -X GET 'https://localhost:9200'
curl: (7) Failed connect to localhost:9200; Connection refused

sudo curl -X GET 'https://localhost:9216'
curl: (35) Encountered end of file

```

Error when trying to set password with 9200 is mentioned here: [Master\_not\_discovered\_exception error while setting up passwords for user](https://discuss.elastic.co/t/master-not-discovered-exception-error-while-setting-up-passwords-for-user/318079)

---

_[View the full topic](https://discuss.elastic.co/t/ssl-curl-connection-error-in-elasticsearch-setup/318137)._
