# Upgrade from \<6.0 -\>6.4 fails with ES\_PATH\_CONF must be set to the configuration path chown: cannot access ‘/etc/elasticsearch/elasticsearch.keystore’: No such file or directory

**URL:** https://discuss.elastic.co/t/upgrade-from-6-0-6-4-fails-with-es-path-conf-must-be-set-to-the-configuration-path-chown-cannot-access-etc-elasticsearch-elasticsearch-keystore-no-such-file-or-directory/166803
**Category:** Elasticsearch
**Created:** [February 2, 2019, 2:54am UTC](https://discuss.elastic.co/t/upgrade-from-6-0-6-4-fails-with-es-path-conf-must-be-set-to-the-configuration-path-chown-cannot-access-etc-elasticsearch-elasticsearch-keystore-no-such-file-or-directory/166803 "2019-02-02T02:54:24Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![lvempati](https://avatars.discourse-cdn.com/v4/letter/l/f1d935/32.png) [@lvempati](https://discuss.elastic.co/u/lvempati)
#### Post date: [February 2, 2019, 2:54am UTC](https://discuss.elastic.co/t/upgrade-from-6-0-6-4-fails-with-es-path-conf-must-be-set-to-the-configuration-path-chown-cannot-access-etc-elasticsearch-elasticsearch-keystore-no-such-file-or-directory/166803/1 "2019-02-02T02:54:24Z")

</div>

Hello,

This problem has been raised multiple times but no resolution on any of the threads. I am hoping to get resolution on this one.

On CentOS 7, RPM update from a version \< 6.0 -\> 6.4 fails with this message and service doesn't come up.  
ES\_PATH\_CONF must be set to the configuration path  
chown: cannot access ‘/etc/elasticsearch/elasticsearch.keystore’: No such file or directory

Some research on ES\_PATH\_CONF and looking thru files found that, ES\_PATH\_CONF was introduced in 6.0. It was added to /etc/sysconfig/elasticsearch. RPM spec file defined this file as noreplace. So, upgrade from \<6.0 -\>6.4 created all the noreplace files are .rpmnew leaving the original file ( /etc/sysconfig/elasticsearch ) untouched. List of .rpmnew files  
warning: /etc/elasticsearch/elasticsearch.yml created as /etc/elasticsearch/elasticsearch.yml.rpmnew  
warning: /etc/elasticsearch/jvm.options created as /etc/elasticsearch/jvm.options.rpmnew  
warning: /etc/elasticsearch/log4j2.properties created as /etc/elasticsearch/log4j2.properties.rpmnew  
warning: /etc/init.d/elasticsearch created as /etc/init.d/elasticsearch.rpmnew  
warning: /etc/sysconfig/elasticsearch created as /etc/sysconfig/elasticsearch.rpmnew  
warning: /usr/lib/systemd/system/elasticsearch.service created as /usr/lib/systemd/system/elasticsearch.service.rpmnew

For 6.4, %posttrans section of RPM contains script to create /etc/elasticsearch/elasticsearch.keystore. This fails because it can't find ES\_PATH\_CONF. So, it prints the above message and quits.

Request to add migration for this script /etc/sysconfig/elasticsearch in %post section, something like this  
grep -q -x -F 'ES\_PATH\_CONF' /etc/sysconfig/elasticsearch || echo 'ES\_PATH\_CONF=/etc/elasticsearch' \>\> /etc/sysconfig/elasticsearch

Without this change, any rpm updates from \<6.0 to \>=6.4 will fail with same error.

Appreciate if this can be addressed in any upcoming releases. 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 2, 2019, 3:16am UTC](https://discuss.elastic.co/t/upgrade-from-6-0-6-4-fails-with-es-path-conf-must-be-set-to-the-configuration-path-chown-cannot-access-etc-elasticsearch-elasticsearch-keystore-no-such-file-or-directory/166803/2 "2019-02-02T03:16:39Z")

</div>

> [@lvempati](#):
>
> On CentOS 7, we did RPM upgrade from 1.7-\>6.1

Did you literally just change the repo source from 1.X to 6.X?

---

<div class="post-metadata">

### Author: ![lvempati](https://avatars.discourse-cdn.com/v4/letter/l/f1d935/32.png) [@lvempati](https://discuss.elastic.co/u/lvempati)
#### Post date: [February 2, 2019, 3:53am UTC](https://discuss.elastic.co/t/upgrade-from-6-0-6-4-fails-with-es-path-conf-must-be-set-to-the-configuration-path-chown-cannot-access-etc-elasticsearch-elasticsearch-keystore-no-such-file-or-directory/166803/3 "2019-02-02T03:53:41Z")

</div>

Moved to 6.1 a while ago. I am reporting a problem with 6.4 now.

1.x upgrade should be irrelevant for the problem mentioned. It would have happened with 5.6.14-\>6.4 as well.

---

<div class="post-metadata">

### Author: ![lvempati](https://avatars.discourse-cdn.com/v4/letter/l/f1d935/32.png) [@lvempati](https://discuss.elastic.co/u/lvempati)
#### Post date: [February 4, 2019, 5:21pm UTC](https://discuss.elastic.co/t/upgrade-from-6-0-6-4-fails-with-es-path-conf-must-be-set-to-the-configuration-path-chown-cannot-access-etc-elasticsearch-elasticsearch-keystore-no-such-file-or-directory/166803/4 "2019-02-04T17:21:13Z")

</div>

Looks like there is an existing GitHub issue related to similar issue. Added comment there as well.

> <https://github.com/elastic/puppet-elasticsearch/issues/977>

---

<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 4, 2019, 5:21pm UTC](https://discuss.elastic.co/t/upgrade-from-6-0-6-4-fails-with-es-path-conf-must-be-set-to-the-configuration-path-chown-cannot-access-etc-elasticsearch-elasticsearch-keystore-no-such-file-or-directory/166803/5 "2019-03-04T17:21:21Z")

</div>

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