# TLS error after fresh install of elastic search

**URL:** <https://discuss.elastic.co/t/tls-error-after-fresh-install-of-elastic-search/335264>\
**Category:** Elasticsearch\
**Created:** [June 6, 2023, 1:58am UTC](https://discuss.elastic.co/t/tls-error-after-fresh-install-of-elastic-search/335264 "2023-06-06T01:58:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![antarr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/antarr/32/121865_2.png) [@antarr](https://discuss.elastic.co/u/antarr)\
**Post date:** [June 6, 2023, 1:58am UTC](https://discuss.elastic.co/t/tls-error-after-fresh-install-of-elastic-search/335264/1 "2023-06-06T01:58:24Z")

</div>

I'm trying to get Elasticsearch working on Ubuntu 22. I've uninstalled it a few times but keep getting an SSL error when testing using curl. I've tried 7.17, 7.10, and 8.8.

**uninstall**

```auto
sudo apt-get remove --purge elasticsearch
sudo rm -rf /etc/elasticsearch
sudo rm -rf /var/lib/elasticsearch

```

**reinstall**

```auto
sudo apt-get install elasticsearch=7.10.1
sudo systemctl start elasticsearch
curl http://localhost:9200/

```

**error**  
`Client sent an HTTP request to an HTTPS server.`

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [June 6, 2023, 1:59am UTC](https://discuss.elastic.co/t/tls-error-after-fresh-install-of-elastic-search/335264/2 "2023-06-06T01:59:11Z")

</div>

Welcome to our community! 😃

> [@antarr](#):
>
> ```auto
> curl http://localhost:9200/
> 
> ```

> [@antarr](#):
>
> `Client sent an HTTP request to an HTTPS server.`

You need to use `curl https://localhost:9200/` 🙂

---

<div class="post-metadata">

**Author:** ![antarr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/antarr/32/121865_2.png) [@antarr](https://discuss.elastic.co/u/antarr)\
**Post date:** [June 6, 2023, 2:13am UTC](https://discuss.elastic.co/t/tls-error-after-fresh-install-of-elastic-search/335264/3 "2023-06-06T02:13:30Z")

</div>

@warkolm When I do that I get a different error `curl: (35) error:0A000438:SSL routines::tlsv1 alert internal error`

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [June 6, 2023, 2:36am UTC](https://discuss.elastic.co/t/tls-error-after-fresh-install-of-elastic-search/335264/4 "2023-06-06T02:36:34Z")

</div>

@antarr Try

`curl -k -v -u elastic:password https://localhost:9200/`

Show the response

Also you might want to look at the instructions [here](https://www.elastic.co/guide/en/elasticsearch/reference/current/rpm.html#rpm-check-running)

---

<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:** [July 4, 2023, 2:37am UTC](https://discuss.elastic.co/t/tls-error-after-fresh-install-of-elastic-search/335264/5 "2023-07-04T02:37:24Z")

</div>

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