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
NPE when plugins dir is inaccessible #8839
NPE when plugins dir is inaccessible #8839
Conversation
64234a3
to
9b77ea6
Compare
@@ -469,7 +470,7 @@ protected static boolean hasLibExtension(Path lib) { | |||
// Let's try to find all _site plugins we did not already found | |||
Path pluginsFile = environment.pluginsFile(); | |||
|
|||
if (!Files.exists(pluginsFile) || !Files.isDirectory(pluginsFile)) { | |||
if (!FileSystemUtils.isAccessibleDirectory(pluginsFile, logger)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can this be == false
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@dadoonet full stack trace in logs would help a lot.
This wasn't in logs, actually. I had to run es manually in foreground to see it. Stack trace in log could give some clues to avoid running |
@bobrik Basically you can run elasticsearch with
|
Yep, but maybe trace should be in logs even if not enabled if we fail at initialization? |
LGTM |
Steps to reproduce: 1. Download fresh es. 2. `sudo mkdir plugins && sudo chmod 0700 plugins` 3. Start elasticsearch ``` elasticsearch-1.4.1 λ ./bin/elasticsearch [2014-12-09 12:18:59,025][INFO ][node ] [Piotr Rasputin] version[1.4.1], pid[16338], build[89d3241/2014-11-26T15:49:29Z] [2014-12-09 12:18:59,025][INFO ][node ] [Piotr Rasputin] initializing ... {1.4.1}: Initialization Failed ... - NullPointerException[null] ``` Closes elastic#8837.
9598949
to
90f2f1d
Compare
Steps to reproduce:
sudo mkdir plugins && sudo chmod 0700 plugins
Closes #8837.