# ES\_PATH\_CONF not considered in 6.2

**URL:** <https://discuss.elastic.co/t/es-path-conf-not-considered-in-6-2/125719>\
**Category:** Elasticsearch\
**Created:** [March 27, 2018, 9:16am UTC](https://discuss.elastic.co/t/es-path-conf-not-considered-in-6-2/125719 "2018-03-27T09:16:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![andreasmn](https://avatars.discourse-cdn.com/v4/letter/a/7993a0/32.png) [@andreasmn](https://discuss.elastic.co/u/andreasmn)\
**Post date:** [March 27, 2018, 9:16am UTC](https://discuss.elastic.co/t/es-path-conf-not-considered-in-6-2/125719/1 "2018-03-27T09:16:32Z")

</div>

Hi,

I'm just trying to upgrade from 5.6 to 6.2.  
I have a host with two elasticsearch instances running, which was working fine with 5.6.  
But since upgrading to 6.2 the environment variable for ES\_PATH\_CONF isn't working anymore.

I'm using Debian 9 and created an additional systemd service file here the relevant parts:

```
[Service]
RuntimeDirectory=elasticsearch-archiv
Environment=ES_HOME=/usr/share/elasticsearch
Environment=ES_PATH_CONF=/etc/elasticsearch-archiv
Environment=PID_DIR=/var/run/elasticsearch-archiv
EnvironmentFile=-/etc/default/elasticsearch-archiv

WorkingDirectory=/usr/share/elasticsearch

User=elasticsearch
Group=elasticsearch

ExecStart=/usr/share/elasticsearch/bin/elasticsearch -p ${PID_DIR}/elasticsearch.pid

```

In /etc/default/elasticsearch-archiv ES\_PATH\_CONF is set to /etc/elasticsearch-archiv as well.  
But still /etc/elasticsearch/ is used as ES\_PATH\_CONF!

If I try to start it from commandline with:  
`elasticsearch@elk01:/$ ES_PATH_CONF=/etc/elasticsearch-archiv /usr/share/elasticsearch/bin/elasticsearch -p /var/run/elasticsearch/elasticsearch-archiv.pid`

it still uses the config from /etc/elasticsearch/

Hope someone can help.

---

<div class="post-metadata">

**Author:** ![andreasmn](https://avatars.discourse-cdn.com/v4/letter/a/7993a0/32.png) [@andreasmn](https://discuss.elastic.co/u/andreasmn)\
**Post date:** [March 27, 2018, 9:24am UTC](https://discuss.elastic.co/t/es-path-conf-not-considered-in-6-2/125719/2 "2018-03-27T09:24:40Z")

</div>

Okay, I just found the issue....

on startup  
/usr/share/elasticsearch/bin/elasticsearch-env gets executed which has

`source /etc/default/elasticsearch`

hardcoded....

---

<div class="post-metadata">

**Author:** ![jasontedor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasontedor/32/66992_2.png) [@jasontedor](https://discuss.elastic.co/u/jasontedor)\
**Post date:** [March 27, 2018, 5:00pm UTC](https://discuss.elastic.co/t/es-path-conf-not-considered-in-6-2/125719/3 "2018-03-27T17:00:27Z")

</div>

This is [documented](https://www.elastic.co/guide/en/elasticsearch/reference/6.2/settings.html#config-files-location):

> For the package distributions, the config directory location defaults to `/etc/elasticsearch`. The location of the config directory can also be changed via the `ES_PATH_CONF` environment variable, but note that setting this in your shell is not sufficient. Instead, this variable is sourced from `/etc/default/elasticsearch` (for the Debian package) and `/etc/sysconfig/elasticsearch` (for the RPM package). You will need to edit the `ES_PATH_CONF=/etc/elasticsearch` entry in one of these files accordingly to change the config directory location.

---

<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:** [April 24, 2018, 5:00pm UTC](https://discuss.elastic.co/t/es-path-conf-not-considered-in-6-2/125719/4 "2018-04-24T17:00:29Z")

</div>

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