Kibana debian package not starting (chroot error)

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

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!

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

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

Bumping - same issue encountered today

1 Like

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

1 Like

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

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.

    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.

1 Like

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!

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?

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.

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

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

1 Like

@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.

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