# Unable to run ES5.02 on ubuntu 16.04

**URL:** https://discuss.elastic.co/t/unable-to-run-es5-02-on-ubuntu-16-04/67753
**Category:** Elasticsearch
**Created:** [December 1, 2016, 11:47am UTC](https://discuss.elastic.co/t/unable-to-run-es5-02-on-ubuntu-16-04/67753 "2016-12-01T11:47:34Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Karma](https://avatars.discourse-cdn.com/v4/letter/k/bcef8e/32.png) [@Karma](https://discuss.elastic.co/u/Karma)
#### Post date: [December 1, 2016, 11:47am UTC](https://discuss.elastic.co/t/unable-to-run-es5-02-on-ubuntu-16-04/67753/1 "2016-12-01T11:47:34Z")

</div>

I'm trying ES on Digital Ocean server, but having a problem when starting up ES.

Ubuntu 16.04.1 image (4gb)  
Java openjdk-8-jre-headless  
ES ver 5.0.2 (tar.gz)

Below is error message:

./bin/elasticsearch  
2016-12-01 11:25:55,258 main ERROR Could not register mbeans java.security.Acce  
ssControlException: access denied ("javax.management.MBeanTrustPermission" "reg  
ister")  
at java.security.AccessControlContext.checkPermission(AccessControlCont  
ext.java:472)  
at java.lang.SecurityManager.checkPermission(SecurityManager.java:585)  
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.checkMBeanTrus  
tPermission(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:390)  
at org.apache.logging.log4j.core.jmx.Server.reregisterMBeansAfterReconf  
igure(Server.java:167)  
at org.apache.logging.log4j.core.jmx.Server.reregisterMBeansAfterReconf  
igure(Server.java:140)  
at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerC  
ontext.java:507)  
at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java  
:249)  
at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Lo  
g4jContextFactory.java:206)  
at org.apache.logging.log4j.core.config.Configurator.initialize(Configu  
rator.java:219)  
at org.apache.logging.log4j.core.config.Configurator.initialize(Configu  
rator.java:196)  
at org.elasticsearch.common.logging.LogConfigurator.configureStatusLogg  
er(LogConfigurator.java:125)  
at org.elasticsearch.common.logging.LogConfigurator.configureWithoutCon  
fig(LogConfigurator.java:67)  
at org.elasticsearch.cli.Command.main(Command.java:59)  
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 /home  
/elasticsearch/config/elasticsearch.yml]; nested: AccessDeniedException[/home/e  
lasticsearch/config/elasticsearch.yml];  
Likely root cause: java.nio.file.AccessDeniedException: /home/elasticsearch/con  
fig/elasticsearch.yml  
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:8  
4)  
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102  
)  
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107  
)  
at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvi  
der.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(FileSystemProvid  
er.java:384)  
at java.nio.file.Files.newInputStream(Files.java:152)  
at org.elasticsearch.common.settings.Settings$Builder.loadFromPath(Sett  
ings.java:927)  
at org.elasticsearch.node.internal.InternalSettingsPreparer.prepareEnvi  
ronment(InternalSettingsPreparer.java:102)  
at org.elasticsearch.bootstrap.Bootstrap.initialEnvironment(Bootstrap.j  
ava:212)  
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:252)  
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:12  
1)  
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:  
96)  
at org.elasticsearch.cli.Command.main(Command.java:62)  
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:89  
)  
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:82  
)

---

<div class="post-metadata">

### Author: ![kaem2111](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kaem2111/32/24961_2.png) [@kaem2111](https://discuss.elastic.co/u/kaem2111)
#### Post date: [December 1, 2016, 1:26pm UTC](https://discuss.elastic.co/t/unable-to-run-es5-02-on-ubuntu-16-04/67753/2 "2016-12-01T13:26:43Z")

</div>

same for me ES5.02 on RHEL6.8.  
Could ES get started after setting again:  
**xpack.security.http.ssl.enabled: false**  
but message still occurs.

---

<div class="post-metadata">

### Author: ![Karma](https://avatars.discourse-cdn.com/v4/letter/k/bcef8e/32.png) [@Karma](https://discuss.elastic.co/u/Karma)
#### Post date: [December 2, 2016, 4:20am UTC](https://discuss.elastic.co/t/unable-to-run-es5-02-on-ubuntu-16-04/67753/3 "2016-12-02T04:20:37Z")

</div>

I use debian install and it works.

---

<div class="post-metadata">

### Author: ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)
#### Post date: [December 5, 2016, 12:46pm UTC](https://discuss.elastic.co/t/unable-to-run-es5-02-on-ubuntu-16-04/67753/4 "2016-12-05T12:46:42Z")

</div>

Hey,

can you try to use the JDK instead of the JRE and check if you get the same message?

--Alex

---

<div class="post-metadata">

### Author: ![jasontedor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasontedor/32/66992_2.png) [@jasontedor](https://discuss.elastic.co/u/jasontedor)
#### Post date: [December 5, 2016, 1:18pm UTC](https://discuss.elastic.co/t/unable-to-run-es5-02-on-ubuntu-16-04/67753/5 "2016-12-05T13:18:46Z")

</div>

I think that you're starting Elasticsearch as a user pointing to a config file that that user does not have permission to access (`/home/elasticsearch/config/elasticsearch.yml`). This is the cause of

```auto
Exception in thread "main" SettingsException[Failed to load settings from /home
/elasticsearch/config/elasticsearch.yml]; nested: AccessDeniedException[/home/e
lasticsearch/config/elasticsearch.yml];

```

Similarly, you either do not have permissions to view the `jvm.options` file that ships with Elasticsearch, or you edited it. In that file is the system property `-Dlog4j2.disable.jmx=true`. This prevents the first exception:

```auto
2016-12-01 11:25:55,258 main ERROR Could not register mbeans java.security.Acce
ssControlException: access denied ("javax.management.MBeanTrustPermission" "reg
ister")

```

from occurring.

In both cases you need to ensure that you're starting Elasticsearch as a user that has permission to view the `jvm.options` and `elasticsearch.yml` configuration files.

---

<div class="post-metadata">

### Author: ![Karma](https://avatars.discourse-cdn.com/v4/letter/k/bcef8e/32.png) [@Karma](https://discuss.elastic.co/u/Karma)
#### Post date: [December 6, 2016, 8:00am UTC](https://discuss.elastic.co/t/unable-to-run-es5-02-on-ubuntu-16-04/67753/6 "2016-12-06T08:00:59Z")

</div>

Exactly as you said, it was a file permission issue. Thanks.

---

<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: [January 3, 2017, 8:00am UTC](https://discuss.elastic.co/t/unable-to-run-es5-02-on-ubuntu-16-04/67753/7 "2017-01-03T08:00:59Z")

</div>

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