Skip to content
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

JvmOptionsParser - cannot resolve enviroment variables #47133

Closed
jetnet opened this issue Sep 25, 2019 · 4 comments · Fixed by #47189
Closed

JvmOptionsParser - cannot resolve enviroment variables #47133

jetnet opened this issue Sep 25, 2019 · 4 comments · Fixed by #47189
Labels
>bug :Delivery/Packaging RPM and deb packaging, tar and zip archives, shell and batch scripts Team:Delivery Meta label for Delivery team

Comments

@jetnet
Copy link

jetnet commented Sep 25, 2019

Version: ES 7.3.2
OS: CentOS Linux release 7.6.1810 (Core)

Change the path to gc.log in jvm.options:

9-:-Xlog:gc*,gc+age=trace,safepoint:file=${ES_TMPDIR}/gc.log:utctime,pid,tags:filecount=32,filesize=64m

ES cannot start:

Exception in thread "main" java.lang.RuntimeException: starting java failed with [1]
output:
[0.000s][error][logging] Error opening log file '${ES_TMPDIR}/gc.log': No such file or directory
[0.000s][error][logging] Initialization of output 'file=${ES_TMPDIR}/gc.log' using options 'filecount=32,filesize=64m' failed.
error:
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
Invalid -Xlog option '-Xlog:gc*,gc+age=trace,safepoint:file=${ES_TMPDIR}/gc.log:utctime,pid,tags:filecount=32,filesize=64m', see error log for details.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
        at org.elasticsearch.tools.launchers.JvmErgonomics.flagsFinal(JvmErgonomics.java:111)
        at org.elasticsearch.tools.launchers.JvmErgonomics.finalJvmOptions(JvmErgonomics.java:79)
        at org.elasticsearch.tools.launchers.JvmErgonomics.choose(JvmErgonomics.java:57)
        at org.elasticsearch.tools.launchers.JvmOptionsParser.main(JvmOptionsParser.java:89)
@ebadyano ebadyano added the :Delivery/Packaging RPM and deb packaging, tar and zip archives, shell and batch scripts label Sep 26, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra

@ebadyano
Copy link
Contributor

ebadyano commented Sep 26, 2019

Thank you for reporting this!

I was able to reproduce the issue. Interestingly, it works with ES 7.1.0 but not with ES 7.2.0 and not with ES 7.3.0.

@ebadyano ebadyano added the >bug label Sep 26, 2019
@ebadyano
Copy link
Contributor

Seems to be related to this #41962 and might be intentional.

@jasontedor Was this intentional effect of the PR that ENV variables wont be parsed anymore?

@jasontedor
Copy link
Member

No, that wasn't intentional. It's happening because we don't make the substitutions before starting the ergonomics JVM. I think we should solve this with an idea I've had for awhile, which is to move the substitution into the JVM options parser itself. I opened #47189 as a draft for feedback on the idea (it's a draft because it needs tests, and I haven't tested whether or not I even have the Windows implementation right).

@mark-vieira mark-vieira added the Team:Delivery Meta label for Delivery team label Nov 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Delivery/Packaging RPM and deb packaging, tar and zip archives, shell and batch scripts Team:Delivery Meta label for Delivery team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants