[Bug 236840] textproc/elasticsearch6: Elasticsearch 6 service doesn't start at boot time with clear_tmp_enable="YES" in /etc/rc.conf
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Wed Mar 27 22:44:53 UTC 2019
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236840
Bug ID: 236840
Summary: textproc/elasticsearch6: Elasticsearch 6 service
doesn't start at boot time with clear_tmp_enable="YES"
in /etc/rc.conf
Product: Ports & Packages
Version: Latest
Hardware: amd64
OS: Any
Status: New
Severity: Affects Some People
Priority: ---
Component: Individual Port(s)
Assignee: feld at FreeBSD.org
Reporter: felix at zwame.pt
Flags: maintainer-feedback?(feld at FreeBSD.org)
Assignee: feld at FreeBSD.org
Created attachment 203199
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=203199&action=edit
Images showing the bug
I created a machine with FreeBSD 12.0 and the Elasticsearch 6 and, when we have
the option "Clean the /tmp filesystem on system startup"
(clear_tmp_enable="YES" in /etc/rc.conf) on, the Elasticsearch 6 service
doesn’t start at boot time.
"Clean the /tmp filesystem on system startup" is a security option at install
time, that can be enabled/disabled.
The problem happens because the Elasticsearch service starts soon after the
Clean /tmp service. The java process tries to write on /tmp at the same time
the clean /tmp service is deleting everything in /tmp.
Most of the time, there is no error on the console, at boot, and nothing is
written in the logs. But one of the time, i saw the java process giving the
error that it couldn't open file /tmp/elasticsearch.xxxxxxxx/gc.log in the
console, at boot.
-------------------------------------------------------
Clearing /tmp.
OpenJDK 64-Bit Server VM Warning: Cannot open file
/tmp/elasticsearch.wzc6rYAS/gc.log
Updating motd:
-------------------------------------------------------
Even when there is no error in the boot console, the Elasticsearch 6 service
doesn't start at boot time with clear_tmp_enable="YES" in /etc/rc.conf.
After the boot sequence, i looked the status of the service, and the
Elasticsearch 6 service was not running.
-------------------------------------------------------
felix at elasticforum2:~ % doas service elasticsearch status
elasticsearch is not running.
-------------------------------------------------------
After boot, i started the Elasticsearch 6 service manually, with "service
elasticsearch start", it starts with no problem.
If, in /etc/rc.conf, if i comment the Clean /tmp service ( with
#clear_tmp_enable="YES" ), the Elasticsearch 6 service starts at boot without
problem.
-------------------------------------------------------
felix at elasticforum2:~ % doas service elasticsearch status
elasticsearch is running as pid 16306.
-------------------------------------------------------
I run the "rcorder /etc/rc.d/* /usr/local/etc/rc.d/*" command and it looks like
the problem is that the Elasticsearch 6 service starts before the Clean /tmp
service, but I’m not absolutely sure.
-------------------------------------------------------
/etc/rc.d/SERVERS
/usr/local/etc/rc.d/elasticsearch
/etc/rc.d/zfsd
/etc/rc.d/ntpdate
/etc/rc.d/rpcbind
/etc/rc.d/nisdomain
/etc/rc.d/ypserv
/etc/rc.d/ypxfrd
/etc/rc.d/ypupdated
/etc/rc.d/ypbind
/etc/rc.d/ypset
/etc/rc.d/yppasswdd
/etc/rc.d/ypldap
/etc/rc.d/wpa_supplicant
/etc/rc.d/virecover
/etc/rc.d/accounting
/etc/rc.d/nfsclient
/etc/rc.d/amd
/etc/rc.d/auditd
/etc/rc.d/auditdistd
/etc/rc.d/automountd
/etc/rc.d/automount
/etc/rc.d/autounmountd
/etc/rc.d/tmp
/etc/rc.d/cleartmp
-------------------------------------------------------
Thank you very much.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-ports-bugs
mailing list