Elasticsearch fails to start

Hi everyone one. I am a junior sysadmin and I am very new to Elasticsearch.

My OS is CentOS 6.9 and I have installed elasticsearch-2.4.6 with Java 1.8.0_191
When I start the elasticsearch service I get the following error:

service elasticsearch start
Starting elasticsearch: log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: /var/log/elasticsearch/elasticsearch.log (Permission denied)
log4j:ERROR Either File or DatePattern options are not set for appender [index_search_slow_log_file].
Exception in thread "main" java.lang.IllegalStateException: Unable to access 'path.data' (/var/lib/elasticsearch/elasticsearch)
Likely root cause: java.nio.file.AccessDeniedException: /var/lib/elasticsearch/elasticsearch
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:84)
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
at sun.nio.fs.UnixFileSystemProvider.createDirectory(UnixFileSystemProvider.java:384)
at java.nio.file.Files.createDirectory(Files.java:674)
at java.nio.file.Files.createAndCheckIsDirectory(Files.java:781)
at java.nio.file.Files.createDirectories(Files.java:767)
at org.elasticsearch.bootstrap.Security.ensureDirectoryExists(Security.java:337)
at org.elasticsearch.bootstrap.Security.addPath(Security.java:314)
at org.elasticsearch.bootstrap.Security.addFilePermissions(Security.java:259)
at org.elasticsearch.bootstrap.Security.createPermissions(Security.java:212)
at org.elasticsearch.bootstrap.Security.configure(Security.java:118)
at org.elasticsearch.bootstrap.Bootstrap.setupSecurity(Bootstrap.java:212)
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:183)
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:286)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:45)
Refer to the log for complete error details.
[FAILED]

From that I've gone to look at the following logs:
java.io.FileNotFoundException: /var/log/elasticsearch/elasticsearch.log (Permission denied)
java.io.FileNotFoundException: /var/log/elasticsearch/elasticsearch_deprecation.log (Permission denied)
java.io.FileNotFoundException: /var/log/elasticsearch/elasticsearch_index_indexing_slowlog.log (Permission denied)
java.io.FileNotFoundException: /var/log/elasticsearch/elasticsearch_index_search_slowlog.log (Permission denied)

But the logs don't exist. Also with it stating "Permission denied" I did check the permission on the /var/log/elasticsearch folder and it was drwxr-xr-x which I would have through would be correct as I am starting the services as root.

Not sure where to look next, can anyone point me in the right direction?

Many thanks

How did you install Elasticsearch?
Why are you running such an old version?

Thanks for the reply Mark. The problem is now resolved. ES is supporting Nessus LCE. Ended up re installing there software, which resolved the problem. I don't now why there using such a old version, but have said that it need to be that one.

Would have deleted the post but was unable to.

Thanks again.

You are better off not doing that, it adds to the general knowledge base :slight_smile:

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.