Kibana startup failed on server restart when pid.file is customized

Environment: Kibana 6.5.1 - CentOS7 - pid.file = /var/run/kibana/kibana.pid

The /var/run or /run is used to store volatile runtime data. As a consequence, the /var/run/kibana directory does not exist any more at server startup. This is the reason why Kibana startup failed (see Kibana log file output below)

Same setup with elasticsearch is working fine. Elasticsearch service mgmt does setup /var/run/elasticsearch directory prior to starting elasticseach exe ... unlike Kibana apparently.

{"type":"error","@timestamp":"2019-02-07T09:03:07Z","tags":["fatal","root"],"pid":20539,"level":"fatal","error":{"message":"ENOENT: no such file or directory, open '/var/run/kibana/kibana.pid'","name":"Error","stack":"Error: ENOENT: no such file or directory, open '/var/run/kibana/kibana.pid'","code":"ENOENT"},"message":"ENOENT: no such file or directory, open '/var/run/kibana/kibana.pid'"}

As a workaround, here is a line to be inserted in /etc/systemd/system/kibana.service:

ExecStartPre=sudo install -g kibana -o kibana -m 755 -d /var/run/kibana

1 Like

Hello Richard,

Can you please log a bug here?

cc @jbudz

Thanks,
Bhavya

Thanks for the report, confirming that it is a bug in Kibana. We need to add some infrastructure to get separate config files for deb/rpm packages, and then we'll include a tmpfiles.d file in the systemd packages.

Issue at https://github.com/elastic/kibana/issues/12055

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