# ElasticSearch 5.1.1 on Ubuntu 16.04, fails when started with \`network.host\` set to 0.0.0.0

**URL:** <https://discuss.elastic.co/t/elasticsearch-5-1-1-on-ubuntu-16-04-fails-when-started-with-network-host-set-to-0-0-0-0/70558>\
**Category:** Elasticsearch\
**Created:** [January 4, 2017, 1:22pm UTC](https://discuss.elastic.co/t/elasticsearch-5-1-1-on-ubuntu-16-04-fails-when-started-with-network-host-set-to-0-0-0-0/70558 "2017-01-04T13:22:23Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![tomekit](https://avatars.discourse-cdn.com/v4/letter/t/e5b9ba/32.png) [@tomekit](https://discuss.elastic.co/u/tomekit)\
**Post date:** [January 4, 2017, 1:22pm UTC](https://discuss.elastic.co/t/elasticsearch-5-1-1-on-ubuntu-16-04-fails-when-started-with-network-host-set-to-0-0-0-0/70558/1 "2017-01-04T13:22:23Z")

</div>

I am running ES 5.1.1 on Ubuntu 16.04, kernel: 4.4.0-53-generic  
JVM Version: 5.1.1, Build: 5395e21/2016-12-06T12:36:15.409Z, JVM: 1.8.0\_111

When used (in `/etc/elasticsearch/elasticsearch.yml`):  
`network.host: "0.0.0.0"`  
or `network.host: 0.0.0.0`

Elasticsearch starts and fails after few seconds.

When `network.host` option is not used it starts ok, but binds to localhost.

Logs from `journalctl -u elasticsearch.service`:  
Jan 04 13:17:39 v2-es5-eu systemd[1]: Started Elasticsearch.  
Jan 04 13:17:44 v2-es5-eu systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE  
Jan 04 13:17:44 v2-es5-eu systemd[1]: elasticsearch.service: Unit entered failed state.  
Jan 04 13:17:44 v2-es5-eu systemd[1]: elasticsearch.service: Failed with result 'exit-code'.

Anyone having similar issues?

EDIT:  
None of `_global_` or `_site_` works as well. When set to `_local_` it is fine.  
The underlying hardware is EC2 node.

---

<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:** [January 4, 2017, 1:30pm UTC](https://discuss.elastic.co/t/elasticsearch-5-1-1-on-ubuntu-16-04-fails-when-started-with-network-host-set-to-0-0-0-0/70558/2 "2017-01-04T13:30:47Z")

</div>

Have a look at the Elasticsearch logs. It is quite likely this is caused by the new [bootstrap checks](https://www.elastic.co/guide/en/elasticsearch/reference/5.1/bootstrap-checks.html). These are also described [in this blog post](https://www.elastic.co/blog/bootstrap_checks_annoying_instead_of_devastating).

---

<div class="post-metadata">

**Author:** ![tomekit](https://avatars.discourse-cdn.com/v4/letter/t/e5b9ba/32.png) [@tomekit](https://discuss.elastic.co/u/tomekit)\
**Post date:** [January 4, 2017, 1:58pm UTC](https://discuss.elastic.co/t/elasticsearch-5-1-1-on-ubuntu-16-04-fails-when-started-with-network-host-set-to-0-0-0-0/70558/3 "2017-01-04T13:58:05Z")

</div>

Thanks,

Got this from logs:

> [2017-01-04T13:36:23,773][WARN][o.e.b.ElasticsearchUncaughtExceptionHandler] [v2-es5-eu] uncaught exception in thread [main]  
> org.elasticsearch.bootstrap.StartupException: java.lang.IllegalArgumentException: No up-and-running global-scope (public) addresses found, got [name:lo (lo), name:eth0 (eth0)]

I set the `network.host` to `_eth0_` then got this:

> [2017-01-04T13:48:44,898][ERROR][o.e.b.Bootstrap] [v2-es5-eu] node validation exception  
> bootstrap checks failed  
> memory locking requested for elasticsearch process but memory is not locked

It wasn't a problem when run with `_local_`, as it was just a Warning.

I've set the:

> elasticsearch soft memlock 65536  
> elasticsearch hard memlock 65536

in `/etc/security/limits.conf` and checked whether `pam_limits.so` line is uncommented in `/etc/pam.d/su`  
according to: [Configuring system settings | Elasticsearch Guide [master] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/master/setting-system-settings.html)

No luck starting Elasticsearch. Still the same `ulimits` issue.

Decided to temporary disable the `bootstrap.memory_lock`

---

<div class="post-metadata">

**Author:** ![junior\_h](https://avatars.discourse-cdn.com/v4/letter/j/82dd89/32.png) [@junior\_h](https://discuss.elastic.co/u/junior_h)\
**Post date:** [January 4, 2017, 2:31pm UTC](https://discuss.elastic.co/t/elasticsearch-5-1-1-on-ubuntu-16-04-fails-when-started-with-network-host-set-to-0-0-0-0/70558/4 "2017-01-04T14:31:41Z")

</div>

Try to change -Xms & -Xmx on /etc/elasticsearc/jvm.options below memory size, e.g.  
-Xms128m  
-Xmx128m

Then, modify elasticsearch.yml like below and start ES. It works on me

===========  
[cluster.name](http://cluster.name): es51\_test  
[node.name](http://node.name): 06a9fb008712

path.data: /var/lib/elasticsearch  
path.logs: /var/log/elasticsearch

node.master: true  
node.data: true  
bootstrap.memory\_lock: true  
network.host: 0.0.0.0  
http.port: 9200

discovery.zen.ping.unicast.hosts: ["localhost"]  
discovery.zen.minimum\_master\_nodes: 1  
gateway.expected\_nodes: 1

===========

---

<div class="post-metadata">

**Author:** ![tomekit](https://avatars.discourse-cdn.com/v4/letter/t/e5b9ba/32.png) [@tomekit](https://discuss.elastic.co/u/tomekit)\
**Post date:** [January 10, 2017, 12:37pm UTC](https://discuss.elastic.co/t/elasticsearch-5-1-1-on-ubuntu-16-04-fails-when-started-with-network-host-set-to-0-0-0-0/70558/5 "2017-01-10T12:37:00Z")

</div>

@junior_h Thanks, I've set these to 1G, as this is my expected heap size. Problem hasn't gone.  
I came across this post: [Memory confusion in Ubuntu 16.04](https://discuss.elastic.co/t/memory-confusion-in-ubuntu-16-04/50961/2)  
and realized that I don't need to lock the memory as I don't have swap on my node anyway.  
Not sure if this might be reason for the `memory_lock` setting to not work, as it clearly says it's a `RLIMIT_MEMLOCK` issue.

---

<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:** [February 7, 2017, 12:37pm UTC](https://discuss.elastic.co/t/elasticsearch-5-1-1-on-ubuntu-16-04-fails-when-started-with-network-host-set-to-0-0-0-0/70558/6 "2017-02-07T12:37:26Z")

</div>

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