Kindly help. While I am building a cluster with two nodes in version 8.15, I have started node1, and generated a token for node2 by command: /usr/share/elasticsearch/bin/elasticsearch-create-enrollment-token -s node
But, when I use the token on the node2, /usr/share/elasticsearch/bin/elasticsearch-reconfigure-node --enrollment-token eyJ2ZXIiO***SJ9
it gives me this error:
Generates all the necessary security configuration for a node in a secured cluster
Option Description
------ -----------
-E <KeyValuePair> Configure a setting
--enrollment-token The enrollment token to use
-h, --help Show help
-s, --silent Show minimal output
-v, --verbose Show verbose output
ERROR: Aborting enrolling to cluster. This node doesn't appear to be auto-configured for security. Expected configuration is missing from elasticsearch.yml., with exit code 64
Here is the elasticsearch.yml on node2:
path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch
http.port: 9200
transport.host: 0.0.0.0
discovery.seed_hosts: ["node1", "node2"]
cluster.initial_master_nodes: [ "node2" ]
xpack.security.enabled: true
xpack.security.enrollment.enabled: true
# Enable encryption for HTTP API client connections, such as Kibana, Logstash, and Agents
xpack.security.http.ssl:
enabled: true
keystore.path: certs/http.p12
# Enable encryption and mutual authentication between cluster nodes
xpack.security.transport.ssl:
enabled: true
verification_mode: certificate
keystore.path: certs/elastic-certificates.p12
truststore.path: certs/elastic-certificates.p12
What settings are still missing in the yml file ?
Thanks