Unable to run ES5.02 on ubuntu 16.04


(Karma) #1

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
)


(Martin Kaemmerling) #2

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.


(Karma) #3

I use debian install and it works.


(Alexander Reelsen) #4

Hey,

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

--Alex


(Jason Tedor) #5

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

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:

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.


(Karma) #6

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


(system) #7

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