I'm trying to figure out how I am supposed to setup a consistent environment for logstash to startup correctly.
# /usr/share/logstash/bin/system-install
Successfully created system startup script for Logstash
Looks good, but when I run :
Mar 02 13:29:04 adva logstash[15141]: Could not find any executable java binary. Please install java in your PATH or set JAVA_HOME.
If I fix /etc/default/logstash
to include JAVA_HOME
then the service starts correctly
Now, the problem is each time I run system-install
it blows up /etc/default/logstash
which is now empty, and logstash doesn't start anymore.
My startup.options contains these non empty/comment lines :
JAVACMD=/usr/local/nabox/java/bin/java
LS_HOME=/usr/share/logstash
LS_SETTINGS_DIR=/opt/logstash/etc
LS_OPTS="--path.settings ${LS_SETTINGS_DIR}"
LS_JAVA_OPTS=""
LS_PIDFILE=/var/run/logstash.pid
LS_USER=logstash
LS_GROUP=logstash
LS_GC_LOG_FILE=/var/log/logstash/gc.log
LS_OPEN_FILES=16384
LS_NICE=19
SERVICE_NAME="logstash"
SERVICE_DESCRIPTION="logstash"
It has every information needed to create a workable startup script but is missing something obviously. What am I doing wrong? Is there something I can put here that would end up declaring JAVA_HOME
corectly in /etc/default/logstash