# Unable to install on Ubuntu 22

**URL:** <https://discuss.elastic.co/t/unable-to-install-on-ubuntu-22/365487>\
**Category:** Elastic Search\
**Created:** [August 24, 2024, 1:44am UTC](https://discuss.elastic.co/t/unable-to-install-on-ubuntu-22/365487 "2024-08-24T01:44:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![chrisspen](https://avatars.discourse-cdn.com/v4/letter/c/ed8c4c/32.png) [@chrisspen](https://discuss.elastic.co/u/chrisspen)\
**Post date:** [August 24, 2024, 1:44am UTC](https://discuss.elastic.co/t/unable-to-install-on-ubuntu-22/365487/1 "2024-08-24T01:44:31Z")

</div>

How do you install a simple configuration on Ubuntu 22?

I ran:

```
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
sudo sh -c 'echo "deb https://artifacts.elastic.co/packages/8.x/apt stable main" > /etc/apt/sources.list.d/elastic-8.x.list'
sudo apt-get update
sudo apt install elasticsearch
sudo systemctl daemon-reload
sudo systemctl enable elasticsearch.service
sudo systemctl start elasticsearch.service

```

It starts up just fine, but attempting to do:

```
curl -X GET "localhost:9200"

```

just fails with the error:

```
curl: (52) Empty reply from server

```

I've researched the error and tried all the obvious fixes. My ufw firewall is off. I set network.host=localhost. I set http.host: 0.0.0.0. I set discovery.type: single-node and disabled cluster.initial\_master\_nodes. But none of those had any effect.

I tried disabling xpack.security.http.ssl and xpack.security.transport.ssl, but that made curl respond, but with the JSON error:

```
{"error":{"root_cause":[{"type":"security_exception","reason":"missing authentication credentials for REST request [/]","header":{"WWW-Authenticate":["Basic realm=\"security\", charset=\"UTF-8\"","ApiKey"]}}],"type":"security_exception","reason":"missing authentication credentials for REST request [/]","header":{"WWW-Authenticate":["Basic realm=\"security\", charset=\"UTF-8\"","ApiKey"]}},"status":401}

```

so I re-enabled ssl.

What am I missing? How do you configure Elasticsearch to run as a simple single node on Ubuntu?

---

<div class="post-metadata">

**Author:** ![Tortoise](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tortoise/32/147587_2.png) [@Tortoise](https://discuss.elastic.co/u/Tortoise)\
**Post date:** [August 24, 2024, 3:04am UTC](https://discuss.elastic.co/t/unable-to-install-on-ubuntu-22/365487/2 "2024-08-24T03:04:06Z")

</div>

Hello,

Could you please use -

curl -X elastic:password [http://localhost:9200](http://localhost:9200)

Password which was generated automatically while installing the elasticsearch.

Thanks!

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [August 24, 2024, 6:08am UTC](https://discuss.elastic.co/t/unable-to-install-on-ubuntu-22/365487/3 "2024-08-24T06:08:35Z")

</div>

> [@chrisspen](#):
>
> I tried disabling xpack.security.http.ssl and xpack.security.transport.ssl, but that made curl respond, but with the JSON error:

Instead you could use https instead of http in your curl request:

```
curl -k -u elastic "https://localhost:9200"

```

---

<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:** [September 21, 2024, 6:09am UTC](https://discuss.elastic.co/t/unable-to-install-on-ubuntu-22/365487/4 "2024-09-21T06:09:36Z")

</div>

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