Cluster not forming

I have two servers, both Ubuntu servers running 20.04.1 and Java versions 11.0.8

No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.1 LTS
Release: 20.04
Codename: focal
root@ip-172-26-9-196:/etc/elasticsearch# java -version
openjdk version "11.0.8" 2020-07-14
OpenJDK Runtime Environment (build 11.0.8+10-post-Ubuntu-0ubuntu120.04)
OpenJDK 64-Bit Server VM (build 11.0.8+10-post-Ubuntu-0ubuntu120.04, mixed mode, sharing)

I have set up the following on both nodes.

cluster.name: cert-elastic

node.name: cert-es

#define node 1 as master-eligible:
node.master: true

#define nodes 2 and 3 as data nodes:
node.data: true

network.host: 172.26.9.196

http.port: 9200

transport.host: 172.26.9.196
transport.tcp.port: 9300
transport.publish_port: 9300

discovery.seed_hosts: ["172.26.9.196", "172.26.10.149"]

cluster.initial_master_nodes: ["cert-es", "cert-es2"]

#discovery.zen.ping.unicast.hosts: ["172.26.5.82", "172.26.9.196"]

gateway.recover_after_nodes: 1


cluster.name: cert-elastic

node.name: cert-es2

#define node 1 as master-eligible:
node.master: true

#define nodes 2 and 3 as data nodes:
node.data: true

network.host: 172.26.10.149

http.port: 9200

transport.host: 172.26.9.196
transport.tcp.port: 9300
transport.publish_port: 9300

discovery.seed_hosts: ["172.26.9.196", "172.26.10.149"]

cluster.initial_master_nodes: ["cert-es", "cert-es2"]

#discovery.zen.ping.unicast.hosts: ["172.26.5.82", "172.26.9.196"]

gateway.recover_after_nodes: 1

The issue is, when I run the command:

curl -XGET http://172.26.10.149:9200/_cluster/health?pretty
{
"cluster_name" : "cert-elastic",
"status" : "green",
"timed_out" : false,
"number_of_nodes" : 1,
"number_of_data_nodes" : 1,
"active_primary_shards" : 0,
"active_shards" : 0,
"relocating_shards" : 0,
"initializing_shards" : 0,
"unassigned_shards" : 0,
"delayed_unassigned_shards" : 0,
"number_of_pending_tasks" : 0,
"number_of_in_flight_fetch" : 0,
"task_max_waiting_in_queue_millis" : 0,
"active_shards_percent_as_number" : 100.0

curl -XGET http://172.26.9.196:9200/_cl uster/health?pretty
{
"cluster_name" : "cert-elastic",
"status" : "green",
"timed_out" : false,
"number_of_nodes" : 1,
"number_of_data_nodes" : 1,
"active_primary_shards" : 0,
"active_shards" : 0,
"relocating_shards" : 0,
"initializing_shards" : 0,
"unassigned_shards" : 0,
"delayed_unassigned_shards" : 0,
"number_of_pending_tasks" : 0,
"number_of_in_flight_fetch" : 0,
"task_max_waiting_in_queue_millis" : 0,
"active_shards_percent_as_number" : 100.0
}

The two dont seem to see each other

Your transport.host on the second node is incorrect.

Yes, that was a typo on my part. The correct Transport address is there.

network.host: 172.26.10.149

http.port: 9200

transport.host: 172.26.10.149

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