pires/kubernetes-elasticsearch-cluster

ERROR Could not register mbeans java.security.AccessControlException: access denied ("javax.management.MBeanTrustPermission" "register")

Opened this issue · 0 comments

Hi there, Paulo.

First of all thank you for the great work on this.
It has been working on our cluster perfectly till I wanted to switch to a newer version of ES.

If a do a kubectl describe po pod-name I get
Created container with docker id 96a9b40bcb72; Security:[seccomp=unconfined]

And in the pod logs I got these error messages

419 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:556) at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:261) 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:171) at org.elasticsearch.common.logging.LogConfigurator.configure(LogConfigurator.java:140) at org.elasticsearch.common.logging.LogConfigurator.configure(LogConfigurator.java:119) at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:290) at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:121) at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:112) 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:92) at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:85)

680 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:556) at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:261) at org.elasticsearch.common.logging.LogConfigurator.configure(LogConfigurator.java:163) at org.elasticsearch.common.logging.LogConfigurator.configure(LogConfigurator.java:119) at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:290) at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:121) at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:112) 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:92) at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:85)

and

722 pool-1-thread-1 ERROR Unable to unregister MBeans java.security.AccessControlException: access denied ("javax.management.MBeanServerPermission" "createMBeanServer") at java.security.AccessControlContext.checkPermission(AccessControlContext.java:472) at java.security.AccessController.checkPermission(AccessController.java:884) at java.lang.SecurityManager.checkPermission(SecurityManager.java:549) at java.lang.management.ManagementFactory.getPlatformMBeanServer(ManagementFactory.java:465) at org.apache.logging.log4j.core.jmx.Server.unregisterLoggerContext(Server.java:246) at org.apache.logging.log4j.core.LoggerContext.stop(LoggerContext.java:338) at org.apache.logging.log4j.core.LoggerContext$1.run(LoggerContext.java:279) at org.apache.logging.log4j.core.util.DefaultShutdownCallbackRegistry$RegisteredCancellable.run(DefaultShutdownCallbackRegistry.java:109) at org.apache.logging.log4j.core.util.DefaultShutdownCallbackRegistry.run(DefaultShutdownCallbackRegistry.java:74) at java.lang.Thread.run(Thread.java:748)
after which the pod stops

Is there anything in our cluster that needs to change for this to work?