Commit graph

10 commits

Author SHA1 Message Date
David Turner
3e61112b1e
Reword note on tmpfs (#95974)
There's no need to talk about unwelcome behaviour or power outages here,
and it caused at least one user some concern. This commit clarifies the
message.

Relates #95166
2023-05-10 13:47:01 +01:00
David Kilfoyle
2c8e29807e
[DOCS] Add note about /tmp removal (#95166) 2023-04-13 08:39:53 -04:00
Rafi Estrada
d0f96a8c0b
Add note about ENV for systemd installs (#91424)
* Add note about ENV for systemd installs

This ES_TMPDIR env variable is not referenced in the /guide/en/elasticsearch/reference/current/setting-system-settings.html#sysconfig section, and when searching for the error mentioned in this page, it might not become too obvious.

* Restructure

---------

Co-authored-by: Abdon Pijpelink <abdon.pijpelink@elastic.co>
2023-03-28 12:07:34 -05:00
Ryan Ernst
2cad2266d5
Suggest systemd override file instead of unit file for tmpdir (#93211)
The systemd unit file is part of the Elasticsearch package and should
not be edited. Instead, we recommend creating a service override file.
This commit tweaks the docs for setting tmp dir with systemd to use the
override file instead of editing the unit file.

relates #93121
2023-01-24 13:56:14 -08:00
David Turner
a4de6bd14a
Document how to set ES_TMPDIR in the service file (#93121)
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
2023-01-23 08:30:54 +00:00
David Turner
4e525d9a1a
Note libffi error message in tmpdir docs (#83662)
In #80617 we upgraded to a version of JNA which would report the message
`Failed to allocate closure` if the temp dir for `libffi` did not permit
executables (rather than crashing with a segfault). This commit extends
the docs to mention this message.
2022-02-08 17:36:17 +00:00
David Turner
57dbefe4fb
Set LIBFFI_TMPDIR at startup (#80651)
Today if `libffi` cannot allocate pages of memory which are both
writeable and executable then it will attempt to write code to a
temporary file. Elasticsearch configures itself a suitable temporary
directory for use by JNA but by default `libffi` won't find this
directory and will try various other places. In certain configurations,
none of the other places that `libffi` tries are suitable. With older
versions of JNA this would result in a `SIGSEGV`; since #80617 the JVM
will exit with an exception.

With this commit we use the `LIBFFI_TMPDIR` environment variable to
configure `libffi` to use the same directory as JNA for its temporary
files if they are needed.

Closes #18272
Closes #73309
Closes #74545
Closes #77014
Closes #77053
Relates #77285

Co-authored-by: Rory Hunter <roryhunter2@gmail.com>
2021-11-15 08:18:58 +00:00
André Letterer
aa544950b6
[DOCS] Include link to ES_TMPDIR with docs on jna.tmpdir (#72845) 2021-05-10 10:52:52 -05:00
James Rodewig
693807a6d3
[DOCS] Fix double spaces (#71082) 2021-03-31 09:57:47 -04:00
Jason Tedor
a6073f5130
Add docs on JNA temp directory not being noexec (#35355)
If the underlying mount point for the JNA temporary directory is mounted
noexec on Linux, then the JVM will not be able to map the native code in
as executable. This will prevent JNA from executing and will prevent
Elasticsearch from being able to execute some functions that rely on
native code (e.g., memory locking, and installing system call
filters). We do not want to get into the business of catching exceptions
and parsing messages towards this because these exception messages can
change on us. We also do not want to jump through a lot of hoops to
check the underlying mount point for noexec. Instead, we will rely on
documentation to address this problem. This commit adds to the important
system configuration section of the docs that the JNA temporary
directory is not on a mount point with the noexec mount option.
2018-11-07 22:25:37 -05:00