I've been working with Elasticsearch on a Joyent SmartOS instance and
discovered a possible issue with the java_opts value in the
elasticsearch.xml file used to create the service.
The line currently reads:
This property ends up being passed to the startup command with the space
between them escaped, which causes the JVM to treat them as all one
argument. This can be seen in the output of the <path/to/jdk/bin/>jinfo
-sysprops <elasticsearch_pid>.
The first argument in the java_opts property is "-Djava.awt.headless=true",
but the java.awt.headless property contains true plus all the remaining
arguments:
java.awt.headless = true -Xss256k -XX:+DisableExplicitGC
-XX:+HeapDumpOnOutOfMemoryError -XX:+UseCMSInitiatingOccupancyOnly
-XX:+UseConcMarkSweepGC -XX:+UseParNewGC
-XX:CMSInitiatingOccupancyFraction=75.
If this property line is removed, and the value from this line is used to
replace %{java_opts} in the start exec_method, the results are as
expected from the jinfo command.
Note: After the elasticsearch.xml manifest edit, use "svcadm restart
manifest-import" for changes to take affect... or whatever method you
prefer.
Just wondering if there is a better solution? I'd also think that this a
bug since all the java options after ...headless = true are ignored (i.e.
no Heap dump etc.).
I've been working with Elasticsearch on a Joyent SmartOS instance and
discovered a possible issue with the java_opts value in the
elasticsearch.xml file used to create the service.
The line currently reads:
This property ends up being passed to the startup command with the space
between them escaped, which causes the JVM to treat them as all one
argument. This can be seen in the output of the <path/to/jdk/bin/>jinfo
-sysprops <elasticsearch_pid>.
The first argument in the java_opts property is
"-Djava.awt.headless=true", but the java.awt.headless property contains
true plus all the remaining arguments:
java.awt.headless = true -Xss256k -XX:+DisableExplicitGC
-XX:+HeapDumpOnOutOfMemoryError -XX:+UseCMSInitiatingOccupancyOnly
-XX:+UseConcMarkSweepGC -XX:+UseParNewGC
-XX:CMSInitiatingOccupancyFraction=75.
If this property line is removed, and the value from this line is used to
replace %{java_opts} in the start exec_method, the results are as
expected from the jinfo command.
Note: After the elasticsearch.xml manifest edit, use "svcadm restart
manifest-import" for changes to take affect... or whatever method you
prefer.
Just wondering if there is a better solution? I'd also think that this a
bug since all the java options after ...headless = true are ignored (i.e.
no Heap dump etc.).
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.