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

Exception in thread "main" org.elasticsearch.bootstrap.BootstrapException: java.nio.file.NoSuchFileException: /usr/share/elasticsearch/config #26699

Closed
nonokh opened this issue Sep 18, 2017 · 4 comments

Comments

@nonokh
Copy link

nonokh commented Sep 18, 2017

Elasticsearch version (bin/elasticsearch --version):
Version: 5.6.1, Build: 667b497/2017-09-14T19:22:05.189Z, JVM: 9

Plugins installed:

JVM version(java -version):
java version "9"

OS version** (uname -a if on a Unix-like system):
Linux nono-Inspiron-3542 4.10.0-32-generic #36~16.04.1-Ubuntu SMP Wed Aug 9 09:19:02 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

Description of the problem including expected versus actual behavior:
i am unable to start elasticsearch and getting the following `error:

root@nono-Inspiron-3542:/usr/share/elasticsearch# ./bin/elasticsearch
Java HotSpot(TM) 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
Exception in thread "main" org.elasticsearch.bootstrap.BootstrapException: java.nio.file.NoSuchFileException: /usr/share/elasticsearch/config
Likely root cause: java.nio.file.NoSuchFileException: /usr/share/elasticsearch/config
at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116)
at java.base/sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55)
at java.base/sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:145)
at java.base/sun.nio.fs.LinuxFileSystemProvider.readAttributes(LinuxFileSystemProvider.java:99)
at java.base/java.nio.file.Files.readAttributes(Files.java:1755)
at java.base/java.nio.file.FileTreeWalker.getAttributes(FileTreeWalker.java:225)
at java.base/java.nio.file.FileTreeWalker.visit(FileTreeWalker.java:276)
at java.base/java.nio.file.FileTreeWalker.walk(FileTreeWalker.java:322)
at java.base/java.nio.file.Files.walkFileTree(Files.java:2705)
at org.elasticsearch.common.logging.LogConfigurator.configure(LogConfigurator.java:150)
at org.elasticsearch.common.logging.LogConfigurator.configure(LogConfigurator.java:122)
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:307)
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:132)
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:123)
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:67)
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:134)
at org.elasticsearch.cli.Command.main(Command.java:90)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:91)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:84)
Refer to the log for complete error

Provide logs (if relevant): my /var/log/elasticsearch/ is empty. i am confused.

@jasontedor
Copy link
Member

jasontedor commented Sep 18, 2017

I think that you installed Elasticsearch from the Debian package but you're trying to start Elasticsearch via bin/elasticsearch rather than via systemd. When installed from the package, the configuration files are placed in /etc/elasticsearch and the systemd service is configured to use this location. When you try to run /bin/elasticsearch, it defaults to using $ES_HOME/config as the location of the config files. Here, $ES_HOME would be /usr/share/elasticsearch. Since the Debian package does not create these on install, that's your problem here. That will not be your only problem. You should not try to start Elasticsearch from bin/elasticsearch when installed from a package, instead use the appropriate service manager (e.g., systemd). This is not a bug.

@jasontedor
Copy link
Member

jasontedor commented Sep 18, 2017

One other note: I see that you're running on JDK 9 here. While we test on JDK 9, we do not yet formally support running on JDK 9. This is especially the case since JDK 9 is not even GA yet.

@nonokh
Copy link
Author

nonokh commented Sep 19, 2017

Hey , thanks for the clarification. But when i ran the service as instructed. i am getting errors.
when i run : GET /
I get this instead:

"

<TITLE>Directory /</TITLE>

Directory listing of /

" and i have installed JDK8 instead too. and please specify what minimum changes is required in the .yml file for a test run. Sorry i am just a student and i am trying this as a project. Pardon the noobness.` and i have installed JDK8 instead too. and please specify what minimum changes is required in the .yml file for a test run. Sorry i am just a student and i am trying this as a project. Pardon the noobness.

@tvernum
Copy link
Contributor

tvernum commented Sep 19, 2017

Please ask these question on our discuss forum where we can provide better support.

Elastic uses GitHub issues for tracking bugs and feature requests. Since this is not a bug, we aren't able to support you here, but would be happy to discuss this on the forums.

Thanks.

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

No branches or pull requests

3 participants