# Failed to start Elasticsearch \[7.16.3\] \[Ubuntu 20.04\]

**URL:** <https://discuss.elastic.co/t/failed-to-start-elasticsearch-7-16-3-ubuntu-20-04/295991>\
**Category:** Elasticsearch\
**Created:** [February 1, 2022, 7:49pm UTC](https://discuss.elastic.co/t/failed-to-start-elasticsearch-7-16-3-ubuntu-20-04/295991 "2022-02-01T19:49:01Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arkoos62](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/arkoos62/32/101179_2.png) [@Arkoos62](https://discuss.elastic.co/u/Arkoos62)\
**Post date:** [February 1, 2022, 7:49pm UTC](https://discuss.elastic.co/t/failed-to-start-elasticsearch-7-16-3-ubuntu-20-04/295991/1 "2022-02-01T19:49:01Z")

</div>

Hello there,  
I have installed Elasticsearch trough the apt on my vps ubuntu 20.04, i just followed the installation guide from here : [Install Elasticsearch with Debian Package | Elasticsearch Guide [7.17] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/deb.html)  
I checked all was running with "curl myip:9200", it returned that all was working fine...  
But a few time later, my service wouldn't start normally... i tried to do so many things by searching a solution on the web...  
It's the first time i use Elasticsearch but i need it to install magento 2 so i hope someone can help me pls !  
There is my error i got on the status :

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/8/f/8f06488b983cf0b7866460ed22285a6b57bc0352.png)  
There is the detail of the package i've installed :  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/a/b/abd8c0fa8a4e6dc1ad2d878273eefb8f8f4172df.png)  
There is the logs :  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/9/c/9cf6453d97f59de8d236f7304471834832892b74.png)  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/8/3/83f2010cc7d566c3e70e72201e0e616f366b914f.png)  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/3/4/34612183bb6dde0fef9971fcf944593cdab43734.png)  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/d/3/d305416de9a1ef5b386a6e72b94416b0ad01eaa2.png)  
There is the Elasticsearch.yml :  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/9/5/9583aa189c00a7a6ce862cd3162588a2f1ee1b91.png)  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/0/0/003806a46af7b53c4b13f2ab6dafb855ac873ac8.png)  
There is the jvm.options :  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/0/3/0336dd974a7c15b459f92d1e8511ac8b7c3d2e06.png)  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/6/3/63023eab944b310717c29cbb4bcbc17151423def.png)  
My java version :  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/6/4/641bb72455e6e902f3bc902cf50ac871f74417bf.png)  
I hope you have all the elements to help me... 🙂  
Thanks

---

<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:** [February 1, 2022, 9:34pm UTC](https://discuss.elastic.co/t/failed-to-start-elasticsearch-7-16-3-ubuntu-20-04/295991/2 "2022-02-01T21:34:27Z")

</div>

Welcome to our community! 😃

Please don't post pictures of text, logs or code. They are difficult to read, impossible to search and replicate (if it's code), and some people may not be even able to see them 🙂

---

<div class="post-metadata">

**Author:** ![rugenl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rugenl/32/12887_2.png) [@rugenl](https://discuss.elastic.co/u/rugenl)\
**Post date:** [February 1, 2022, 9:37pm UTC](https://discuss.elastic.co/t/failed-to-start-elasticsearch-7-16-3-ubuntu-20-04/295991/3 "2022-02-01T21:37:01Z")

</div>

Your problem is "can't bind to your ip address".

---

<div class="post-metadata">

**Author:** ![Arkoos62](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/arkoos62/32/101179_2.png) [@Arkoos62](https://discuss.elastic.co/u/Arkoos62)\
**Post date:** [February 1, 2022, 10:15pm UTC](https://discuss.elastic.co/t/failed-to-start-elasticsearch-7-16-3-ubuntu-20-04/295991/4 "2022-02-01T22:15:11Z")

</div>

> [@rugenl](#):
>
> can't bind to your ip address

I binded the ip adress of my vps in my elasticsearch.yml, i just hid it

---

<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:** [February 1, 2022, 10:25pm UTC](https://discuss.elastic.co/t/failed-to-start-elasticsearch-7-16-3-ubuntu-20-04/295991/5 "2022-02-01T22:25:17Z")

</div>

@Arkoos62 Welcome to the community!  
What @rugenl is saying is the error in that last screen shot (and please do not use screen shots) Indicates a bind error... like the address is already take or can not bind

 ![Screen Shot 2022-02-01 at 2.23.41 PM](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ae2de116400e6170557d705d89ff6cfefd4f478.png)

---

<div class="post-metadata">

**Author:** ![Arkoos62](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/arkoos62/32/101179_2.png) [@Arkoos62](https://discuss.elastic.co/u/Arkoos62)\
**Post date:** [February 1, 2022, 10:57pm UTC](https://discuss.elastic.co/t/failed-to-start-elasticsearch-7-16-3-ubuntu-20-04/295991/6 "2022-02-01T22:57:25Z")

</div>

Thanks mate  
Sorry for the screen i didn't know...  
I understand where the problem is coming from but i ​don't understand what am i supposed to bind in my config file  
my vps is hosted by micisoft azure and they gave me a public ip adress and in the config file i binded this adress at "network.host"  
but it failed to start with this config...  
but when i bind my localhost adress it's working so i'm lost pls explain me  
thanks for all mates

---

<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:** [February 1, 2022, 11:20pm UTC](https://discuss.elastic.co/t/failed-to-start-elasticsearch-7-16-3-ubuntu-20-04/295991/7 "2022-02-01T23:20:32Z")

</div>

> [@Arkoos62](#):
>
> my vps is hosted by micisoft azure and they gave me a public ip adress and in the config file i binded this adress at "network.host"

Well I am not an expert on azure but in GCP you bind to the internal NIC / Address .. that Internal Address is then in turn bound to the external address by GCP networking... then I can access Elasticsearch via the external address.

example in my GCP console, I this

`10.168.0.81 (nic0), 35.2XX.5X.1XX (external)`

and I bind to `10.168.0.81` or when I run  
`ifconfig`

```auto
ens4: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1460
        inet 10.168.0.81 netmask 255.255.255.255 broadcast 0.0.0.0
        inet6 fe80::4001:aff:fea8:51 prefixlen 64 scopeid 0x20<link>

```

and I can bind to `_ens4_` the network interface name ... see [Here](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-network.html#network-interface-values)

I suspect Azure works similar

Did you try to access it from the external address? This is most likely more an Azure thing than an Elasticsearch thing.

Also incase anyone else has not said it ... do not bind your Elasticsearch / Kibana to and external IP unless you have enabled security (Auth / Auth and SSL)

---

<div class="post-metadata">

**Author:** ![Arkoos62](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/arkoos62/32/101179_2.png) [@Arkoos62](https://discuss.elastic.co/u/Arkoos62)\
**Post date:** [February 1, 2022, 11:51pm UTC](https://discuss.elastic.co/t/failed-to-start-elasticsearch-7-16-3-ubuntu-20-04/295991/8 "2022-02-01T23:51:17Z")

</div>

well, i'm not an expert of network but i think azure is similar yes, when i run ifconfig i have the same adress on inet line as my private adress configured on azure panel  
then i have a second paragraph always in ifconfig that show my localhost adress on inet line  
sry mate but i was a bad student in networking course and i don't know what i have to bind so in my config (for me it's not "ens4" but "eth0")  
i tried to bind my external adress in network.host and the service cannot start  
can you explain your last sentence pls ?

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [February 2, 2022, 12:42am UTC](https://discuss.elastic.co/t/failed-to-start-elasticsearch-7-16-3-ubuntu-20-04/295991/9 "2022-02-02T00:42:56Z")

</div>

Elasticsearch, and any other service, only can bind to IP address that are available on the host, which is not your case.

Normally on cloud provider when you get an external IP address, this IP address will be associated to your instance, but will not be available directly to the host, so, for the operating system this IP address does not exists.

What happens is that when the cloud provider receives a connection on the external IP address associated to your instance, it will redirect the connection to the private IP address of your instance and is on that private IP address that you should bind Elasticsearch or other services.

Try to change your `network.host` configuration to use your private IP address or `_eth0_`, both should have the same effect.

Also, as @stephenb already said, do not expose your Elasticsearch instance without having enabled the security features.

---

<div class="post-metadata">

**Author:** ![rugenl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rugenl/32/12887_2.png) [@rugenl](https://discuss.elastic.co/u/rugenl)\
**Post date:** [February 2, 2022, 4:15am UTC](https://discuss.elastic.co/t/failed-to-start-elasticsearch-7-16-3-ubuntu-20-04/295991/10 "2022-02-02T04:15:56Z")

</div>

I always use 0.0.0.0 on my on-prem systems.

It seems to me that the bind address is a frequent cause of problems, what is the benefit of NOT binding to all available IP's by default?

And I think you leaked your IP address in the error messages anyway, even if you hid it in the config yml.

---

<div class="post-metadata">

**Author:** ![Arkoos62](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/arkoos62/32/101179_2.png) [@Arkoos62](https://discuss.elastic.co/u/Arkoos62)\
**Post date:** [February 2, 2022, 11:05am UTC](https://discuss.elastic.co/t/failed-to-start-elasticsearch-7-16-3-ubuntu-20-04/295991/11 "2022-02-02T11:05:43Z")

</div>

Ok mate i understood, thank you for your help i will try this  
How do i configure the security features ?

---

<div class="post-metadata">

**Author:** ![Arkoos62](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/arkoos62/32/101179_2.png) [@Arkoos62](https://discuss.elastic.co/u/Arkoos62)\
**Post date:** [February 2, 2022, 11:09am UTC](https://discuss.elastic.co/t/failed-to-start-elasticsearch-7-16-3-ubuntu-20-04/295991/12 "2022-02-02T11:09:31Z")

</div>

Yes i tried it works but i didn't know if this could work proprely with this binding  
If it works samely so i agree with you  
i'm so dumb, is it serious ?

---

<div class="post-metadata">

**Author:** ![Arkoos62](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/arkoos62/32/101179_2.png) [@Arkoos62](https://discuss.elastic.co/u/Arkoos62)\
**Post date:** [February 2, 2022, 11:19am UTC](https://discuss.elastic.co/t/failed-to-start-elasticsearch-7-16-3-ubuntu-20-04/295991/13 "2022-02-02T11:19:44Z")

</div>

I have an other question...  
when i run curl to check if Elasticsearch is working proprely, i can't run it with my external ip adress, is it normal ?  
(it works when i run curl with my private adress which is binded in my config yml)

---

<div class="post-metadata">

**Author:** ![rugenl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rugenl/32/12887_2.png) [@rugenl](https://discuss.elastic.co/u/rugenl)\
**Post date:** [February 2, 2022, 6:18pm UTC](https://discuss.elastic.co/t/failed-to-start-elasticsearch-7-16-3-ubuntu-20-04/295991/14 "2022-02-02T18:18:10Z")

</div>

On your host, issue "ip addr", those are the addresses known to that OS. If you are curl'ing from there, it has to be one of those addresses.

---

<div class="post-metadata">

**Author:** ![Arkoos62](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/arkoos62/32/101179_2.png) [@Arkoos62](https://discuss.elastic.co/u/Arkoos62)\
**Post date:** [February 2, 2022, 6:26pm UTC](https://discuss.elastic.co/t/failed-to-start-elasticsearch-7-16-3-ubuntu-20-04/295991/15 "2022-02-02T18:26:55Z")

</div>

> [@rugenl](#):
>
> ose are the addresses known to that OS. If you are curl'ing from there, it has to be one of those addresses.

yes but for example, an install of magento, is the elasticsearch service need to be accessible from any externals clients ?

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [February 2, 2022, 6:47pm UTC](https://discuss.elastic.co/t/failed-to-start-elasticsearch-7-16-3-ubuntu-20-04/295991/16 "2022-02-02T18:47:38Z")

</div>

> [@Arkoos62](#):
>
> yes but for example, an install of magento, is the Elasticsearch service need to be accessible from any externals clients ?

You need to check it in the Magento documentation, but elasticsearch probably doesn't need to accessible to any external client, just for the Magento.

Also, if you can't access using your external IP Address, you should check your network configurations to see the access rules, this is a cloud/network issue, not an elasticsearch issue.

---

<div class="post-metadata">

**Author:** ![Arkoos62](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/arkoos62/32/101179_2.png) [@Arkoos62](https://discuss.elastic.co/u/Arkoos62)\
**Post date:** [February 2, 2022, 7:04pm UTC](https://discuss.elastic.co/t/failed-to-start-elasticsearch-7-16-3-ubuntu-20-04/295991/17 "2022-02-02T19:04:04Z")

</div>

> [@leandrojmp](#):
>
> ess using your external IP Address, you should check your network configurations to see the access rules, this is a cloud/networ

Ok thanks i will ask to a magento dev or it's mb write somewhere in the doc  
I think i can but you alert me that it's maybe dangerous to bind it without the security features, i was asking what i have to do to secure my elasticsearch instance

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [February 2, 2022, 7:09pm UTC](https://discuss.elastic.co/t/failed-to-start-elasticsearch-7-16-3-ubuntu-20-04/295991/18 "2022-02-02T19:09:00Z")

</div>

You can start with this [part of the documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/configuring-stack-security.html), it explains how to configure security.

If you have any issue while following the documentation, please open a new topic with your questions

---

<div class="post-metadata">

**Author:** ![Arkoos62](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/arkoos62/32/101179_2.png) [@Arkoos62](https://discuss.elastic.co/u/Arkoos62)\
**Post date:** [February 3, 2022, 5:56pm UTC](https://discuss.elastic.co/t/failed-to-start-elasticsearch-7-16-3-ubuntu-20-04/295991/19 "2022-02-03T17:56:58Z")

</div>

Ok thank you. 😉

---

<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:** [March 3, 2022, 5:57pm UTC](https://discuss.elastic.co/t/failed-to-start-elasticsearch-7-16-3-ubuntu-20-04/295991/20 "2022-03-03T17:57:23Z")

</div>

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