Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to install plugin into Debian package installed Kibana #20449

Closed
chrisfischer opened this issue Jul 4, 2018 · 3 comments
Closed

Unable to install plugin into Debian package installed Kibana #20449

chrisfischer opened this issue Jul 4, 2018 · 3 comments
Labels
Team:Operations Team label for Operations Team

Comments

@chrisfischer
Copy link

chrisfischer commented Jul 4, 2018

Kibana version:
6.3.0

Elasticsearch version:
6.3.0

Server OS version:
Ubuntu 16.04

Browser version:
N.A.

Browser OS version:
N.A.

Original install method (e.g. download page, yum, from source, etc.):
First, https://www.elastic.co/guide/en/kibana/current/deb.html
Then, https://www.elastic.co/guide/en/kibana/current/targz.html

Describe the bug:
I am trying to install a custom plugin but am having varying degrees of success depending on what installation method I use.

First I installed Kibana through the .deb package. Then I tried to install the plugin through the file system.

$ sudo /usr/share/kibana/bin/kibana-plugin install file:///home/cfischer/style-0.0.0.zip

Attempting to transfer from file:///home/cfischer/style-0.0.0.zip
Error: EACCES: permission denied, stat '/home/cfischer/style-0.0.0.zip'
Plugin installation was unsuccessful due to error "EACCES: permission denied, stat '/home/cfischer/style-0.0.0.zip'"

Because that didn't work, with the same Kibana instance, I tried installing through a url.

$ sudo /usr/share/kibana/bin/kibana-plugin install https://nofile.io/g/1uVmyWrVwUazLCOfIPfG6JWYIJ4tL8KZ3hJZqfEVqJUAw7rtPGEZhyzDapiGprNV/style-0.0.0.zip

Attempting to transfer from https://nofile.io/g/1uVmyWrVwUazLCOfIPfG6JWYIJ4tL8KZ3hJZqfEVqJUAw7rtPGEZhyzDapiGprNV/style-0.0.0.zip
Transferring unknown number of bytes
Transfer complete
Retrieving metadata from plugin archive
Error: end of central directory record signature not found
    at /usr/share/kibana/node_modules/yauzl/index.js:179:14
    at /usr/share/kibana/node_modules/yauzl/index.js:539:5
    at /usr/share/kibana/node_modules/fd-slicer/index.js:32:7
    at FSReqWrap.wrapper [as oncomplete] (fs.js:658:17)
Plugin installation was unsuccessful due to error "Error retrieving metadata from plugin archive"

Which seemed to get a bit further.

Lastly, I install Kibana through a .tar.gz, and installed the plugin through the filesystem. Which worked.

$ ~/kibana-6.3.0-linux-x86_64/bin/kibana-plugin install file:///home/cfischer/style-0.0.0.zip

Attempting to transfer from file:///home/cfischer/style-0.0.0.zip
Transferring 38456 bytes....................
Transfer complete
Retrieving metadata from plugin archive
Extracting plugin archive
Extraction complete
Optimizing and caching browser bundles...
Plugin installation complete

Expected behavior:
I would assume all these of these scenarios should result in the same thing. Though ideally, I would be able to install Kibana through .deb so I am able to run it as a service.

@jbudz
Copy link
Member

jbudz commented Jul 5, 2018

Hey @chrisfischer, thanks for filing. This may be a few things. I have a hunch it's permissions related and a side effect of our current build system. We're working on swapping it out and tracking at #7322.

The short version is our system packages run as the kibana user. The plugin installer will generate new files (w/ webpack). If running the plugin installer as root, the generated files will be owned by root and the kibana server won't have permissions to write/exec files after.

Can you try clearing everything out and reinstalling the deb, and then running kibana-plugin with sudo -u kibana?

If that doesn't work can you try installing the plugin with the cwd at /usr/share/kibana? This should be fine but worth narrowing down if the above doesn't work

@jbudz jbudz added feedback_needed Team:Operations Team label for Operations Team labels Jul 5, 2018
@chrisfischer
Copy link
Author

It seems that I don't have permissions to run the first.
Sorry, user cfischer is not allowed to execute 'bin/kibana-plugin install file:///home/cfischer/style-0.0.0.zip' as kibana on {hostname}

When cwd is /usr/share/kibana I get the same errors as when it was /

@thekofimensah
Copy link

I'm getting this same error @jbudz on 6.4.2 and can't seem to find a work around

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Operations Team label for Operations Team
Projects
None yet
Development

No branches or pull requests

3 participants