# Elasticsearch : we need to run on elasticsearch it will giving error

**URL:** <https://discuss.elastic.co/t/elasticsearch-we-need-to-run-on-elasticsearch-it-will-giving-error/81473>\
**Category:** Elasticsearch\
**Created:** [April 6, 2017, 12:54pm UTC](https://discuss.elastic.co/t/elasticsearch-we-need-to-run-on-elasticsearch-it-will-giving-error/81473 "2017-04-06T12:54:05Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![bvnages](https://avatars.discourse-cdn.com/v4/letter/b/ecccb3/32.png) [@bvnages](https://discuss.elastic.co/u/bvnages)\
**Post date:** [April 6, 2017, 12:54pm UTC](https://discuss.elastic.co/t/elasticsearch-we-need-to-run-on-elasticsearch-it-will-giving-error/81473/1 "2017-04-06T12:54:05Z")

</div>

org.elasticsearch.bootstrap.StartupException: java.lang.RuntimeException: can not run elasticsearch as root  
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:125) ~[elasticsearch-5.2.0.jar:5.2.0]  
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:112) ~[elasticsearch-5.2.0.jar:5.2.0]  
at org.elasticsearch.cli.SettingCommand.execute(SettingCommand.java:54) ~[elasticsearch-5.2.0.jar:5.2.0]  
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:122) ~[elasticsearch-5.2.0.jar:5.2.0]  
at org.elasticsearch.cli.Command.main(Command.java:88) ~[elasticsearch-5.2.0.jar:5.2.0]  
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:89) ~[elasticsearch-5.2.0.jar:5.2.0]  
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:82) ~[elasticsearch-5.2.0.jar:5.2.0]  
Caused by: java.lang.RuntimeException: can not run elasticsearch as root  
at org.elasticsearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:105) ~[elasticsearch-5.2.0.jar:5.2.0]  
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:203) ~[elasticsearch-5.2.0.jar:5.2.0]  
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:333) ~[elasticsearch-5.2.0.jar:5.2.0]  
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:121) ~[elasticsearch-5.2.0.jar:5.2.0]  
... 6 more

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 6, 2017, 1:07pm UTC](https://discuss.elastic.co/t/elasticsearch-we-need-to-run-on-elasticsearch-it-will-giving-error/81473/2 "2017-04-06T13:07:17Z")

</div>

> can not run elasticsearch as root

Run as another user than root

---

<div class="post-metadata">

**Author:** ![bvnages](https://avatars.discourse-cdn.com/v4/letter/b/ecccb3/32.png) [@bvnages](https://discuss.elastic.co/u/bvnages)\
**Post date:** [April 6, 2017, 1:18pm UTC](https://discuss.elastic.co/t/elasticsearch-we-need-to-run-on-elasticsearch-it-will-giving-error/81473/3 "2017-04-06T13:18:25Z")

</div>

here is the running as the normal user

2017-04-06 13:16:22,201 main ERROR Could not register mbeans java.security.AccessControlException: access denied ("javax.management.MBeanTrustPermission" "register")  
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:472)  
at java.lang.SecurityManager.checkPermission(SecurityManager.java:585)  
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.checkMBeanTrustPermission(DefaultMBeanServerInterceptor.java:1848)  
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:322)  
at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:522)  
at org.apache.logging.log4j.core.jmx.Server.register(Server.java:389)  
at org.apache.logging.log4j.core.jmx.Server.reregisterMBeansAfterReconfigure(Server.java:167)  
at org.apache.logging.log4j.core.jmx.Server.reregisterMBeansAfterReconfigure(Server.java:140)  
at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:541)  
at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:258)  
at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:206)  
at org.apache.logging.log4j.core.config.Configurator.initialize(Configurator.java:220)  
at org.apache.logging.log4j.core.config.Configurator.initialize(Configurator.java:197)  
at org.elasticsearch.common.logging.LogConfigurator.configureStatusLogger(LogConfigurator.java:125)  
at org.elasticsearch.common.logging.LogConfigurator.configureWithoutConfig(LogConfigurator.java:67)  
at org.elasticsearch.cli.Command.main(Command.java:85)  
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:89)  
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:82)

Exception in thread "main" SettingsException[Failed to load settings from /data/myWizard\_Services/elkhome/elasticsearch/elasticsearch-5.2.0/config/elasticsearch.yml]; nested: AccessDeniedException[/data/myWizard\_Services/elkhome/elasticsearch/elasticsearch-5.2.0/config/elasticsearch.yml];  
Likely root cause: java.nio.file.AccessDeniedException: /data/myWizard\_Services/elkhome/elasticsearch/elasticsearch-5.2.0/config/elasticsearch.yml  
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.newByteChannel(UnixFileSystemProvider.java:214)  
at java.nio.file.Files.newByteChannel(Files.java:361)  
at java.nio.file.Files.newByteChannel(Files.java:407)  
at java.nio.file.spi.FileSystemProvider.newInputStream(FileSystemProvider.java:384)  
at java.nio.file.Files.newInputStream(Files.java:152)  
at org.elasticsearch.common.settings.Settings$Builder.loadFromPath(Settings.java:914)  
at org.elasticsearch.node.internal.InternalSettingsPreparer.prepareEnvironment(InternalSettingsPreparer.java:102)  
at org.elasticsearch.bootstrap.Bootstrap.initialEnvironment(Bootstrap.java:257)  
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:297)  
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:121)  
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:112)  
at org.elasticsearch.cli.SettingCommand.execute(SettingCommand.java:54)  
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:122)  
at org.elasticsearch.cli.Command.main(Command.java:88)  
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:89)  
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:82)  
Refer to the log for complete error details.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 6, 2017, 2:40pm UTC](https://discuss.elastic.co/t/elasticsearch-we-need-to-run-on-elasticsearch-it-will-giving-error/81473/4 "2017-04-06T14:40:15Z")

</div>

You need to fix the access rights to the dirs.

---

<div class="post-metadata">

**Author:** ![bvnages](https://avatars.discourse-cdn.com/v4/letter/b/ecccb3/32.png) [@bvnages](https://discuss.elastic.co/u/bvnages)\
**Post date:** [April 11, 2017, 6:13am UTC](https://discuss.elastic.co/t/elasticsearch-we-need-to-run-on-elasticsearch-it-will-giving-error/81473/5 "2017-04-11T06:13:48Z")

</div>

Hi dadoonet

I am giving permissions to that directory as well. We are facing bellow issue.  
Could you please help me.

2017-04-11 06:07:17,272 main ERROR Could not register mbeans java.security.AccessControlException: Access denied ("javax.management.MBeanTrustPermission" "register")  
at java.security.AccessControlContext.checkPermissionWithCache(AccessControlContext.java:634)  
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:711)  
at java.lang.SecurityManager.checkPermission(SecurityManager.java:598)  
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.checkMBeanTrustPermission(DefaultMBeanServerInterceptor.java:1860)  
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:334)  
at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:534)  
at org.apache.logging.log4j.core.jmx.Server.register(Server.java:389)  
at org.apache.logging.log4j.core.jmx.Server.reregisterMBeansAfterReconfigure(Server.java:167)  
at org.apache.logging.log4j.core.jmx.Server.reregisterMBeansAfterReconfigure(Server.java:140)  
at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:541)  
at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:258)  
at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:206)  
at org.apache.logging.log4j.core.config.Configurator.initialize(Configurator.java:220)  
at org.apache.logging.log4j.core.config.Configurator.initialize(Configurator.java:197)  
at org.elasticsearch.common.logging.LogConfigurator.configureStatusLogger(LogConfigurator.java:125)  
at org.elasticsearch.common.logging.LogConfigurator.configureWithoutConfig(LogConfigurator.java:67)  
at org.elasticsearch.cli.Command.main(Command.java:85)  
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:89)  
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:82)

ERROR: no log4j2.properties found; tried [/home/venkata.bollineni/mywizardservices/elasticsearch/elasticsearch-5.2.0/config] and its subdirectories

---

<div class="post-metadata">

**Author:** ![bvnages](https://avatars.discourse-cdn.com/v4/letter/b/ecccb3/32.png) [@bvnages](https://discuss.elastic.co/u/bvnages)\
**Post date:** [April 11, 2017, 6:29am UTC](https://discuss.elastic.co/t/elasticsearch-we-need-to-run-on-elasticsearch-it-will-giving-error/81473/6 "2017-04-11T06:29:11Z")

</div>

Hi All,

I run the elastic-search .I will show the data.Could you please tell me its working fine or not.

[2017-04-11T06:20:03,955][INFO][o.e.n.Node] [] initializing ...  
[2017-04-11T06:20:04,080][INFO][o.e.e.NodeEnvironment] [ua5xLr6] using [1] data paths, mounts [[/ (rootfs)]], net usable\_space [28.8gb], net total\_space [31.4gb], spins? [unknown], types [rootfs]  
[2017-04-11T06:20:04,081][INFO][o.e.e.NodeEnvironment] [ua5xLr6] heap size [2gb], compressed ordinary object pointers [unknown]  
[2017-04-11T06:20:04,082][INFO][o.e.n.Node] node name [ua5xLr6] derived from node ID [ua5xLr6lRmSScDe8wKXyeg]; set [[node.name](http://node.name)] to override  
[2017-04-11T06:20:04,084][INFO][o.e.n.Node] version[5.2.0], pid[23618], build[24e05b9/2017-01-24T19:52:35.800Z], OS[Linux/3.10.0-514.10.2.el7.x86\_64/amd64], JVM[IBM Corporation/IBM J9 VM/1.8.0/2.8]  
[2017-04-11T06:20:05,192][INFO][o.e.p.PluginsService] [ua5xLr6] loaded module [aggs-matrix-stats]  
[2017-04-11T06:20:05,192][INFO][o.e.p.PluginsService] [ua5xLr6] loaded module [ingest-common]  
[2017-04-11T06:20:05,192][INFO][o.e.p.PluginsService] [ua5xLr6] loaded module [lang-expression]  
[2017-04-11T06:20:05,192][INFO][o.e.p.PluginsService] [ua5xLr6] loaded module [lang-groovy]  
[2017-04-11T06:20:05,192][INFO][o.e.p.PluginsService] [ua5xLr6] loaded module [lang-mustache]  
[2017-04-11T06:20:05,193][INFO][o.e.p.PluginsService] [ua5xLr6] loaded module [lang-painless]  
[2017-04-11T06:20:05,193][INFO][o.e.p.PluginsService] [ua5xLr6] loaded module [percolator]  
[2017-04-11T06:20:05,193][INFO][o.e.p.PluginsService] [ua5xLr6] loaded module [reindex]  
[2017-04-11T06:20:05,193][INFO][o.e.p.PluginsService] [ua5xLr6] loaded module [transport-netty3]  
[2017-04-11T06:20:05,193][INFO][o.e.p.PluginsService] [ua5xLr6] loaded module [transport-netty4]  
[2017-04-11T06:20:05,194][INFO][o.e.p.PluginsService] [ua5xLr6] no plugins loaded  
[2017-04-11T06:20:06,933][INFO][o.e.n.Node] initialized  
[2017-04-11T06:20:06,933][INFO][o.e.n.Node] [ua5xLr6] starting ...  
[2017-04-11T06:20:07,058][INFO][o.e.t.TransportService] [ua5xLr6] publish\_address {127.0.0.1:9300}, bound\_addresses {[::1]:9300}, {127.0.0.1:9300}  
[2017-04-11T06:20:07,063][WARN][o.e.b.BootstrapChecks] [ua5xLr6] max virtual memory areas vm.max\_map\_count [65530] is too low, increase to at least [262144]  
[2017-04-11T06:20:10,105][INFO][o.e.c.s.ClusterService] [ua5xLr6] new\_master {ua5xLr6}{ua5xLr6lRmSScDe8wKXyeg}{LK5yowMoQvqFaEleoR\_DFQ}{127.0.0.1}{127.0.0.1:9300}, reason: zen-disco-elected-as-master ([0] nodes joined)  
[2017-04-11T06:20:10,122][INFO][o.e.h.HttpServer] [ua5xLr6] publish\_address {127.0.0.1:9200}, bound\_addresses {[::1]:9200}, {127.0.0.1:9200}  
[2017-04-11T06:20:10,122][INFO][o.e.n.Node] [ua5xLr6] started  
[2017-04-11T06:20:10,136][INFO][o.e.g.GatewayService] [ua5xLr6] recovered [0] indices into cluster\_state

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 11, 2017, 6:48am UTC](https://discuss.elastic.co/t/elasticsearch-we-need-to-run-on-elasticsearch-it-will-giving-error/81473/7 "2017-04-11T06:48:24Z")

</div>

It's fine for development not for production.  
You'll need to fix bootstrap messages.

---

<div class="post-metadata">

**Author:** ![bvnages](https://avatars.discourse-cdn.com/v4/letter/b/ecccb3/32.png) [@bvnages](https://discuss.elastic.co/u/bvnages)\
**Post date:** [April 11, 2017, 7:43am UTC](https://discuss.elastic.co/t/elasticsearch-we-need-to-run-on-elasticsearch-it-will-giving-error/81473/8 "2017-04-11T07:43:43Z")

</div>

How to fix bootstraps messages

could you please tell me.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 11, 2017, 7:08pm UTC](https://discuss.elastic.co/t/elasticsearch-we-need-to-run-on-elasticsearch-it-will-giving-error/81473/9 "2017-04-11T19:08:25Z")

</div>

Just search for bootstrap in the docs. Everything is explained.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 9, 2017, 7:21pm UTC](https://discuss.elastic.co/t/elasticsearch-we-need-to-run-on-elasticsearch-it-will-giving-error/81473/10 "2017-05-09T19:21:52Z")

</div>

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