ELK v5 | Elasticsearch install problem

Hello
i followed this tutorial
Installation | Elasticsearch Guide [8.11] | Elastic

doing a ./elasticsearch as root is getting a error
so i have done (add) a new user with passwort, logget out and in as new user and startet
./elasticsearch

$ ./elasticsearch
2016-11-06 16:45:05,575 main ERROR FileManager (/elasticsearch-5.0.0/logs/elasticsearch.log) java.io.FileNotFoundException: /elasticsearch-5.0.0/logs/elasticsearch.log (Permission denied) java.io.FileNotFoundException: /elasticsearch-5.0.0/logs/elasticsearch.log (Permission denied)
at java.io.FileOutputStream.open0(Native Method)
at java.io.FileOutputStream.open(FileOutputStream.java:270)
at java.io.FileOutputStream.(FileOutputStream.java:213)
at java.io.FileOutputStream.(FileOutputStream.java:133)
at org.apache.logging.log4j.core.appender.rolling.RollingFileManager$RollingFileManagerFactory.createManager(RollingFileManager.java:430)
at org.apache.logging.log4j.core.appender.rolling.RollingFileManager$RollingFileManagerFactory.createManager(RollingFileManager.java:403)
at org.apache.logging.log4j.core.appender.AbstractManager.getManager(AbstractManager.java:73)
at org.apache.logging.log4j.core.appender.OutputStreamManager.getManager(OutputStreamManager.java:81)
at org.apache.logging.log4j.core.appender.rolling.RollingFileManager.getFileManager(RollingFileManager.java:103)
at org.apache.logging.log4j.core.appender.RollingFileAppender.createAppender(RollingFileAppender.java:191)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.build(PluginBuilder.java:132)
at org.apache.logging.log4j.core.config.AbstractConfiguration.createPluginObject(AbstractConfiguration.java:918)
at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:858)
at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:850)
at org.apache.logging.log4j.core.config.AbstractConfiguration.doConfigure(AbstractConfiguration.java:479)
at org.apache.logging.log4j.core.config.AbstractConfiguration.initialize(AbstractConfiguration.java:219)
at org.apache.logging.log4j.core.config.AbstractConfiguration.start(AbstractConfiguration.java:231)
at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:496)
at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:249)
at org.elasticsearch.common.logging.LogConfigurator.configure(LogConfigurator.java:116)
at org.elasticsearch.common.logging.LogConfigurator.configure(LogConfigurator.java:83)

do i have to do all steps with this user?

have a nice day
vinc

1 Like

How exactly did you install this? Deb, RPM, zip?

i just followed the steps in the link below
it is a new virtuell server with debian 8
the steps i have done i wrote down there http://wombat3.kozo.ch/j/index.php/kvm-list/9623

What does your elasticsearch.log look like? Is there one created??

Hello
there ist on (i went there as root)

root@ELK-01:/elasticsearch-5.0.0/logs# ls
elasticsearch.log elasticsearch_deprecation.log elasticsearch_index_indexing_slowlog.log elasticsearch_index_search_slowlog.log
root@ELK-01:/elasticsearch-5.0.0/logs# tail elasticsearch.log
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:96) ~[elasticsearch-5.0.0.jar:5.0.0]
at org.elasticsearch.cli.Command.main(Command.java:62) ~[elasticsearch-5.0.0.jar:5.0.0]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:80) ~[elasticsearch-5.0.0.jar:5.0.0]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:73) ~[elasticsearch-5.0.0.jar:5.0.0]
Caused by: java.lang.RuntimeException: can not run elasticsearch as root
at org.elasticsearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:96) ~[elasticsearch-5.0.0.jar:5.0.0]
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:155) ~[elasticsearch-5.0.0.jar:5.0.0]
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:286) ~[elasticsearch-5.0.0.jar:5.0.0]
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:112) ~[elasticsearch-5.0.0.jar:5.0.0]
... 6 more
root@ELK-01:/elasticsearch-5.0.0/logs#

everything whas installed with root execpt runing ./elasticsearch

Reproducing the steps you took. I downloaded, installed and ran elasticsearch as root and faced the same as yourself. To then attempt the same as a user and it worked a-okay. :slight_smile:

HI syswombat
Log in normal user don't log in with super user then try to run /.elasticsearch

hope you will get some permission issue ,if so then give 777 permission to whole unzipped elasticserach folder.you can also give only to log folder of ES also .

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