# Kibana debian package not starting (chroot error)

**URL:** <https://discuss.elastic.co/t/kibana-debian-package-not-starting-chroot-error/266437>\
**Category:** Kibana\
**Created:** [March 6, 2021, 10:39am UTC](https://discuss.elastic.co/t/kibana-debian-package-not-starting-chroot-error/266437 "2021-03-06T10:39:11Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![ea1987](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ea1987/32/51356_2.png) [@ea1987](https://discuss.elastic.co/u/ea1987)\
**Post date:** [March 6, 2021, 10:39am UTC](https://discuss.elastic.co/t/kibana-debian-package-not-starting-chroot-error/266437/1 "2021-03-06T10:39:11Z")

</div>

Kibana version: 7.11 (current)  
Installation on: ubuntu (WSL2)  
Error on: start  
Kibana.log: chroot: cannot change root directory to '': No such file or directory

NB: Elasticsearch is running fine.

Can you please help me on this, guys?  
Thanks,

Andrea

---

<div class="post-metadata">

**Author:** ![poff](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/poff/32/81795_2.png) [@poff](https://discuss.elastic.co/u/poff)\
**Post date:** [March 9, 2021, 4:46pm UTC](https://discuss.elastic.co/t/kibana-debian-package-not-starting-chroot-error/266437/2 "2021-03-09T16:46:33Z")

</div>

Hey there!

Was this a fresh install or an upgrade when this started happening? Are there any other errors in the logs or is it just the chroot error?

Also, could you maybe run `ls -l` on the directory where kibana is installed to verify permissions look correct?

Thanks!

---

<div class="post-metadata">

**Author:** ![Fin4l](https://avatars.discourse-cdn.com/v4/letter/f/e0b2c6/32.png) [@Fin4l](https://discuss.elastic.co/u/Fin4l)\
**Post date:** [March 18, 2021, 1:09pm UTC](https://discuss.elastic.co/t/kibana-debian-package-not-starting-chroot-error/266437/3 "2021-03-18T13:09:15Z")

</div>

I have this same problem, change chown to root or kibana dont help.  
also reinstall.

---

<div class="post-metadata">

**Author:** ![alrubaa](https://avatars.discourse-cdn.com/v4/letter/a/db5fbb/32.png) [@alrubaa](https://discuss.elastic.co/u/alrubaa)\
**Post date:** [March 27, 2021, 9:29am UTC](https://discuss.elastic.co/t/kibana-debian-package-not-starting-chroot-error/266437/4 "2021-03-27T09:29:58Z")

</div>

Has anyone found a solution for this?  
This started to happen with Kibana on WSL2 with version 7.11.  
7.12 has same problem and Kibana does not run.  
I tried fresh install, with clean WSL2, I reinstalled Kibana 7.10 which works and upgraded to 7.11 or 7.12 and Kibana stops working.  
Permissions look fine for /usr/share/kibana, same as 7.10. Changed that to kibana:kibana, but issue persists. /etc/kibana permissions are correct. Any ideas or help please?  
Thank you  
AJ

---

<div class="post-metadata">

**Author:** ![jonasjancarik](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jonasjancarik/32/87174_2.png) [@jonasjancarik](https://discuss.elastic.co/u/jonasjancarik)\
**Post date:** [April 16, 2021, 9:23am UTC](https://discuss.elastic.co/t/kibana-debian-package-not-starting-chroot-error/266437/5 "2021-04-16T09:23:10Z")

</div>

Bumping - same issue encountered today

---

<div class="post-metadata">

**Author:** ![djcullen](https://avatars.discourse-cdn.com/v4/letter/d/bcef8e/32.png) [@djcullen](https://discuss.elastic.co/u/djcullen)\
**Post date:** [May 1, 2021, 5:35pm UTC](https://discuss.elastic.co/t/kibana-debian-package-not-starting-chroot-error/266437/6 "2021-05-01T17:35:40Z")

</div>

Bump; also suffering from the exact same issue after upgrading Kibana from 7.10.

---

<div class="post-metadata">

**Author:** ![gunayus](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gunayus/32/57478_2.png) [@gunayus](https://discuss.elastic.co/u/gunayus)\
**Post date:** [May 2, 2021, 2:15am UTC](https://discuss.elastic.co/t/kibana-debian-package-not-starting-chroot-error/266437/7 "2021-05-02T02:15:41Z")

</div>

same issue encountered just today, while upgrading from 7.10 to 7.12

---

<div class="post-metadata">

**Author:** ![docwalker](https://avatars.discourse-cdn.com/v4/letter/d/8c91f0/32.png) [@docwalker](https://discuss.elastic.co/u/docwalker)\
**Post date:** [May 5, 2021, 10:00pm UTC](https://discuss.elastic.co/t/kibana-debian-package-not-starting-chroot-error/266437/8 "2021-05-05T22:00:53Z")

</div>

Hi all, I've done some digging and have figured out my issues with this problem. I don't have the same setup as the OP but I hope this helps some of you.

CentOS 7  
kibana version 7.12

The chroot call is called from /etc/init.d/kibana in the start function around line 58.

```auto
    chroot --userspec "$user":"$group" "$chroot" -c "

      cd \"$chdir\"
      exec \"$program $args\"
      " >> /var/logs/kibana/kibana.log 2>&1 &

```

After a good amount of print debuging I found that $chroot and $chdir aren't set but $user and $group were. The user and group are set in a few places.

CentOS 7 now uses systemd instead of sysvinit and the configuration for services can also be found in a few places for precedence, and kibana has a file in /etc/systemd/system/kibana.service. This file does define a user and group but are capitalized.

This defines an environment file in /etc/sysconfig/kibana which does define a user and group. I added

chdir="/"  
chroot="/"

And the service now starts.

kibana.service also defines an enviornment file in /etc/default/kibana so you may also check there.

Hope this helps.

---

<div class="post-metadata">

**Author:** ![djcullen](https://avatars.discourse-cdn.com/v4/letter/d/bcef8e/32.png) [@djcullen](https://discuss.elastic.co/u/djcullen)\
**Post date:** [May 6, 2021, 12:50am UTC](https://discuss.elastic.co/t/kibana-debian-package-not-starting-chroot-error/266437/9 "2021-05-06T00:50:27Z")

</div>

Thanks a lot docwalker, I was completely blocked by this error.

Unfortunately, I'm running Kibana v7.12.1 on the old school Amazon Linux AMI which leverages SysV instead of systemd.

I simply added the 2 variables you provided directly into the /etc/init.d/kibana file which caused a different error to appear in the /var/log/kibana/kibana.log file:

sh: line 3: /usr/share/kibana/bin/kibana --logging.dest=/var/log/kibana/kibana.log: No such file or directory

After running an `ls -l` on /usr/share/kibana/bin/, I get the following output:

total 16  
-rwxr-xr-x 1 root root 850 Apr 20 20:34 kibana  
-rwxr-xr-x 1 root root 783 Apr 20 20:34 kibana-encryption-keys  
-rwxr-xr-x 1 root root 776 Apr 20 20:34 kibana-keystore  
-rwxr-xr-x 1 root root 813 Apr 20 20:34 kibana-plugin

Chown to Kibana did not help. Still stuck, but at least I'm making progress now thanks to you!

---

<div class="post-metadata">

**Author:** ![Nikolay](https://avatars.discourse-cdn.com/v4/letter/n/a698b9/32.png) [@Nikolay](https://discuss.elastic.co/u/Nikolay)\
**Post date:** [May 19, 2021, 10:24am UTC](https://discuss.elastic.co/t/kibana-debian-package-not-starting-chroot-error/266437/10 "2021-05-19T10:24:51Z")

</div>

Hi @djcullen, I have the same issue now:  
sh: line 3: /usr/share/kibana/bin/kibana --logging.dest=/var/log/kibana/kibana.log: No such file or directory

Were you able to address this issue?

---

<div class="post-metadata">

**Author:** ![djcullen](https://avatars.discourse-cdn.com/v4/letter/d/bcef8e/32.png) [@djcullen](https://discuss.elastic.co/u/djcullen)\
**Post date:** [May 19, 2021, 3:45pm UTC](https://discuss.elastic.co/t/kibana-debian-package-not-starting-chroot-error/266437/11 "2021-05-19T15:45:51Z")

</div>

Hi @Nikolay , unfortunately after a lot of effort I was not able to overcome this issue. I had to cannibalize and tweak a third party Kibana sysv startup script in order to get the service started successfully.

---

<div class="post-metadata">

**Author:** ![Pushpam\_Kumar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pushpam_kumar/32/81795_2.png) [@Pushpam\_Kumar](https://discuss.elastic.co/u/Pushpam_Kumar)\
**Post date:** [May 21, 2021, 9:04am UTC](https://discuss.elastic.co/t/kibana-debian-package-not-starting-chroot-error/266437/12 "2021-05-21T09:04:35Z")

</div>

Hi @djcullen djcullen, try `sudo mkdir /usr/share/kibana/config/ && sudo cp /etc/kibana/kibana.yml /usr/share/kibana/config/kibana.yml` and then `sudo /usr/share/kibana/bin/kibana --allow-root`  
Explaination: So basically in the log you are getting `sh: line 3: /usr/share/kibana/bin/kibana --logging.dest=/var/log/kibana/kibana.log: No such file or directory` not because you don't have `/var/log/kibana/kibana.log`, you are getting this because `sudo service kibana start` try to run `/usr/share/kibana/bin/kibana/` and this is looking for kibana config. so I just copy the `kibana.yml` from `/etc/kibana/kibana.yml` into `/usr/share/kibana/config/` and I am running kibana directly from `/usr/share/kibana/bin/kibana`

I still have lots of doubt but fine for now for me.  
Hope it helped

---

<div class="post-metadata">

**Author:** ![frankdupree](https://avatars.discourse-cdn.com/v4/letter/f/a88e4f/32.png) [@frankdupree](https://discuss.elastic.co/u/frankdupree)\
**Post date:** [May 25, 2021, 6:40am UTC](https://discuss.elastic.co/t/kibana-debian-package-not-starting-chroot-error/266437/13 "2021-05-25T06:40:56Z")

</div>

@Pushpam_Kumar Thanks, This works, had to sign up to say thanks 😄

---

<div class="post-metadata">

**Author:** ![djcullen](https://avatars.discourse-cdn.com/v4/letter/d/bcef8e/32.png) [@djcullen](https://discuss.elastic.co/u/djcullen)\
**Post date:** [June 2, 2021, 5:19pm UTC](https://discuss.elastic.co/t/kibana-debian-package-not-starting-chroot-error/266437/14 "2021-06-02T17:19:48Z")

</div>

@Pushpam_Kumar Thanks a lot for your input on this. I had already established a workaround that allowed me to overcome the issue so I was reluctant to start messing around with things again.

Looks like this issue has been resolved in either 7.13.0 or 7.13.1 and I'm able to use the standard init.d script without having to create the config directory; as it was prior to 7.11.0.

---

<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:** [June 30, 2021, 5:20pm UTC](https://discuss.elastic.co/t/kibana-debian-package-not-starting-chroot-error/266437/15 "2021-06-30T17:20:20Z")

</div>

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