Index tasks inheriting logging options from middle manager

Hello,

I have druid clusters running druid 0.9.1.1

The problem I am having is that when an indexing task spawns up, the index job grabs the log4j2.xml from the middle manager. I am trying to figure out a way to have these jobs use a different log4j2.xml and nothing I’ve tried seems to fix this problem.

Here’s a log entry from an index job that shows it picking up the wrong log4j2.xml:

2017-04-25 18:22:00,542 main DEBUG Initializing configuration XmlConfiguration[location=/etc/druid/config/middleManager/log4j2.xml]

So far, the only thing I can do to make it not grab this config is to remove it from that directory.

In the middle manager runtime.properties I tried adding this option to the druid.indexer.runner.javaOpts= line:

-Dlog4j2.configuration=file:/etc/druid/config/peon/log4j2.xml

and also
-Dlog4j.configuration=file:/etc/druid/config/peon/log4j2.xml

Neither had any effect.

I have a hard time believing that this isn't a solved problem already, but after lots of searching I can't find anything.

Any help in this matter is greatly appreciated.


Thanks!

Hello,

I believe I found the answer! It seems there is some silly syntax difference between log4j and log4j2 which basically means that:

-Dlog4j.configuration=file:/etc/druid/config/peon/log4j2.xml DOES NOT WORK IN LOG4J2

-Dlog4j.configurationFile=/etc/druid/config/peon/log4j2.xml WORKS IN LOG4J2

Sigh. So much for consistency.

Thanks anyway, folks!