Skip to content

Commit f0ab95e

Browse files
authored
Document how to set ES_TMPDIR in the service file (#93121) (#93134)
Today we suggest that users set `ES_TMPDIR` using `export`, which only works if you're running things directly from the shell. Yet most users encountering `ES_TMPDIR` problems seem to on RHEL and trying to run things via `systemd`, for whom the `export` suggestion doesn't work. This commit adds to the docs a suggestion of how to adjust the `systemd` service file to set the appropriate environment variable. Relates #80651
1 parent 3c89876 commit f0ab95e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

docs/reference/setup/sysconfig/executable-jna-tmpdir.asciidoc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,22 @@ filesystem, or configure {es} to use a different location for its temporary
2727
directory by setting the <<es-tmpdir,`$ES_TMPDIR`>> environment variable. For
2828
instance:
2929

30+
* If you are running {es} directly from a shell, set `$ES_TMPDIR` as follows:
31+
+
3032
["source","sh",subs="attributes"]
3133
--------------------------------------------
3234
export ES_TMPDIR=/usr/share/elasticsearch/tmp
3335
--------------------------------------------
3436

37+
* If you are using `systemd` to run {es} as a service, using the `systemctl`
38+
command, add the following line to the `[Service]` section of your
39+
`elasticsearch.service` unit file:
40+
+
41+
[source,text]
42+
--------------------------------------------
43+
Environment=ES_TMPDIR=/usr/share/elasticsearch/tmp
44+
--------------------------------------------
45+
3546
If you need finer control over the location of these temporary files, you can
3647
also configure the path that JNA uses with the <<set-jvm-options,JVM flag>>
3748
`-Djna.tmpdir=<path>` and you can configure the path that `libffi` uses for its

0 commit comments

Comments
 (0)