-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Permission errors in packages after server optimizing #8818
Comments
This isn't a straightforward fix, there are a few options: Long term:
Short term:
Anything else I'm missing? I think documentation with #8845 makes sense now, and then putting the optimization step behind a flag for 6.0 (or 5.1)?, and then long term #7322. /cc @epixa @tylersmalley |
I agree that we should do the docs changes right now, but I think we should aggressively pursue #7322 now rather than doing an interim optimization flag change. |
Hi, I usually use a read-only filesystem for With Kibana, after install, I can start the server since nothing can be written to It should not be a breaking change since this data is only an internal implementation detail, only of Kibana's concern. Do you think it should be the new way of doing this ? |
I saw kibana src that it's using DATA_PATH env variable, maybe would be ok to move optimized data there or to TEMP? |
@spinus it's an interesting idea, I do think there's something there with moving the optimize files to a different folder for organizations sake. It won't fix this issue with the reproduction steps above though because the plugin installer ends up creating root owned files that the kibana server can't read. A different folder would still have that issue -there's nothing chowning the data folder post install. |
Fixes this issue for me. chmod g+s will ensure that even files created by root will have kibana group membership which allows elk to start. This gets me past the error. There are files without permissions created ... ??? -rw-rw-r-- 1 kibana kibana 1.1K Jul 26 20:50 a3b2c394347b7dba49ca15464bb9e234.svg |
@jbudz I installed X-Pack Kibana as root and got the permission error on graph.entry.js. I then removed the x-pack plugin and re-installed using: sudo -u kibana bin/kibana-plugin install x-pack I then get the following error: Plugin installation was unsuccessful due to error "EACCES: permission denied, open '/usr/share/kibana/optimize/bundles/graph.entry.js'" |
@hatdropper1977 it sounds like it could be leftover from the previous install. Can you try clearing out the optimize/bundles?
|
@jbudz I deleted the /usr/share/kibana directory, re-installed the RPM, tried again and that worked. Thanks! |
I'm seeing this now on 6.2.0-SNAPSHOT (from 6.x branch) on CentOS with the rpm package installed.
My kibana.yml contains this;
And my log file has this;
And my kibana/optimize directory (sorted) looks like this;
Just stopping and starting the kibana service gave the same error. I did;
|
I just hit this again on 6.2.0-SNAPSHOT rpm package on CentOS. |
Here's the |
I did also hit the same problem on ubuntu with the .deb package on 6.2.0-SNAPSHOT; {"type":"error","@timestamp":"2018-01-05T21:45:08Z","tags":["fatal"],"pid":3579,"level":"fatal","error":{"message":"EACCES: permission denied, open '/usr/share/kibana/optimize/bundles/ml.entry.js'","n |
I'm going to mark this as a blocker for 6.2. It seems like something changed from 6.1.x to make this worse. Even if we document to install x-pack as the kibana user I think we need to change how that kibana user is created in 6.2 otherwise it doesn't work (the user is created with --no-login or something like that). |
The snapshots were last created on January 3rd. It appears this is resolved by #15910 for 6.2. Per the documentation, we should be using Here are current builds: https://download.elastic.co/kibana/staging/6.2.0-SNAPSHOT-9578180/kibana/kibana-6.2.0-SNAPSHOT-amd64.deb |
@jimgoodwin FF tomorrow. Is this a blocker for 6.2.2? |
I think there's two issues;
|
+1 - just saw this after installing x-pack on 5.6.8 |
mark, i have the same problem on KIBANA 6.2 👍 |
@zhexiao was your problem specifically on 6.2.0? Or later? There was a change in 6.2.2 (latest release is 6.2.3 so that also has the fix). Also, please describe which package you're using (.deb, .rpm, .tar.gz) and if you installed x-pack, and exactly how you installed x-pack (including what user). If you untar the tar.gz package of Kibana as a non-root user. And also install x-pack as a non-root user I think there's no problem. Please correct me if I'm wrong. EVERYONEIf you install the .deb or .rpm package you have to do that as root. But you should install x-pack as the kibana user ( |
I'm going to close this since I believe following the lastest docs for installing x-pack resolves this issue on current releases. |
kibana x-pack uninstall (version 6.2.4) is still leaving leftovers in the
|
@aguyinmontreal from 6.3+ you can't install or uninstall x-pack. It's built-in to the default distribution. There's a separate OSS distribution without x-pack, but since we're no longer packing x-pack as a plugin, you can't install it there either. |
So everyone gets the trial license installed by default now? How is it possible to install X-pack with the "basic" license instead of the "trial" license? Before we were able to set |
@aguyinmontreal The default distribution now ships with a basic license out of the box for everyone. Folks can choose to opt-in to a trial via the Kibana license management UI. |
Kibana version: 5.0, 4.6
Original install method (e.g. download page, yum, from source, etc.): yum, deb
Description of the problem including expected versus actual behavior:
Plugin installs with deb and rpm packages typically result in bundles owned by root and file permissions set to 644. This is sufficient to run, but in certain situations such as disabling a plugin, the kibana server will attempt to regenerate these bundles. This results in permission denied errors because the server is not ran as root and can't write to these existing bundles.
Steps to reproduce:
Provide logs and/or server output (if relevant):
Oct 24 21:55:58 kbdeb64 kibana[24273]: {"type":"log","@timestamp":"2016-10-24T21:55:58Z","tags":["fatal"],"pid":24273,"level":"fatal","message":"EACCES: permission denied, open '/usr/share/kibana/optimize/bundles/graph.entry.js'","error":{"message":"EACCES: permission denied, open '/usr/share/kibana/optimize/bundles/graph.entry.js'","name":"Error","stack":"Error: EACCES: permission denied, open '/usr/share/kibana/optimize/bundles/graph.entry.js'\n at Error (native)","code":"EACCES"}}
Solution:
If installing the .deb or .rpm package (includes if you use
apt-get
,dpkg
,rpm
,yum
) follow updated instructions in https://www.elastic.co/guide/en/kibana/6.2/installing-xpack-kb.htmlSpecifically the part that says to install x-pack as the local kibana user that is created by installing Kibana
sudo -u kibana bin/kibana-plugin install x-pack
The text was updated successfully, but these errors were encountered: