‘‘‘
Hi Folks,
#lasticsearch.yml file of node ip ending in 17 ( 8.15.2) still not upgraded
’’’
path.data: /var/lib/elasticsearch/data
path.logs: /var/log/elasticsearch/logs
xpack.security.enabled: false
xpack.security.enrollment.enabled: false
xpack.security.http.ssl:
enabled: false
keystore.path: certs/http.p12
xpack.security.transport.ssl:
enabled: false
verification_mode: certificate
keystore.path: certs/transport.p12
truststore.path: certs/transport.p12
#cluster.initial_master_nodes:
#- node1
#- node2
#- node3
network.host: localhost,192.168.0.10
http.port: 9201
searchguard.enterprise_modules_enabled: false
thread_pool.write.queue_size: 1000
xpack.security.http.ssl.supported_protocols:
- TLSv1.3
xpack.security.transport.ssl.supported_protocols: - TLSv1.3
http.max_content_length: 500mb
indices.query.bool.max_clause_count: 200000
thread_pool.search.size: 50
searchguard.ssl.transport.pemkey_filepath: node.key
searchguard.ssl.transport.pemcert_filepath: node-cert.pem
searchguard.ssl.transport.pemtrustedcas_filepath: ca-cert.pem
searchguard.ssl.transport.enforce_hostname_verification: false
searchguard.ssl.transport.enabled_protocols:
- TLSv1.2
- TLSv1.3
searchguard.ssl.http.pemkey_filepath: node.key
searchguard.ssl.http.pemcert_filepath: node-cert.pem
searchguard.ssl.http.pemtrustedcas_filepath: ca-cert.pem
searchguard.ssl.http.enabled: true
searchguard.ssl.http.enabled_ciphers:
- TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
- TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
- TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
- TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
- TLS_AES_256_GCM_SHA384
- TLS_CHACHA20_POLY1305_SHA256
- TLS_AES_128_GCM_SHA256
- TLS_AES_128_CCM_8_SHA256
- TLS_AES_128_CCM_SHA256
searchguard.ssl.http.enabled_protocols:
- TLSv1.2
- TLSv1.3
searchguard.authcz.admin_dn:
- emailAddress=admin@example.com,CN=signed-cert,OU=IT,O=ExampleOrg,L=City,ST=State,C=US
searchguard.nodes_dn:
- emailAddress=admin@example.com,CN=signed-cert,OU=IT,O=ExampleOrg,L=City,ST=State,C=US
searchguard.check_snapshot_restore_write_privileges: true
searchguard.restapi.roles_enabled:
- SGS_ALL_ACCESS
discovery.seed_hosts:
- 192.168.0.11
- 192.168.0.12
- 192.168.0.13
cluster.name: elasticsearch
node.name: node1
node.roles: [master]
bootstrap.memory_lock: true
’’’
I was upgrading two data nodes first from ES8.15.2 to 8.19.3 of three nodes cluster.
Cluster is not forming. node with Ip1 and node with ip2 are upgraded from 8.15.2 to 8.19.3 and on master-only node3 there is still ES 8.15.2 running.
ES service is up and running on are three nodes. On two nodes ES8.19.3 is installed and on third one ES8.15.2 is installed.
Below is curl command to list all cluster nodes, Its output throws an error as
master_not_discovered_exception
#curl -XGET -u user:pass https://localhost:9201/_cat/nodes?v -k
{"error":{"root_cause":[{"type":"master_not_discovered_exception","reason":null}],"type":"master_not_discovered_exception","reason":null},"status":503}[root@localhost Elasticsearch]#
#yaml file of ip1 ES8.19.3 Data node with ssl
[root@localhost Elasticsearch]# vi /etc/elasticsearch/elasticsearch.yml
path.data: /var/lib/elasticsearch/elasticsearch
path.logs: /var/log/elasticsearch/elasticsearch
xpack.security.enabled: true
xpack.security.enrollment.enabled: false
xpack.security.http.ssl:
enabled: true
key: cenode.key
certificate: cecert.pem
certificate_authorities: cacert.pem
xpack.security.transport.ssl:
enabled: true
verification_mode: certificate
key: cenode.key
certificate: cecert.pem
certificate_authorities: cacert.pem
cluster.initial_master_nodes:
-
ip1
-
ip2
-
ip3
network.host: localhost,ip1
http.port: 9201
http.max_content_length: 500mb
indices.query.bool.max_clause_count: 200000
thread_pool.write.queue_size: 1000
thread_pool.search.size: 50
xpack.security.http.ssl.supported_protocols: -
TLSv1.2
-
TLSv1.3
xpack.security.http.ssl.cipher_suites: -
TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
-
TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
-
TLS_AES_256_GCM_SHA384
-
TLS_CHACHA20_POLY1305_SHA256
-
TLS_AES_128_GCM_SHA256
-
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
-
TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
-
TLS_AES_128_CCM_8_SHA256
-
TLS_AES_128_CCM_SHA256
xpack.security.transport.ssl.supported_protocols: -
TLSv1.2
-
TLSv1.3
discovery.seed_hosts: -
ip1
-
ip2
-
ip3
cluster.name: elasticsearch
node.name: localhost
node.roles: [data, master]
bootstrap.memory_lock: trueyaml file of ip2 ES8.19.3 Data node with ssl
[root@localhost Elasticsearch]# vi /etc/elasticsearch/elasticsearch.yml
path.data: /var/lib/elasticsearch/elasticsearch
path.logs: /var/log/elasticsearch/elasticsearch
xpack.security.enabled: true
xpack.security.enrollment.enabled: false
xpack.security.http.ssl:
enabled: true
key: cenode.key
certificate: cecert.pem
certificate_authorities: cacert.pem
xpack.security.transport.ssl:
enabled: true
verification_mode: certificate
key: cenode.key
certificate: cecert.pem
certificate_authorities: cacert.pem
cluster.initial_master_nodes:
- ip1
- ip2
- ip3
network.host: localhost,ip2
http.port: 9201
http.max_content_length: 500mb
indices.query.bool.max_clause_count: 200000
thread_pool.write.queue_size: 1000
thread_pool.search.size: 50
xpack.security.http.ssl.supported_protocols: - TLSv1.2
- TLSv1.3
xpack.security.http.ssl.cipher_suites: - TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
- TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
- TLS_AES_256_GCM_SHA384
- TLS_CHACHA20_POLY1305_SHA256
- TLS_AES_128_GCM_SHA256
- TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
- TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
- TLS_AES_128_CCM_8_SHA256
- TLS_AES_128_CCM_SHA256
xpack.security.transport.ssl.supported_protocols: - TLSv1.2
- TLSv1.3
discovery.seed_hosts: - ip1
- ip2
- ip3
cluster.name: elasticsearch
node.name: localhost
node.roles: [data, master]
bootstrap.memory_lock: true
#curl command to list all cluster nodes
’curl -XGET -u user:pass https://localhost:9201/_cat/nodes?v -k’
’’’
{"error":{"root_cause":[{"type":"master_not_discovered_exception","reason":null}],"type":"master_not_discovered_exception","reason":null},"status":503}[root@localhost Elasticsearch]#
’’’
Usually cluster forms but sometime I got stuck at this problem.
‘‘‘
#Logs elasticsearch.log
see Troubleshooting discovery | Elasticsearch Guide [8.19] | Elastic
[2025-10-28T09:56:30,853][INFO ][o.e.c.c.ElectionSchedulerFactory] [localhostjimmysecond] retrying master election after [390] failed attempts; election attempts are currently scheduled up to [10000ms] apart
[2025-10-28T09:56:38,866][WARN ][o.e.c.c.ClusterFormationFailureHelper] [localhostjimmysecond] master not discovered or elected yet, an election requires 2 nodes with ids [wCc8I8nFRGu3aEAgy7BO2g, O8-JnJJnSc-mW69ho5b9hw], have discovered possible quorum [{localhostjimmysecond}{wCc8I8nFRGu3aEAgy7BO2g}{vMo5_Gk7RL-oHo26dec0Gw}{localhostjimmysecond}{X.X.97.18}{X.X97.18:9300}{dm}{8.19.3}{7000099-8536000}, {localhost.localdomain}{O8-JnJJnSc-mW69ho5b9hw}{3MF2LSx4Q1esTwGbKpxO9Q}{localhost.localdomain}{X.X.97.17}{X.X.97.17:9300}{m}{8.15.2}{7000099-8512000}, {localhostjimmy}{iWBhVh_4R82to5nuOd9PRA}{TAYCLd2oRlWrF0JnrkRLAw}{localhostjimmy}{X.X.97.19}{X.X97.19:9300}{dm}{8.19.3}{7000099-8536000}]; discovery will continue using [X.X.97.19:9300, X.X.97.17:9300] from hosts providers and [{localhostjimmysecond}{wCc8I8nFRGu3aEAgy7BO2g}{vMo5_Gk7RL-oHo26dec0Gw}{localhostjimmysecond}{X.X.97.18}{X.X.97.18:9300}{dm}{8.19.3}{7000099-8536000}] from last-known cluster state; node term 0, last-accepted version 0 in term 0; for troubleshooting guidance, see Troubleshooting discovery | Elasticsearch Guide [8.19] | Elastic
[2025-10-28T09:56:48,867][WARN ][o.e.c.c.ClusterFormationFailureHelper] [localhostjimmysecond] master not discovered or elected yet, an election requires 2 nodes with ids [wCc8I8nFRGu3aEAgy7BO2g, O8-JnJJnSc-mW69ho5b9hw], have discovered possible quorum [{localhostjimmysecond}{wCc8I8nFRGu3aEAgy7BO2g}{vMo5_Gk7RL-oHo26dec0Gw}{localhostjimmysecond}{X.X97.18}{X.X.97.18:9300}{dm}{8.19.3}{7000099-8536000}, {localhost.localdomain}{O8-JnJJnSc-mW69ho5b9hw}{3MF2LSx4Q1esTwGbKpxO9Q}{localhost.localdomain}{X.X97.17}{X.X97.17:9300}{m}{8.15.2}{7000099-8512000}, {localhostjimmy}{iWBhVh_4R82to5nuOd9PRA}{TAYCLd2oRlWrF0JnrkRLAw}{localhostjimmy}{X.X97.19}{X.X.97.19:9300}{dm}{8.19.3}{7000099-8536000}]; discovery will continue using [X.X97.19:9300, X.X.97.17:9300] from hosts providers and [{localhostjimmysecond}{wCc8I8nFRGu3aEAgy7BO2g}{vMo5_Gk7RL-oHo26dec0Gw}{localhostjimmysecond}{X.X.97.18}{X.X.97.18:9300}{dm}{8.19.3}{7000099-8536000}] from last-known cluster state; node term 0, last-accepted version 0 in term 0; for troubleshooting guidance, see Troubleshooting discovery | Elasticsearch Guide [8.19] | Elastic
’’’