My ElasticSearch Version: 6.6.1
My Enviroment: 3 nodes in 3 differents servers
Master: 192.168.1.142
Slave1: 192.168.1.144
Slave2: 192.168.1.146
Master Config YML:
cluster.name: elasticppo
node.name: ${HOSTNAME}
path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch
bootstrap.memory_lock: true
network.host: ["127.0.0.1","192.168.1.142"]
discovery.zen.ping.unicast.hosts: ["192.168.1.142","192.168.1.144","192.168.1.146"]
discovery.zen.minimum_master_nodes: 2
xpack.security.enabled: true
xpack.security.transport.ssl.verification_mode: certificate
xpack.security.transport.ssl.keystore.path: /etc/elasticsearch/certs/elasticmaster.p12
xpack.security.transport.ssl.truststore.path: /etc/elasticsearch/certs/elasticmaster.p12
Slave 1 Config YML:
cluster.name: elasticppo
node.name: ${HOSTNAME}
path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch
bootstrap.memory_lock: true
network.host: ["127.0.0.1","192.168.1.144"]
discovery.zen.ping.unicast.hosts: ["192.168.1.142","192.168.1.144","192.168.1.146"]
discovery.zen.minimum_master_nodes: 2
xpack.security.enabled: true
xpack.security.transport.ssl.verification_mode: certificate
xpack.security.transport.ssl.keystore.path: /etc/elasticsearch/certs/elasticslave1.p12
xpack.security.transport.ssl.truststore.path: /etc/elasticsearch/certs/elasticslave1.p12
Slave 2 Config YML:
cluster.name: elasticppo
node.name: ${HOSTNAME}
path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch
bootstrap.memory_lock: true
network.host: ["127.0.0.1","192.168.1.146"]
discovery.zen.ping.unicast.hosts: ["192.168.1.142","192.168.1.144","192.168.1.146"]
discovery.zen.minimum_master_nodes: 2
xpack.security.enabled: true
xpack.security.transport.ssl.verification_mode: certificate
xpack.security.transport.ssl.keystore.path: /etc/elasticsearch/certs/elasticslave2.p12
xpack.security.transport.ssl.truststore.path: /etc/elasticsearch/certs/elasticslave2.p12
Logs From Slave 2
[elasticslave2] not enough master nodes discovered during pinging (found [[Candidate{node={elasticmaster}{RhMwLe4rQO-oKoBjUxHFSw}{EaApLrYBTuu7R_Rko0xeKw}{192.168.1.142}{192.168.1.142:9300}{ml.machine_memory=8363855872, ml.max_open_jobs=20, xpack.installed=true, ml.enabled=true}, clusterStateVersion=-1}]], but needed [2]), pinging again
Logs from Slave 1
[elasticslave1] not enough master nodes discovered during pinging (found [[Candidate{node={elasticmaster}{RhMwLe4rQO-oKoBjUxHFSw}{EaApLrYBTuu7R_Rko0xeKw}{192.168.1.142}{192.168.1.142:9300}{ml.machine_memory=8363855872, ml.max_open_jobs=20, xpack.installed=true, ml.enabled=true}, clusterStateVersion=-1}]], but needed [2]), pinging again
curl GET _cat/indices
to master, returns this error:
{
error: {
root_cause: [
{
type: "master_not_discovered_exception",
reason: null,
}
],
type: "master_not_discovered_exception",
reason: null,
},
status: 503,
}