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

**URL:** <https://discuss.elastic.co/t/kibana-startup-failed-on-server-restart-when-pid-file-is-customized/167403>\
**Category:** Kibana\
**Created:** [February 7, 2019, 9:24am UTC](https://discuss.elastic.co/t/kibana-startup-failed-on-server-restart-when-pid-file-is-customized/167403 "2019-02-07T09:24:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ORich](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/orich/32/21675_2.png) [@ORich](https://discuss.elastic.co/u/ORich)\
**Post date:** [February 7, 2019, 9:24am UTC](https://discuss.elastic.co/t/kibana-startup-failed-on-server-restart-when-pid-file-is-customized/167403/1 "2019-02-07T09:24:38Z")

</div>

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'"}

---

<div class="post-metadata">

**Author:** ![ORich](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/orich/32/21675_2.png) [@ORich](https://discuss.elastic.co/u/ORich)\
**Post date:** [February 8, 2019, 10:55am UTC](https://discuss.elastic.co/t/kibana-startup-failed-on-server-restart-when-pid-file-is-customized/167403/2 "2019-02-08T10:55:28Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![bhavyarm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bhavyarm/32/22392_2.png) [@bhavyarm](https://discuss.elastic.co/u/bhavyarm)\
**Post date:** [February 18, 2019, 7:46pm UTC](https://discuss.elastic.co/t/kibana-startup-failed-on-server-restart-when-pid-file-is-customized/167403/3 "2019-02-18T19:46:03Z")

</div>

Hello Richard,

Can you please log a bug here?

> **[Build software better, together](https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Felastic%2Fkibana%2Fissues%2Fnew%3Ftemplate%3DBug_report.md)**
>
> GitHub is where people build software. More than 31 million people use GitHub to discover, fork, and contribute to over 100 million projects.

cc @jbudz

Thanks,  
Bhavya

---

<div class="post-metadata">

**Author:** ![jbudz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jbudz/32/45922_2.png) [@jbudz](https://discuss.elastic.co/u/jbudz)\
**Post date:** [February 19, 2019, 4:40pm UTC](https://discuss.elastic.co/t/kibana-startup-failed-on-server-restart-when-pid-file-is-customized/167403/4 "2019-02-19T16:40:11Z")

</div>

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](https://github.com/elastic/kibana/issues/12055)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 19, 2019, 4:40pm UTC](https://discuss.elastic.co/t/kibana-startup-failed-on-server-restart-when-pid-file-is-customized/167403/5 "2019-03-19T16:40:16Z")

</div>

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