# Network.host vs http.host in the elasticsearch.yml

**URL:** <https://discuss.elastic.co/t/network-host-vs-http-host-in-the-elasticsearch-yml/156242>\
**Category:** Elasticsearch\
**Created:** [November 12, 2018, 7:22am UTC](https://discuss.elastic.co/t/network-host-vs-http-host-in-the-elasticsearch-yml/156242 "2018-11-12T07:22:33Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![sahere37](https://avatars.discourse-cdn.com/v4/letter/s/b2d939/32.png) [@sahere37](https://discuss.elastic.co/u/sahere37)\
**Post date:** [November 12, 2018, 7:22am UTC](https://discuss.elastic.co/t/network-host-vs-http-host-in-the-elasticsearch-yml/156242/1 "2018-11-12T07:22:33Z")

</div>

hello all,  
when I configured (http.host: 192.168.170.146) in the elasticsearch.yml file, and comment the network.host part, elasticsearch can be started with no problem. And, I can see all the logs that filebeat ships to elasticsearch in the Kibana console.  
But, when I used network.host instead of http.host in the elasticsearch.yml as following, elasticsearch can not be started  
network.host: 192.168.170.146  
and following messages are shown in the logs. could you please advise me?

[srahimi@imguatapp01 bin] ./elasticsearch [2018-11-12T02:19:05,598][INFO][o.e.n.Node] [node-1] initializing ... [2018-11-12T02:19:05,639][INFO][o.e.e.NodeEnvironment] [node-1] using [1] data paths, mounts [[/ (/dev/mapper/ol-root)]], net usable\_space [15.1gb], net total\_space [36.9gb], types [xfs] [2018-11-12T02:19:05,639][INFO][o.e.e.NodeEnvironment] [node-1] heap size [990.7mb], compressed ordinary object pointers [true] [2018-11-12T02:19:05,663][INFO][o.e.n.Node] [node-1] node name [node-1], node ID [Uq-V5\_EgS7OcayjeAWOO3w] [2018-11-12T02:19:05,664][INFO][o.e.n.Node] [node-1] version[6.4.2], pid[8133], build[default/tar/04711c2/2018-09-26T13:34:09.098244Z], OS[Linux/4.1.12-94.3.9.el7uek.x86\_64/amd64], JVM[Oracle Corporation/OpenJDK 64-Bit Server VM/1.8.0\_131/25.131-b12] [2018-11-12T02:19:05,664][INFO][o.e.n.Node] [node-1] JVM arguments [-Xms1g, -Xmx1g, -XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -XX:-OmitStackTraceInFastThrow, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Djava.io.tmpdir=/tmp/elasticsearch.0EZSctES, -XX:+HeapDumpOnOutOfMemoryError, -XX:HeapDumpPath=data, -XX:ErrorFile=logs/hs\_err\_pid%p.log, -XX:+PrintGCDetails, -XX:+PrintGCDateStamps, -XX:+PrintTenuringDistribution, -XX:+PrintGCApplicationStoppedTime, -Xloggc:logs/gc.log, -XX:+UseGCLogFileRotation, -XX:NumberOfGCLogFiles=32, -XX:GCLogFileSize=64m, -Des.path.home=/home/srahimi/ELK/elasticsearch-6.4.2, -Des.path.conf=/home/srahimi/ELK/elasticsearch-6.4.2/config, -Des.distribution.flavor=default, -Des.distribution.type=tar] [2018-11-12T02:19:06,870][INFO][o.e.p.PluginsService] [node-1] loaded module [aggs-matrix-stats] [2018-11-12T02:19:06,870][INFO][o.e.p.PluginsService] [node-1] loaded module [analysis-common] [2018-11-12T02:19:06,870][INFO][o.e.p.PluginsService] [node-1] loaded module [ingest-common] [2018-11-12T02:19:06,870][INFO][o.e.p.PluginsService] [node-1] loaded module [lang-expression] [2018-11-12T02:19:06,870][INFO][o.e.p.PluginsService] [node-1] loaded module [lang-mustache] [2018-11-12T02:19:06,871][INFO][o.e.p.PluginsService] [node-1] loaded module [lang-painless] [2018-11-12T02:19:06,871][INFO][o.e.p.PluginsService] [node-1] loaded module [mapper-extras] [2018-11-12T02:19:06,871][INFO][o.e.p.PluginsService] [node-1] loaded module [parent-join] [2018-11-12T02:19:06,871][INFO][o.e.p.PluginsService] [node-1] loaded module [percolator] [2018-11-12T02:19:06,871][INFO][o.e.p.PluginsService] [node-1] loaded module [rank-eval] [2018-11-12T02:19:06,871][INFO][o.e.p.PluginsService] [node-1] loaded module [reindex] [2018-11-12T02:19:06,871][INFO][o.e.p.PluginsService] [node-1] loaded module [repository-url] [2018-11-12T02:19:06,871][INFO][o.e.p.PluginsService] [node-1] loaded module [transport-netty4] [2018-11-12T02:19:06,871][INFO][o.e.p.PluginsService] [node-1] loaded module [tribe] [2018-11-12T02:19:06,871][INFO][o.e.p.PluginsService] [node-1] loaded module [x-pack-core] [2018-11-12T02:19:06,871][INFO][o.e.p.PluginsService] [node-1] loaded module [x-pack-deprecation] [2018-11-12T02:19:06,871][INFO][o.e.p.PluginsService] [node-1] loaded module [x-pack-graph] [2018-11-12T02:19:06,871][INFO][o.e.p.PluginsService] [node-1] loaded module [x-pack-logstash] [2018-11-12T02:19:06,871][INFO][o.e.p.PluginsService] [node-1] loaded module [x-pack-ml] [2018-11-12T02:19:06,872][INFO][o.e.p.PluginsService] [node-1] loaded module [x-pack-monitoring] [2018-11-12T02:19:06,872][INFO][o.e.p.PluginsService] [node-1] loaded module [x-pack-rollup] [2018-11-12T02:19:06,872][INFO][o.e.p.PluginsService] [node-1] loaded module [x-pack-security] [2018-11-12T02:19:06,872][INFO][o.e.p.PluginsService] [node-1] loaded module [x-pack-sql] [2018-11-12T02:19:06,872][INFO][o.e.p.PluginsService] [node-1] loaded module [x-pack-upgrade] [2018-11-12T02:19:06,872][INFO][o.e.p.PluginsService] [node-1] loaded module [x-pack-watcher] [2018-11-12T02:19:06,872][INFO][o.e.p.PluginsService] [node-1] no plugins loaded [2018-11-12T02:19:09,523][INFO][o.e.x.s.a.s.FileRolesStore] [node-1] parsed [0] roles from file [/home/srahimi/ELK/elasticsearch-6.4.2/config/roles.yml] [2018-11-12T02:19:09,858][INFO][o.e.x.m.j.p.l.CppLogMessageHandler] [controller/8195] [Main.cc@109] controller (64 bit): Version 6.4.2 (Build 660eefe6f2ea55) Copyright (c) 2018 Elasticsearch BV [2018-11-12T02:19:10,151][DEBUG][o.e.a.ActionModule] Using REST wrapper from plugin org.elasticsearch.xpack.security.Security [2018-11-12T02:19:10,334][INFO][o.e.d.DiscoveryModule] [node-1] using discovery type [zen] [2018-11-12T02:19:10,897][INFO][o.e.n.Node] [node-1] initialized [2018-11-12T02:19:10,898][INFO][o.e.n.Node] [node-1] starting ... [2018-11-12T02:19:11,017][INFO][o.e.t.TransportService] [node-1] publish\_address {192.168.170.146:9300}, bound\_addresses {192.168.170.146:9300} [2018-11-12T02:19:11,041][INFO][o.e.b.BootstrapChecks] [node-1] bound or publishing to a non-loopback address, enforcing bootstrap checks ERROR: [2] bootstrap checks failed [1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536] [2]: max virtual memory areas vm.max\_map\_count [65530] is too low, increase to at least [262144] [2018-11-12T02:19:11,114][INFO][o.e.n.Node] [node-1] stopping ... [2018-11-12T02:19:11,138][INFO][o.e.n.Node] [node-1] stopped [2018-11-12T02:19:11,138][INFO][o.e.n.Node] [node-1] closing ... [2018-11-12T02:19:11,151][INFO][o.e.n.Node] [node-1] closed [srahimi@imguatapp01 bin]

---

<div class="post-metadata">

**Author:** ![zqc0512](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zqc0512/32/32141_2.png) [@zqc0512](https://discuss.elastic.co/u/zqc0512)\
**Post date:** [November 12, 2018, 7:43am UTC](https://discuss.elastic.co/t/network-host-vs-http-host-in-the-elasticsearch-yml/156242/2 "2018-11-12T07:43:13Z")

</div>

> [@sahere37](#):
>
> publishing to a non-loopback address, enforcing bootstrap checks ERROR: [2] bootstrap checks failed [1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536] [2]: max virtual memory areas vm.max\_map\_count [65530] is too low, increase to at least [262144]

this is the error.

---

<div class="post-metadata">

**Author:** ![sahere37](https://avatars.discourse-cdn.com/v4/letter/s/b2d939/32.png) [@sahere37](https://discuss.elastic.co/u/sahere37)\
**Post date:** [November 12, 2018, 7:45am UTC](https://discuss.elastic.co/t/network-host-vs-http-host-in-the-elasticsearch-yml/156242/3 "2018-11-12T07:45:37Z")

</div>

when i used http.host, everything is OK and this error doesn't exist. it is weird, why when i used network.host, the error appears?

---

<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:** [November 12, 2018, 7:49am UTC](https://discuss.elastic.co/t/network-host-vs-http-host-in-the-elasticsearch-yml/156242/4 "2018-11-12T07:49:37Z")

</div>

Setting the `network.host` to something other than localhost [triggers production mode](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/bootstrap-checks.html), which enables the bootstrap checks that report the error you are seeing.

---

<div class="post-metadata">

**Author:** ![sahere37](https://avatars.discourse-cdn.com/v4/letter/s/b2d939/32.png) [@sahere37](https://discuss.elastic.co/u/sahere37)\
**Post date:** [November 12, 2018, 7:54am UTC](https://discuss.elastic.co/t/network-host-vs-http-host-in-the-elasticsearch-yml/156242/5 "2018-11-12T07:54:45Z")

</div>

I have two questions:  
1- I want to define a cluster; actually, I have two elascticsearch nodes and want to define a cluster according to these nodes. can I do this with using http.host insead of network.host in elasticsearch.yml?  
2- I do all tasks mentioned in the link, but yet I can see the same error. what should I do?

---

<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:** [November 12, 2018, 7:56am UTC](https://discuss.elastic.co/t/network-host-vs-http-host-in-the-elasticsearch-yml/156242/6 "2018-11-12T07:56:57Z")

</div>

> [@sahere37](#):
>
> 1- I want to define a cluster; actually, I have two elascticsearch nodes and want to define a cluster according to these nodes. can I do this with using http.host insead of network.host in elasticsearch.yml?

No. Elasticsearch nodes do not communicate internally over HTTP, but rather use the transport protocol.

> [@sahere37](#):
>
> 2- I do all tasks mentioned in the link, but yet I can see the same error. what should I do?

There are a number of bootstrap checks, so make sure you have covered all of them.

---

<div class="post-metadata">

**Author:** ![sahere37](https://avatars.discourse-cdn.com/v4/letter/s/b2d939/32.png) [@sahere37](https://discuss.elastic.co/u/sahere37)\
**Post date:** [November 12, 2018, 11:20am UTC](https://discuss.elastic.co/t/network-host-vs-http-host-in-the-elasticsearch-yml/156242/7 "2018-11-12T11:20:48Z")

</div>

Many thanks

---

<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:** [December 10, 2018, 11:20am UTC](https://discuss.elastic.co/t/network-host-vs-http-host-in-the-elasticsearch-yml/156242/8 "2018-12-10T11:20:51Z")

</div>

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