Hi, I was installing Open distro from Debian Package - Open Distro Documentation and I only encounter with this error. Check Journalctl output.
The folder /etc/elasticsearch is almost empty and contains only 2 files. I thought that it will smooth installation but I didn’t think that I will even deal with installation. The both .deb install files contain config files.
root@node2:/etc/elasticsearch# ls
elasticsearch.keystore jvm.options
node2 systemd[1]: Started Elasticsearch.
node2 elasticsearch[33343]: 2019-10-06 10:19:57,022 main ERROR Could not register mbeans java.security.AccessControlException: access denied ("javax.management.MBeanTrustPermission" "register")
node2 elasticsearch[33343]: at java.base/java.security.AccessControlContext.checkPermission(AccessControlContext.java:472)
node2 elasticsearch[33343]: at java.base/java.lang.SecurityManager.checkPermission(SecurityManager.java:444)
node2 elasticsearch[33343]: at java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.checkMBeanTrustPermission(DefaultMBeanServerInterceptor.java:1805)
node2 elasticsearch[33343]: at java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:318)
node2 elasticsearch[33343]: at java.management/com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:522)
node2 elasticsearch[33343]: at org.apache.logging.log4j.core.jmx.Server.register(Server.java:393)
node2 elasticsearch[33343]: at org.apache.logging.log4j.core.jmx.Server.reregisterMBeansAfterReconfigure(Server.java:168)
node2 elasticsearch[33343]: at org.apache.logging.log4j.core.jmx.Server.reregisterMBeansAfterReconfigure(Server.java:141)
node2 elasticsearch[33343]: at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:558)
node2 elasticsearch[33343]: at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:263)
node2 elasticsearch[33343]: at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:207)
node2 elasticsearch[33343]: at org.apache.logging.log4j.core.config.Configurator.initialize(Configurator.java:220)
node2 elasticsearch[33343]: at org.apache.logging.log4j.core.config.Configurator.initialize(Configurator.java:197)
node2 elasticsearch[33343]: at org.elasticsearch.common.logging.LogConfigurator.configureStatusLogger(LogConfigurator.java:250)
node2 elasticsearch[33343]: at org.elasticsearch.common.logging.LogConfigurator.configure(LogConfigurator.java:166)
node2 elasticsearch[33343]: at org.elasticsearch.common.logging.LogConfigurator.configure(LogConfigurator.java:127)
node2 elasticsearch[33343]: at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:310)
node2 elasticsearch[33343]: at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:159)
node2 elasticsearch[33343]: at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:150)
node2 elasticsearch[33343]: at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86)
node2 elasticsearch[33343]: at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124)
node2 elasticsearch[33343]: at org.elasticsearch.cli.Command.main(Command.java:90)
node2 elasticsearch[33343]: at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:115)
node2 elasticsearch[33343]: at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92)
node2 elasticsearch[33343]: ERROR: no log4j2.properties found; tried [/etc/elasticsearch] and its subdirectories
node2 systemd[1]: elasticsearch.service: Main process exited, code=exited, status=78/n/a
node2 systemd[1]: elasticsearch.service: Failed with result 'exit-code'.
After copying log4j2 (from original elasticsearch 7.2.0) to /etc/elasticsearch/. Editing to correct a few paths to logs and set permissions. I ended up with this log.
Journal:
,727 main ERROR Could not register mbeans java.security.AccessControlException: access denied (“javax.management.MBeanTrustPermission” “register”)
at java.base/java.security.AccessControlContext.checkPermission(AccessControlContext.java:472)
at java.base/java.lang.SecurityManager.checkPermission(SecurityManager.java:444)
at java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.checkMBeanTrustPermission(DefaultMBeanServerInterceptor.java:1805)
at java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:318)
at java.management/com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:522)
at org.apache.logging.log4j.core.jmx.Server.register(Server.java:393)
at org.apache.logging.log4j.core.jmx.Server.reregisterMBeansAfterReconfigure(Server.java:168)
at org.apache.logging.log4j.core.jmx.Server.reregisterMBeansAfterReconfigure(Server.java:141)
at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:558)
at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:263)
at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:207)
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:250)
at org.elasticsearch.common.logging.LogConfigurator.configure(LogConfigurator.java:166)
at org.elasticsearch.common.logging.LogConfigurator.configure(LogConfigurator.java:127)
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:310)
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:159)
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:150)
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86)
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124)
at org.elasticsearch.cli.Command.main(Command.java:90)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:115)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92)
,010 main ERROR Could not register mbeans java.security.AccessControlException: access denied (“javax.management.MBeanTrustPermission” “register”)
at java.base/java.security.AccessControlContext.checkPermission(AccessControlContext.java:472)
at java.base/java.lang.SecurityManager.checkPermission(SecurityManager.java:444)
at java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.checkMBeanTrustPermission(DefaultMBeanServerInterceptor.java:1805)
at java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:318)
at java.management/com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:522)
at org.apache.logging.log4j.core.jmx.Server.register(Server.java:393)
at org.apache.logging.log4j.core.jmx.Server.reregisterMBeansAfterReconfigure(Server.java:168)
at org.apache.logging.log4j.core.jmx.Server.reregisterMBeansAfterReconfigure(Server.java:141)
at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:558)
at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:263)
at org.elasticsearch.common.logging.LogConfigurator.configure(LogConfigurator.java:234)
at org.elasticsearch.common.logging.LogConfigurator.configure(LogConfigurator.java:127)
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:310)
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:159)
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:150)
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86)
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124)
at org.elasticsearch.cli.Command.main(Command.java:90)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:115)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92)
node2 systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE
node2 systemd[1]: elasticsearch.service: Failed with result ‘exit-code’.