Hi All,

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:

<propval name="java_opts" type="astring" value="-Djava.awt.headless=true 
-Xss256k -XX:+DisableExplicitGC -XX:+HeapDumpOnOutOfMemoryError 
-XX:+UseCMSInitiatingOccupancyOnly -XX:+UseConcMarkSweepGC -XX:+UseParNewGC 
-XX:CMSInitiatingOccupancyFraction=75" />

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.).

Thanks,
Dean

-- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/d12b9f63-a1b4-4b1b-a446-7a1278cd428a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to