Elasticsearch network host cant be set?

I have downloaded ES and configure the yml file for network host to be 0.0.0.0. Then when I start it up with bin/elasticsearch, it gives me the following error.

172.16.1.237:9300}, bound_addresses {[::]:9300}
Exception in thread "main" java.lang.RuntimeException: bootstrap checks failed
initial heap size [268435456] not equal to maximum heap size [2147483648]; this can cause resize pauses and prevents mlockall from locking the entire heap
max file descriptors [4096] for elasticsearch process likely too low, increase to at least [65536]
please set [discovery.zen.minimum_master_nodes] to a majority of the number of master eligible nodes in your cluster
max virtual memory areas vm.max_map_count [65530] likely too low, increase to at least [262144]
        at org.elasticsearch.bootstrap.BootstrapCheck.check(BootstrapCheck.java:125)
        at org.elasticsearch.bootstrap.BootstrapCheck.check(BootstrapCheck.java:85)
        at org.elasticsearch.bootstrap.BootstrapCheck.check(BootstrapCheck.java:65)
        at org.elasticsearch.bootstrap.Bootstrap$5.validateNodeBeforeAcceptingRequests(Bootstrap.java:178)
        at org.elasticsearch.node.Node.start(Node.java:373)
        at org.elasticsearch.bootstrap.Bootstrap.start(Bootstrap.java:193)
        at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:252)
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:96)
        at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:91)
        at org.elasticsearch.cli.SettingCommand.execute(SettingCommand.java:54)
        at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:91)
        at org.elasticsearch.cli.Command.main(Command.java:53)
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:70)
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:63)
Refer to the log for complete error details.

What would be the issue?

You read all of that right?

Hi @warkolm,

Yes, but I could not understand its relationship when I have set the network.host to 0.0.0.0. When I comment it out, ES works again. This is the first time I come across with these events and I am not familiar with what they mean.

which version are you using? could you paste your es config file?

I am using ES 5 Alpha 4.
Here is my es config file: http://paste.ubuntu.com/19478337/

:cold_sweat: I didn't use this version, since it's not free. In ES 2.x, these messages are WARN, so it can be startup success. there is a section of ES document include how to increase heap size and max file descriptors.

They are here:
https://www.elastic.co/guide/en/elasticsearch/guide/current/heap-sizing.html
https://www.elastic.co/guide/en/elasticsearch/guide/current/_file_descriptors_and_mmap.html

Huh?
Yes, it is.

I just ran into this error too. Looking at the code, it looks like once you decide to explicitly set network.host, we assume you're doing this because you've moved beyond a simple dev instance and are setting up something that's more production-like.

Since we are assuming this is now a production-like environment, we now enforce some of these checks that we otherwise wouldn't in a simple dev installation.

Hope that helps,
Peter

Looks like this is already even documented in master! :slight_smile:

https://www.elastic.co/guide/en/elasticsearch/reference/master/bootstrap-checks.html

1 Like