Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Mar 2018 15:29:46 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   [Bug 226800] textproc/elasticsearch6: Elasticsearch cannot delete its PID file
Message-ID:  <bug-226800-13@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D226800

            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@FreeBSD.org
          Reporter: ftigeot@wolfpond.org
          Assignee: feld@FreeBSD.org
             Flags: maintainer-feedback?(feld@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.ElasticsearchUncaughtExceptionHandle=
r]
[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 ?

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-226800-13>