We are using elastic client in our Storm bolt. Recently we upgraded to elastic 5.0. Elastic 5.0 started having a direct dependency with log4j 2.6.2. Storm server does not work with this version of log4j and expects this log4j dependency to be removed. Without this dependency, elastic is not working. Has anyone run in to this? Is there a solution for this?
Thanks for your suggestion. We did try this. Storm requires a specific version of SLF4J as well. My question really is, why does the elastic client force a specific version of log4J? Normally a server is expected to do this. A client always works under the context of the application it works under.
The transport client is the same code as the Elasticsearch server. It isn't a proper client, just a convenient thing to use as a client. It was so convenient we used it as the Java client for forever. But it has problems like this. We're working on writing an actual client with more normal dependencies.
You can reorder the classpath, put your log4j2 api and log4j2 core before elasticsearch 5 jar to override the weird elasticsearch static dependency on log4j 2.6.2.
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.