ERROR Could not reconfigure JMX java.lang.NoClassDefFoundError: org/apache/logging/log4j/core/async/DaemonThreadFactory
at org.apache.logging.log4j.core.jmx.Server.createExecutor(Server.java:81)
at org.apache.logging.log4j.core.jmx.Server.(Server.java:66)
at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:541)
at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:603)
at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:620)
at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:226)
at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:152)
at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:45)
at org.apache.logging.log4j.LogManager.getContext(LogManager.java:194)
at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:551)
at org.elasticsearch.common.logging.ESLoggerFactory.getLogger(ESLoggerFactory.java:49)
at org.elasticsearch.common.logging.Loggers.getLogger(Loggers.java:105)
at org.elasticsearch.common.logging.Loggers.getLogger(Loggers.java:72)
at org.elasticsearch.common.component.AbstractComponent.(AbstractComponent.java:37)
at org.elasticsearch.plugins.PluginsService.(PluginsService.java:110)
at org.elasticsearch.client.transport.TransportClient.newPluginService(TransportClient.java:81)
at org.elasticsearch.client.transport.TransportClient.buildTemplate(TransportClient.java:106)
at org.elasticsearch.client.transport.TransportClient.(TransportClient.java:228)
at org.elasticsearch.transport.client.PreBuiltTransportClient.(PreBuiltTransportClient.java:69)
at org.elasticsearch.transport.client.PreBuiltTransportClient.(PreBuiltTransportClient.java:65)
and adding the disruptor dependency. This only works when the Log4J jmx is disabled. Otherwise I still get the
ERROR Could not reconfigure JMX java.lang.NoClassDefFoundError: org/apache/logging/log4j/core/async/DaemonThreadFactory
It also seems ES 5.0 is expecting Log4j version 2.6.2 and not yet 2.7.
See https://github.com/elastic/elasticsearch/pull/20805 with targets of ES 5.1 an ES 6.0.
So it is probably advised to use the 2.6.2 version and choose yourself if you want the low latency logging or not.
The issue here is indeed that you have the wrong version of the Log4j dependency, it should be 2.6.2, not 2.7 for the 5.0.0 release. The other stuff about async and the LMAX disruptor is not the problem. This is the ideal option.
If for some reason this option is not available to you, you can also set the system property log4j2.is.webapp=true or log4j2.jmx.notify.async=false (either will be fine).
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.