Node is not joining the cluster (ES-5.6.3)

I"m running two nodes cluster on two separate RHEL servers. Here are the configurations.

server ip ***1
elasticsearch.yml
cluster. name: es1
node.name: es1-node1
node.master: true
node.data: true
network.host: ***1
transport.host: localhost
http.port: 9200
transport.tcp.port: 9300
discovery.zen.ping.unicast.hosts: ["***1:9300", "***2:9301]
discovery.zen.ping_timeout: 30s

server ip ***2
elasticsearch.yml
cluster. name: es1
node.name: es1-node2
node.master: false
node.data: true
network.host: ***2
transport.host: localhost
http.port: 9201
transport.tcp.port: 9301
discovery.zen.ping.unicast.hosts: ["***1:9300", "***2:9301]
discovery.zen.ping_timeout: 30s

The node on server ***1 has master and data roles.
The node on server ***2 has data role.
I started ES instances on both servers without errors in their log files.
Also, I can successfully request indices via curl on server ***1.

Unfortunately data node on server ***2 is not joining the cluster and running check for its health with
curl -XGET 'http://***2:9201/_cat/health?v' on the server ***2 console outputs the following error:
("error":("root_cause":[("type":"master_not_discovered_exception","reason":"null"), "status":503)

I think I might be missing something in config files, may be on the transport level or something else and any advise or help to resolve the issue will be appreciated.

transport.host: localhost
not use localhost.

Should I use in transport.host the same ip values as they are in network.host ?

You should just configure network.host. Not other settings.

I commented out the transport.host in es yml on both servers, then started es on first server but it failed to start, the entries in log file:
[INFO][o.e.b.BootstrapChecks] [es-node1] bound or publishing to a non-loopback or non-link-local address, enforsing bootstrap checks
[ERROR][o.e.b.Bootstrap][es-node1] node validation exception
[3]bootstrap checks failed
...
...stopped
...closed

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

You should do settings for network host only.
no need to mention transport host and port parameter and also for discovery.unicast parameter mention only with Ips. Also make sure the entries for both server in its host file for better communication between servers .
Also open port 9200 and 9300 on both servers.

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