LS 5.2: how to set different java for logstash process, installed by system-install?

Hi,

I am installing logstash from the tar. To install it as service I use the script $LS_HOME/bin/system-install

I changed the service name on $LS_HOME/config/startup.options, which works fine.
Additionally I would like to link to a dedicated java version.
So I changed the following parameter:

# Override Java location
JAVACMD=/usr/local/elk/java/current_jre8_x64/bin/java

The service is not starting, because there is currently no /usr/bin/java existing.
Ok, I could create a link there, then it works. But looks for me as if JAVA_CMD has no effect.

Also changing the pre running script in startup.options to

read -r -d '' PRESTART << EOM
export JAVA_HOME=/usr/local/elk/java/current_jre8_x64
EOM

did not help.

What exactly is the problem?

Thanks, Andreas

You might be running into https://github.com/elastic/logstash/issues/6482, which is fixed in https://github.com/elastic/logstash/pull/6660 (which will not be released until 5.3).

Which OS are you using?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.