Elasticsearch 5.0.1 service not starting when managed by Puppet module on Ubuntu 14.04

I am testing an upgrade from Elasticsearch 2.4.1 to Elasticsearch 5.0.1 on Ubuntu 14.04. It is being configured by the newest version of the puppet-elasticsearch module (0.15.0) I ran the elasticsearch-migration module and it all checked out prior to me installing Elasticsearch 5.0.1

The issue I am facing is that the Elasticsearch instance service is not starting. It seems like there is an error which is not being caught since it returns ok when I attempt to start it. I am actively debugging it at the moment and will post my findings here when and if I find a solution but any feedback is appreciated.

Current init script: https://gist.github.com/erikanderson/fad9360aa317be3a3755d599f7b7b987

Edit 1:

I tried adding this line above the start-stop-daemon (from http://sandlininc.com/?p=747)
log_daemon_msg "sudo -u $ES_USER $DAEMON $DAEMON_OPTS"
which gave me this command to run:
sudo -u elasticsearch /usr/share/elasticsearch/bin/elasticsearch -d -p /var/run/elasticsearch-logyard.pid -Edefault.path.conf=/etc/elasticsearch/logyard -Edefault.path.data=/usr/share/elasticsearch/data -Edefault.path.home=/usr/share/elasticsearch -Edefault.path.logs=/var/log/elasticsearch/logyard
When I ran this it started the service successfully

Edit 2:

Once I disabled detaching the process in the start-stop-daemon (option -b) I got this error:
Error: encountered environment variables that are no longer supported Use jvm.options or ES_JAVA_OPTS to configure the JVM ES_HEAP_SIZE=4g: set -Xms4g and -Xmx4g in jvm.options or add "-Xms4g -Xmx4g" to ES_JAVA_OPTS

Edit 3: The process starts up now that ES_HEAP_SIZE is no longer set in the defaults file

Edit 4: Now it starts up but exits almost immediately with no errors or logs :frowning:

Edit 5: The reason it was stopping immediately was because the bootstrap checks failed
[2016-11-21T12:29:24,634][ERROR][o.e.b.Bootstrap ] [****] node validation exception bootstrap checks failed memory locking requested for elasticsearch process but memory is not locked
I commented out this setting and its working bootstrap.memory_lock: true
WIll have to address the mem lock issue before I can use that setting

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