-
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
kibana --version should not complain about not being able to optimize whatever. #39223
Comments
Pinging @elastic/kibana-operations |
Hey @jsoref, this is happening because some of the internal cache files that Kibana uses to run efficiently have the wrong permissions. Every kibana installation requires write access to its internal Can you please walk us through how you installed Kibana? What happened after that? Were there any errors in the installation process? What about afterward? Can you share the output of |
At some point I ran the plug-in install task as root because your documentation is terrible. I don't care that your cache isn't behaving the way you want it to. When a user runs If you insist on performing an optimization task, you should swallow any errors you encounter. |
Alright, please don't lash out at me, I'm trying to help. Unfortunately we don't control the errors because they happen out of band and "optimization" is somewhat of a misnomer, it's transpiling things like import statements so that they code can be executed, which isn't something we can ignore, it's required for the code to run. |
In this case, it clearly isn't, since the version code has already run. |
Fair enough, writing to the cache only happens at the end of the process, after the transpiler has run and the code has executed, which is why it's after the Would you like to suggest how we can improve the docs to avoid this type of issue in the first place? I'm personally a pretty big fan of never swallowing errors, since they can be very valuable clues when trying to understand why other, seemingly unrelated things, aren't working. We could potentially request changes in our upstream package providers to make sure this error is printed to stderr instead of stdout, in case you were trying to collect the version in a script or something... But I don't think it's helpful to not tell users that there is something wrong when there is something wrong (though I admit this error isn't particularly clear about what is wrong). |
Somewhere there are places that suggest running the plug-in installer as root. It should ideally be a command that figures out the right user. At worst, it should include explanatory text explaining how a user should figure out the right answer. Beyond that, as this seems to be a common problem, if the app runs as root, it should check ownership of the files and at the very least warn about the risk, ideally refusing to write over files owned by a different user. As to using standard error, that would be a moderate improvement. But please keep in mind that you, a very experienced user, totally missed the version information in the output. As such, that really isn't sufficient to help users. I think it's reasonable to argue that it is necessary, just not sufficient. |
I've sent and had PRs merged in the past. If someone can suggest commands/pages/branches, I could probably write one sooner. Otherwise it'll probably take me a while. |
Starting in 7.2 we will error if Kibana is run as root, as it should never be necessary, thanks to #21563. I've also done a search through the docs to find references to As for command/page/branch suggestions, not sure what type of suggestions you're looking for. Suggestions for editing the docs? building the docs: https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#writing-documentation links to => |
This is also happening for other bins, including the keystore. I believe the service file will pull the correct path in via /etc/default/kibana - but any direct use won't. |
babel/register was removed starting in 7.10 with #79379 so babel writes should no longer be a source of permission errors. Closing this out |
Kibana version:
6.8.0
Server OS version:
Ubuntu 18.04.2 LTS
Original install method (e.g. download page, yum, from source, etc.):
apt
:http://artifacts.elastic.co/packages/6.x/apt stable/main
Describe the bug:
Steps to reproduce:
Expected behavior:
with an exit value of
0
The text was updated successfully, but these errors were encountered: