elastic / elasticsearch Public
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use ES_TMPDIR instead of java.io.tmpdir #74163
Comments
|
Pinging @elastic/es-core-infra (Team:Core/Infra) |
|
Hi, could someone explain how can we set the ES_TMPDIR parameter?, where is that value stored? is it only a environment variable, if so, this variable should be set as environment variable for the Elasticsearch user?, thanks. I am asking this because we found that our elastic environments could not start after setting /dev/shm and /tmp dirs to noexec. Setting this parameter in jvm.options to an Elasticsearch owned dir fixed the issue, but I think setting the environment variable is a better solution. Thanks. |
|
can I start working on it? |
|
We also need to keep in mind #77014, which is very relevant here. |
|
Hi Can i work on this issue or is it already assigned? |
|
I don't believe anyone is working on this issue right now. |
|
@pugnascotia I went through #77285 and its waiting for the pull request to be merged into the master. Can you please advise if this issue is resolved or still open to be resolved. If so then, I would like to look into it and resolve it. Between, I'm looking to contribute to this project for the first time and am very excited to resolve any open issue/bug on this product as a first time contrbutor. |
|
#77285 is just about changing the documentation, so the issue here is still valid. I'm not sure whether we're fully scoped out the required work here - @pgomulka did you do any thinking about what code changes are required? From a brief glance, I'm guessing startup scripts and maybe the CLI launcher classes? |
|
@pugnascotia Thank you for letting me know about #77285. While going through the comments on this issue, I went through #77014 and #77053 and they are connected to this issue. So, if we solve this issue, then we solve the other 2 issues as well, though #77014 activity log says that it needs libffi library to be at 3.4.2. But, the latest version of JNA is using libffi-3.3.0. |
|
Hello! Is there any way to find the given issue in the master branch? Thanks! |


We should ignore java.io.tmpdir and override it with ES_TMPDIR. I think that variable should be taken into account from the beginning of startup scripts (including JavaVersionChecker) and the value should be applied as java option to all java processes.
Java processes started before ES_JAVA_OPTS are parsed (JavaVersionChecker, TempDirectory, JvmOptionParser) can also create temporary files in /tmp if not provided with java.io.tmpdir
Most notably
TempDirectoryif ES_TMPDIR is not set will create a temporary dir in that directory - trying to find out system default tmp dir.JavaVersionCheckerand TempDirectory are run before JvmOptionParser is executed, hence these cannot know if java.io.tmpdir was set in jvm.options.The text was updated successfully, but these errors were encountered: