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


(sahere rahimi) #1

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]


(andy_zhou) #2

this is the error.


(sahere rahimi) #3

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?


(Christian Dahlqvist) #4

Setting the network.host to something other than localhost triggers production mode, which enables the bootstrap checks that report the error you are seeing.


(sahere rahimi) #5

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?


(Christian Dahlqvist) #6

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

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


(sahere rahimi) #7

Many thanks


(system) #8

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