From f76fde04cd34e2d5f9dba7cb28a53df2e290dd21 Mon Sep 17 00:00:00 2001 From: Jordan Sissel <131818+jordansissel@users.noreply.github.com> Date: Tue, 15 Aug 2017 13:20:31 -0700 Subject: [PATCH] Set RuntimeDirectory (#23526) This instruction tells systemd to create a directory /var/run/elasticsearch before starting Elasticsearch. Without this change, the default PID_DIR (/var/run/elasticsearch) may not exist, and without it, Elasticsearch will fail to start. --- distribution/src/main/packaging/systemd/elasticsearch.service | 1 + 1 file changed, 1 insertion(+) diff --git a/distribution/src/main/packaging/systemd/elasticsearch.service b/distribution/src/main/packaging/systemd/elasticsearch.service index b52f97d875f..409f04f76d0 100644 --- a/distribution/src/main/packaging/systemd/elasticsearch.service +++ b/distribution/src/main/packaging/systemd/elasticsearch.service @@ -5,6 +5,7 @@ Wants=network-online.target After=network-online.target [Service] +RuntimeDirectory=elasticsearch Environment=ES_HOME=/usr/share/elasticsearch Environment=ES_PATH_CONF=${path.conf} Environment=PID_DIR=/var/run/elasticsearch