Hello, I Installed ElasticSearch using DigitalOcean's guide on both my vultr and digitalocean droplets which both of them are giving errors
root@temp1hr:~# sudo service elasticsearch status
● elasticsearch.service - Elasticsearch
Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2017-09-18 12:39:16 UTC; 11min ago
Docs: http://www.elastic.co
Process: 8586 ExecStart=/usr/share/elasticsearch/bin/elasticsearch -Des.pidfile=${PID_DIR}/elasticsearch.pid -Des.default.path.home=${ES_HOME} -Des.default.path.logs=${LOG_DIR} -Des.default.path.data=${DATA_DIR} -Des.default.path.conf= Process: 8583 ExecStartPre=/usr/share/elasticsearch/bin/elasticsearch-systemd-pre-exec (code=exited, status=0/SUCCESS)
Main PID: 8586 (code=exited, status=1/FAILURE)
Sep 18 12:39:16 temp1hr elasticsearch[8586]: at org.elasticsearch.common.settings.Settings$Builder.loadFromStream(Settings.java:1071)
Sep 18 12:39:16 temp1hr elasticsearch[8586]: at org.elasticsearch.common.settings.Settings$Builder.loadFromPath(Settings.java:1058)
Sep 18 12:39:16 temp1hr elasticsearch[8586]: at org.elasticsearch.node.internal.InternalSettingsPreparer.prepareEnvironment(InternalSettingsPreparer.java:88)
Sep 18 12:39:16 temp1hr elasticsearch[8586]: at org.elasticsearch.bootstrap.Bootstrap.initialSettings(Bootstrap.java:202)
Sep 18 12:39:16 temp1hr elasticsearch[8586]: at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:241)
Sep 18 12:39:16 temp1hr elasticsearch[8586]: at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35)
Sep 18 12:39:16 temp1hr elasticsearch[8586]: Refer to the log for complete error details.
Sep 18 12:39:16 temp1hr systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE
Sep 18 12:39:16 temp1hr systemd[1]: elasticsearch.service: Unit entered failed state.
Sep 18 12:39:16 temp1hr systemd[1]: elasticsearch.service: Failed with result 'exit-code'.
and When I tried -
/usr/share/elasticsearch/bin/elasticsearch
it throws this on me -
root@temp1hr:~# /usr/share/elasticsearch/bin/elasticsearch
Exception in thread "main" ElasticsearchException[Failed to load logging configuration]; nested: NoSuchFileException[/usr/share/elasticsearch/config];
Likely root cause: java.nio.file.NoSuchFileException: /usr/share/elasticsearch/config
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
at sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55)
at sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:144)
at sun.nio.fs.LinuxFileSystemProvider.readAttributes(LinuxFileSystemProvider.java:99)
at java.nio.file.Files.readAttributes(Files.java:1737)
at java.nio.file.FileTreeWalker.getAttributes(FileTreeWalker.java:225)
at java.nio.file.FileTreeWalker.visit(FileTreeWalker.java:276)
at java.nio.file.FileTreeWalker.walk(FileTreeWalker.java:322)
at java.nio.file.Files.walkFileTree(Files.java:2662)
at org.elasticsearch.common.logging.log4j.LogConfigurator.resolveConfig(LogConfigurator.java:142)
at org.elasticsearch.common.logging.log4j.LogConfigurator.configure(LogConfigurator.java:103)
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:243)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35)
Refer to the log for complete error details.