Elasticsearch 8.7 2-node cluster

Hello,
I want to create 2-node cluster and it doesn't work

node-01:

path.data: /bitnami/elasticsearch/data
cluster.name: zephyr
node.name: node-01
node.roles: [ master, data ]
http.port: 9200
transport.port: 9300
bootstrap.memory_lock: false
network.host: 192.168.9.100
discovery.seed_hosts: ["192.168.9.100", "192.168.9.101"]
cluster.initial_master_nodes: ["192.168.9.100", "192.168.9.101"]
xpack.security.enabled: false
xpack.ml.enabled: false

node-02:

path.data: /bitnami/elasticsearch/data
cluster.name: zephyr
node.name: node-02
node.roles: [ master, data ]
http.port: 9200
transport.port: 9300
bootstrap.memory_lock: false
network.host: 192.168.9.101
discovery.seed_hosts: ["192.168.9.100", "192.168.9.101"]
cluster.initial_master_nodes: ["192.168.9.100", "192.168.9.101"]
xpack.security.enabled: false
xpack.ml.enabled: false

this is from log file

[2023-05-18T13:14:14,444][WARN ][o.e.d.PeerFinder         ] [node-01] address [192.168.9.101:9300], node [null], requesting [false] discovery result: [][192.168.9.101:9300] connect_timeout[30s]
[2023-05-18T13:14:23,341][WARN ][o.e.c.c.ClusterFormationFailureHelper] [node-01] master not discovered yet, this node has not previously joined a bootstrapped cluster, and this node must discover master-eligible nodes [192.168.9.100, 192.168.9.101] to bootstrap a cluster: have discovered [{node-01}{qqKIXW1hSpS82grs1vyO9Q}{tdAEZHpFQxaFINtgSNQ6Rg}{node-01}{192.168.9.100}{192.168.9.100:9300}{dm}{8.7.0}]; discovery will continue using [192.168.9.101:9300] from hosts providers and [{node-01}{qqKIXW1hSpS82grs1vyO9Q}{tdAEZHpFQxaFINtgSNQ6Rg}{node-01}{192.168.9.100}{192.168.9.100:9300}{dm}{8.7.0}] from last-known cluster state; node term 0, last-accepted version 0 in term 0; for troubleshooting guidance, see https://www.elastic.co/guide/en/elasticsearch/reference/8.7/discovery-troubleshooting.html

I don't understand this and I need some help what is wrong in this configuration.
Can anyone help me with that?

I believe the cluster.initial_master_nodes list must contain node names, e.g node-01 and node-02. Please have a look at the docs for further details.

Also note that in order to achieve high availability you need a minimum of 3 nodes in the cluster.

Port 9300 should be opened on both servers

1 Like

Hi,
when these 2 nodes start working w/o errors I'll add 3rd node. Tomorrow I'll change IPs with names and I let you know if it works.

I turned off firewall and it works, I also added 3rd node for high availability.

You don't need to disable firewall, just open the port 9300.

ok, I'll try to open port.

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