Elasticsearch is not accessible via machine IP Address

Hi All,

I have installed elastic search 7.2 on CentOS 7. After installation without making any changes to the yml file, I was able to access elastic search using the curl command
curl http://localhost:9200/_cluster/health?pretty

Once I got a successful response, I modified network.host: IP_ADDRESS (IP address of the machine).
Once making the changes, I tried starting the elastic search but it fails to start.

Noticing the following in the log file.

> [2019-10-31T14:21:01,725][INFO ][o.e.x.s.a.s.FileRolesStore] [master-node] parsed [0] roles from file [/etc/elasticsearch/roles.yml]

[2019-10-31T14:21:02,271][INFO ][o.e.x.m.p.l.CppLogMessageHandler] [master-node] [controller/30093] [Main.cc@110] controller (64 bit): Version 7.2.0 (Build 65aefcbfce449b) Copyright (c) 2019 Elasticsearch BV
[2019-10-31T14:21:02,745][DEBUG][o.e.a.ActionModule ] [master-node] Using REST wrapper from plugin org.elasticsearch.xpack.security.Security
[2019-10-31T14:21:03,021][INFO ][o.e.d.DiscoveryModule ] [master-node] using discovery type [zen] and seed hosts providers [settings]
[2019-10-31T14:21:03,760][INFO ][o.e.n.Node ] [master-node] initialized
[2019-10-31T14:21:03,761][INFO ][o.e.n.Node ] [master-node] starting ...
[2019-10-31T14:21:03,886][INFO ][o.e.t.TransportService ] [master-node] publish_address {10.202.10.xxx:9300}, bound_addresses {10.202.10.xxx:9300}
[2019-10-31T14:21:03,893][INFO ][o.e.b.BootstrapChecks ] [master-node] bound or publishing to a non-loopback address, enforcing bootstrap checks
[2019-10-31T14:21:03,913][ERROR][o.e.b.Bootstrap ] [master-node] node validation exception
[1] bootstrap checks failed
[1]: initial heap size [4294967296] not equal to maximum heap size [6442450944]; this can cause resize pauses and prevents mlockall from locking the entire heap
[2019-10-31T14:21:03,916][INFO ][o.e.n.Node ] [master-node] stopping ...
[2019-10-31T14:21:03,931][INFO ][o.e.n.Node ] [master-node] stopped
[2019-10-31T14:21:03,932][INFO ][o.e.n.Node ] [master-node] closing ...
[2019-10-31T14:21:03,942][INFO ][o.e.n.Node ] [master-node] closed
[2019-10-31T14:21:03,944][INFO ][o.e.x.m.p.NativeController] [master-node] Native controller process has stopped - no new native processes can be started

Also, tried changing network.host from IP Address to 0.0.0.0. But no luck.

Please help me out on this.

Please read https://www.elastic.co/guide/en/elasticsearch/reference/current/bootstrap-checks.html

Hi @dadoonet,

I tried to explicitly add the bootstrap check in JVM options file. But failed with the same error.
After including the following properties in elasticsearch.yml I was able to use curl command via IP Address.

transport.host: localhost
transport.tcp.port: 9300
network.host: 0.0.0.0

By adding the above properties I was able to start elastic search and access via IP address.

But I'm still not able to form a cluster since the port 9300 is mapped to localhost and not accessible from other nodes.

Hi @dadoonet

This is my elasticsearch.yml settings

cluster.name: lower-env-cluster
node.name: lower-env-master
node.master: true
node.data: false
path.data: /var/lib/elasticsearch
path.log: /var/log/elasticsearch
network.host: IP_ADDRESS
discovery.zen.ping.unicast.hosts: ["IP_ADDRESS"]
cluster.initial_master_nodes: ["IP_ADDRESS"]

Even if I add the JVM option -Des.enforce.bootstrap.checks=true or not, still getting the same error as mentioned in the initial post. Can you please help out what has to be done.
I'm not able to start even one node. I'm trying to configure a cluster with 1 master and 2 data nodes.

Hi @the1bit

I tried out the steps you have mentioned in the post.

The above comment holds my configuration of elastic search. But still, I'm not able to start even an elasticsearch node.

Could you please help out on this.

I have found the issue and fixed it myself.

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