# Cluster setup issue when path.data and path.logs are configured

**URL:** <https://discuss.elastic.co/t/cluster-setup-issue-when-path-data-and-path-logs-are-configured/298124>\
**Category:** Elasticsearch\
**Created:** [February 24, 2022, 7:27am UTC](https://discuss.elastic.co/t/cluster-setup-issue-when-path-data-and-path-logs-are-configured/298124 "2022-02-24T07:27:45Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Newbie111985](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/newbie111985/32/17561_2.png) [@Newbie111985](https://discuss.elastic.co/u/Newbie111985)\
**Post date:** [February 24, 2022, 7:27am UTC](https://discuss.elastic.co/t/cluster-setup-issue-when-path-data-and-path-logs-are-configured/298124/1 "2022-02-24T07:27:45Z")

</div>

I am trying to setup a 3 node cluster using Elasticsearch-7.17.0 in linux. I have made the following configurations in `elasticsearch.yml` file of all 3 nodes:

```auto
path.data: /some/path/data
path.logs: /some/path/logs
network.host: 0.0.0.0
transport.host: 0.0.0.0
transport.port: 9300
http.port: 9200
xpack.security.enabled: true
xpack.security.transport.ssl.enabled: true
xpack.security.transport.ssl.verification_mode: certificate
xpack.security.transport.ssl.client_authentication: required
xpack.security.transport.ssl.keystore.path: es-cert.p12
xpack.security.transport.ssl.truststore.path: es-cert.p12
discovery.seed_hosts: ["host1", "host2", "host3"]
cluster.initial_master_nodes: ["node-1", "node-2", "node-3"]

```

P.S. The configured values of `path.data` and `path.logs` are outside of Elasticsearch folder.

With this configuration, when I start each node it is choosing itself as master and doesn't try to contact the other nodes configured in `discovery.seed_hosts` or `cluster.initial_master_nodes`.  
But, if I just remove `path.data` and `path.logs` configurations from `elasticsearch.yml` file, it's working as expected. Hence I do not understand the reason for this strange behavior. Can anyone help me with this issue?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [February 24, 2022, 8:16am UTC](https://discuss.elastic.co/t/cluster-setup-issue-when-path-data-and-path-logs-are-configured/298124/2 "2022-02-24T08:16:03Z")

</div>

You'd really need to share your logs.

---

<div class="post-metadata">

**Author:** ![Newbie111985](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/newbie111985/32/17561_2.png) [@Newbie111985](https://discuss.elastic.co/u/Newbie111985)\
**Post date:** [February 24, 2022, 8:29am UTC](https://discuss.elastic.co/t/cluster-setup-issue-when-path-data-and-path-logs-are-configured/298124/3 "2022-02-24T08:29:03Z")

</div>

Sure. I can share the logs for both working and non-working scenarios. Since the text is quite big, I don't think pasting it here is a good idea. So let me know how you want me to share it. Thanks.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [February 24, 2022, 8:41am UTC](https://discuss.elastic.co/t/cluster-setup-issue-when-path-data-and-path-logs-are-configured/298124/4 "2022-02-24T08:41:12Z")

</div>

Gist/pastebin/etc is fine.

---

<div class="post-metadata">

**Author:** ![casterQ](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/casterq/32/93257_2.png) [@casterQ](https://discuss.elastic.co/u/casterQ)\
**Post date:** [February 24, 2022, 8:44am UTC](https://discuss.elastic.co/t/cluster-setup-issue-when-path-data-and-path-logs-are-configured/298124/5 "2022-02-24T08:44:26Z")

</div>

Clean up your data path，such as : `rm -rf /some/path/data/* `，then start the node

---

<div class="post-metadata">

**Author:** ![Newbie111985](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/newbie111985/32/17561_2.png) [@Newbie111985](https://discuss.elastic.co/u/Newbie111985)\
**Post date:** [February 24, 2022, 12:37pm UTC](https://discuss.elastic.co/t/cluster-setup-issue-when-path-data-and-path-logs-are-configured/298124/6 "2022-02-24T12:37:56Z")

</div>

Initially, I had setup the instance using minimal security (i.e. just the below security setting in `elasticsearch.yml` file)

```auto
xpack.security.enabled: true

```

After that, I had done the following:  
1)Created a certificate, added the certificate password to keystore in one of the node.  
2)Copied `elasticsearch.keystore` and the certificate from the first node to `$ES_HOME\config` path of other 2 nodes.  
Then I had tried to start Elasticsearch on all nodes and that's when I hit the above error. As [casterQ](https://discuss.elastic.co/u/casterQ) suggested above, I changed the `path.data` setting to a different folder and things are working as expected.

So, my question is if a node is setup with minimal security initially and later updated to enable basic security can no longer be able to use the initial data folder?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [February 27, 2022, 11:26pm UTC](https://discuss.elastic.co/t/cluster-setup-issue-when-path-data-and-path-logs-are-configured/298124/7 "2022-02-27T23:26:36Z")

</div>

> [@Newbie111985](#):
>
> So, my question is if a node is setup with minimal security initially and later updated to enable basic security can no longer be able to use the initial data folder?

That's not correct, you can use the same directory.

---

<div class="post-metadata">

**Author:** ![Newbie111985](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/newbie111985/32/17561_2.png) [@Newbie111985](https://discuss.elastic.co/u/Newbie111985)\
**Post date:** [February 28, 2022, 9:38am UTC](https://discuss.elastic.co/t/cluster-setup-issue-when-path-data-and-path-logs-are-configured/298124/8 "2022-02-28T09:38:08Z")

</div>

Thanks for the confirmation. But somehow this didn't work for me. As mentioned, I had initially started the server with single-node settings and later added configurations to `elasticsearch.yml` to make it a part of a cluster. But even after specifying required cluster configurations, it was not trying to discover other nodes (observed through logs) and electing itself as master. Only when I specified a different data folder path, things started working as expected (i.e. it was trying to discover other nodes). But I didn't face this problem when initially I setup the node with cluster configurations.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 28, 2022, 9:38am UTC](https://discuss.elastic.co/t/cluster-setup-issue-when-path-data-and-path-logs-are-configured/298124/9 "2022-03-28T09:38:29Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
