Hi I installed Elasticsearch 6.6 with Ansible playbook over a cluster with 3 nodes. All nodes are on the same port.
When I run the query:
curl -u es_admin:<pass> -X GET 'https://<hostname1>:9201/_nodes/process?pretty' -k
I see only one node in the cluster:
{
"_nodes" : {
"total" : 1,
"successful" : 1,
"failed" : 0
},
"cluster_name" : "new_cluster",
"nodes" : {
"Qlqcbgs_QmWXpglNVoOApQ" : {
"name" : "node1",
"transport_address" : "<IP_address>:9301",
"host" : "<hostname1>",
"ip" : "<IP_address>",
"version" : "6.6.0",
"build_flavor" : "default",
"build_type" : "rpm",
"build_hash" : "<build_hash_number>",
"roles" : [
"master",
"data",
"ingest"
],
"attributes" : {
"ml.machine_memory" : "16653647872",
"xpack.installed" : "true",
"ml.max_open_jobs" : "20",
"ml.enabled" : "true"
},
"process" : {
"refresh_interval_in_millis" : 1000,
"id" : 11674,
"mlockall" : false
}
}
}
}
I get the same output for each node separately:
curl -u es_admin:<pass> -X GET 'https://<hostname2>:9201/_nodes/process?pretty' -k
curl -u es_admin:<pass> -X GET 'https://<hostname3>:9201/_nodes/process?pretty' -k
Under elasticsearch.template.yml I do see the other nodes. For example if I go to node1 I see the other two:
discovery.zen.ping.unicast.hosts:
- <hostname2>:9301
- <hostname3>:9301
here is elasticsearch.yml:
node.name: node1
network.host: <hostname>
http.port: 9201
transport.tcp.port: 9301
node.master: true
node.data: true
node.ingest: true
search.remote.connect: true
#################################### Paths ####################################
# Path to directory containing configuration (this file and logging.yml):
path.data: /var/lib/elasticsearch/node1
path.logs: /var/log/elasticsearch/node1
discovery.zen.ping.unicast.hosts:
- <hostname2>:9301
- <hostname3>:9301
xpack.license.self_generated.type: trial
node.ml: true
xpack.ml.enabled: true
xpack.security.audit.enabled: true
xpack.security.enabled: true
xpack.security.transport.ssl.enabled: true
xpack.security.http.ssl.enabled: true
xpack.ssl.keystore.path: **path**
xpack.ssl.keystore.password: *passwd*
xpack.ssl.truststore.path: **path**
xpack.ssl.truststore.password: *passwd*
What should be done in order to see all the nodes under the same cluster?
In 6.X you also need to set discovery.zen.minimum_master_nodes
to say to your nodes what is the minimum number of master nodes required to form a cluster.
Since you didn't set it, each of your nodes think they are the master node and they won't join any cluster.
Set it to discovery.zen.minimum_master_nodes: 2
in each elasticsearch.yml
file and restart your nodes.
I think all discovery.zen.ping.unicast.hosts must be the same in all node.
discovery.zen.ping.unicast.hosts:
- <hostname1>:9301
- <hostname2>:9301
- <hostname3>:9301
please try this or just:
discovery.zen.ping.unicast.hosts: ["hostname1:9301"]
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.