we had a elasticsearch cluster with 3 nodes and all the nodes are running i checked that by using
[root@ip-10-0-0-170 elasticsearch]# curl --user elastic:yLwz4s2yRGiUQsXyFkXw -X GET "10.0.0.170:9200/_cat/nodes?pretty"
10.0.0.158 43 57 1 0.66 0.66 0.95 dilm * ip-10-0-0-158
10.0.0.81 52 60 1 1.17 1.23 1.43 dilm - ip-10-0-0-81
10.0.0.170 28 96 1 2.13 2.21 2.09 dilm - ip-10-0-0-170
and the result of
[centos@ip-10-0-0-170 ~]$ sudo systemctl status elasticsearch
● elasticsearch.service - Elasticsearch
Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; disabled; vendor preset: disabled)
Active: active (running) since Fri 2020-06-12 09:07:31 UTC; 25min ago
Docs: http://www.elastic.co
Main PID: 10738 (java)
Memory: 1.5G
CGroup: /system.slice/elasticsearch.service
├─10738 /usr/share/elasticsearch/jdk/bin/java -Des.networkaddress.cache.ttl=60 -Des.networkaddress.cache.negative.ttl=10 -XX:+AlwaysPreTouch -Xss1m -Djava.awt.headless=true -Dfile.encoding=U...
└─10842 /usr/share/elasticsearch/modules/x-pack-ml/platform/linux-x86_64/bin/controller
Jun 12 09:07:14 ip-10-0-0-170.us-west-1.compute.internal systemd[1]: Starting Elasticsearch...
Jun 12 09:07:16 ip-10-0-0-170.us-west-1.compute.internal elasticsearch[10738]: OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be rem...e release.
Jun 12 09:07:31 ip-10-0-0-170.us-west-1.compute.internal systemd[1]: Started Elasticsearch.
Hint: Some lines were ellipsized, use -l to show in full.
but when i check the logs there is another scenario
[2020-06-12T09:07:40,645][TRACE][o.e.d.PeerFinder ] [ip-10-0-0-170] not active
[2020-06-12T09:07:40,682][TRACE][o.e.d.PeerFinder ] [ip-10-0-0-170] deactivating and setting leader to {ip-10-0-0-158}{M5FiOa2KT263Vlni_7_5xQ}{xG43a8MUQpOPFAUA4NRTDw}{10.0.0.158}{10.0.0.158:9300}{dilm}{ml.machine_memory=16656257024, ml.max_open_jobs=20, xpack.installed=true}
[2020-06-12T09:07:40,682][TRACE][o.e.d.PeerFinder ] [ip-10-0-0-170] not active
[2020-06-12T09:07:40,732][TRACE][o.e.d.PeerFinder ] [ip-10-0-0-170] deactivating and setting leader to {ip-10-0-0-158}{M5FiOa2KT263Vlni_7_5xQ}{xG43a8MUQpOPFAUA4NRTDw}{10.0.0.158}{10.0.0.158:9300}{dilm}{ml.machine_memory=16656257024, ml.max_open_jobs=20, xpack.installed=true}
[2020-06-12T09:07:40,733][TRACE][o.e.d.PeerFinder ] [ip-10-0-0-170] not active
this is the same scenario in two of the nodes
[2020-06-12T00:00:00,197][TRACE][o.e.d.PeerFinder ] [ip-10-0-0-81] not active
[2020-06-12T00:00:00,353][TRACE][o.e.d.PeerFinder ] [ip-10-0-0-81] deactivating and setting leader to {ip-10-0-0-158}{M5FiOa2KT263Vlni_7_5xQ}{xG43a8MUQpOPFAUA4NRTDw}{10.0.0.158}{10.0.0.158:9300}{dilm}{ml.machine_memory=16656257024, ml.max_open_jobs=20, xpack.installed=true}
[2020-06-12T00:00:00,353][TRACE][o.e.d.PeerFinder ] [ip-10-0-0-81] not active
[2020-06-12T00:00:00,376][TRACE][o.e.d.PeerFinder ] [ip-10-0-0-81] deactivating and setting leader to {ip-10-0-0-158}{M5FiOa2KT263Vlni_7_5xQ}{xG43a8MUQpOPFAUA4NRTDw}{10.0.0.158}{10.0.0.158:9300}{dilm}{ml.machine_memory=16656257024, ml.max_open_jobs=20, xpack.installed=true}
and my elsaticsearch.yml file is
# ======================== Elasticsearch Configuration =========================
#
# NOTE: Elasticsearch comes with reasonable defaults for most settings.
# Before you set out to tweak and tune the configuration, make sure you
# understand what are you trying to accomplish and the consequences.
#
# The primary way of configuring a node is via this file. This template lists
# the most important settings you may want to configure for a production cluster.
#
# Please consult the documentation for further information on configuration options:
# https://www.elastic.co/guide/en/elasticsearch/reference/index.html
#
# ---------------------------------- Cluster -----------------------------------
#
# Use a descriptive name for your cluster:
#
cluster.name: argoid
#
# ------------------------------------ Node ------------------------------------
#
# Use a descriptive name for the node:
#
node.name: ip-10-0-0-170
node.master: true
node.data: true
#
# Add custom attributes to the node:
#
#node.attr.rack: r1
#
# ----------------------------------- Paths ------------------------------------
#
# Path to directory where to store the data (separate multiple locations by comma):
#
path.data: /data/1/elasticsearch
#
# Path to log files:
#
path.logs: /var/log/elasticsearch
bootstrap.system_call_filter: false
#
# ----------------------------------- Memory -----------------------------------
#
# Lock the memory on startup:
#
#bootstrap.memory_lock: true
#
# Make sure that the heap size is set to about half the memory available
# on the system and that the owner of the process is allowed to use this
# limit.
#
# Elasticsearch performs poorly when the system is swapping the memory.
#
# ---------------------------------- Network -----------------------------------
#
# Set the bind address to a specific IP (IPv4 or IPv6):
#
network.host: 10.0.0.170
#
# Set a custom port for HTTP:
#
http.port: 9200
#
# For more information, consult the network module documentation.
#
# --------------------------------- Discovery ----------------------------------
#
# Pass an initial list of hosts to perform discovery when new node is started:
# The default list of hosts is ["127.0.0.1", "[::1]"]
#
discovery.zen.ping.unicast.hosts: ["ip-10-0-0-170", "ip-10-0-0-81", "ip-10-0-0-158"]
cluster.initial_master_nodes: ["ip-10-0-0-170", "ip-10-0-0-81", "ip-10-0-0-158"]
#
# Prevent the "split brain" by configuring the majority of nodes (total number of master-eligible nodes / 2 + 1):
#
#discovery.zen.minimum_master_nodes: 2
#
# For more information, consult the zen discovery module documentation.
#
# ---------------------------------- Gateway -----------------------------------
#
# Block initial recovery after a full cluster restart until N nodes are started:
#
#gateway.recover_after_nodes: 3
#
# For more information, consult the gateway module documentation.
#
# ---------------------------------- Various -----------------------------------
#
# Require explicit names when deleting indices:
#
#action.destructive_requires_name: true
#xpack.security.authc.realms.keycloak.order: 0
#xpack.security.authc.realms.keycloak.type: keycloak
#xpack.security.authc.realms.keycloak.config: keycloak.config
xpack.security.enabled: true
#xpack.license.self_generated.type: basic
xpack.security.transport.ssl.enabled: true
xpack.security.transport.ssl.verification_mode: certificate
xpack.security.transport.ssl.keystore.path: elastic-certificates.p12
xpack.security.transport.ssl.truststore.path: elastic-certificates.p12
logger.org.elasticsearch.cluster.coordination.ClusterBootstrapService: TRACE
logger.org.elasticsearch.discovery: TRACE
can anyone tell me why it is happening
thanks in advance