[Bug 226800] textproc/elasticsearch6: Elasticsearch cannot delete its PID file
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Tue Mar 20 15:29:48 UTC 2018
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=226800
Bug ID: 226800
Summary: textproc/elasticsearch6: Elasticsearch cannot delete
its PID file
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: ftigeot at wolfpond.org
Assignee: feld at FreeBSD.org
Flags: maintainer-feedback?(feld at FreeBSD.org)
textproc/elasticsearch6 sets up Elasticsearch to use a PID file located in
/var/run , /var/run/elasticsearch.pid
On my system, /var/run belongs to root:wheel and has permissions 755.
When Elasticsearch is started or stopped manually by running
/usr/local/etc/rc.d/elasticsearch start or stop, there is no obvious issue.
Unfortunately, in case of a system shutdown or reboot, Elasticsearch fails to
start again automatically:
[2018-03-20T07:37:33,968][WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler]
[cube] uncaught exception in thread [Thread-2]
org.elasticsearch.ElasticsearchException: Failed to delete pid file
/var/run/elasticsearch.pid
at org.elasticsearch.common.PidFile$1.run(PidFile.java:115)
~[elasticsearch-6.2.2.jar:6.2.2]
Caused by: java.nio.file.AccessDeniedException: /var/run/elasticsearch.pid
This seems to be because Elasticsearch itself tries to remove or rewrite the
PID file, and Elasticsearch is run as the elasticsearch user, not as root. It
doesn't have permission to delete or create files in /var/run.
I have access to a Debian system and it uses a /run/elasticsearch/ directory
belonging to elasticsearch:elasticsearch with permissions 755 to prevent the
kind of issues I am experiencing.
Would it be possible to modify this port to use a /var/run/elasticsearch/
directory ?
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-ports-bugs
mailing list