# Expected configuration is missing from elasticsearch.yml

**URL:** <https://discuss.elastic.co/t/expected-configuration-is-missing-from-elasticsearch-yml/374861>\
**Category:** Elasticsearch\
**Created:** [February 21, 2025, 5:23pm UTC](https://discuss.elastic.co/t/expected-configuration-is-missing-from-elasticsearch-yml/374861 "2025-02-21T17:23:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rachelyang](https://avatars.discourse-cdn.com/v4/letter/r/51bf81/32.png) [@rachelyang](https://discuss.elastic.co/u/rachelyang)\
**Post date:** [February 21, 2025, 5:23pm UTC](https://discuss.elastic.co/t/expected-configuration-is-missing-from-elasticsearch-yml/374861/1 "2025-02-21T17:23:51Z")

</div>

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:

```auto
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:

```auto
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
