/usr/bin/kafka-server-start /etc/kafka/server.properties
It picks up the /etc/kafka/tools-log4j.properties file and not the /etc/kafka/log4j.properties file.
I think that is because the following KAFKA_LOG4J_OPTS variable is set in the /usr/bin/kafka-server-start script without the export statement:
if [ "x$KAFKA_LOG4J_OPTS" = "x" ]; then
if [ -e "/etc/kafka/log4j.properties" ]; then # Normal install layout
KAFKA_LOG4J_OPTS="-Dlog4j.configuration=file:/etc/kafka/log4j.properties"
elif [ -e "$base_dir/../etc/kafka/log4j.properties" ]; then # Simple zip file layout
KAFKA_LOG4J_OPTS="-Dlog4j.configuration=file:$base_dir/../etc/kafka/log4j.properties"
else # Fallback to normal default
KAFKA_LOG4J_OPTS="-Dlog4j.configuration=file:$base_dir/config/log4j.properties"
fi
fi
It works fine like this:
if [ "x$KAFKA_LOG4J_OPTS" = "x" ]; then
if [ -e "/etc/kafka/log4j.properties" ]; then # Normal install layout
export KAFKA_LOG4J_OPTS="-Dlog4j.configuration=file:/etc/kafka/log4j.properties"
elif [ -e "$base_dir/../etc/kafka/log4j.properties" ]; then # Simple zip file layout
export KAFKA_LOG4J_OPTS="-Dlog4j.configuration=file:$base_dir/../etc/kafka/log4j.properties"
else # Fallback to normal default
export KAFKA_LOG4J_OPTS="-Dlog4j.configuration=file:$base_dir/config/log4j.properties"
fi
fi
I assume this script is coming from Confluent since the script in Kafka's GitHub (https://github.com/apache/kafka/blob/0.8.2/bin/kafka-server-start.sh) is different (and it does contain the export statement).
Sigurd
--
You received this message because you are subscribed to the Google Groups "Confluent Platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to confluent-platf...@googlegroups.com.
To post to this group, send email to confluent...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/confluent-platform/53ab165f-089e-4bf5-8a20-a57833f6b889%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to confluent-platform+unsub...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to confluent-platform+unsub...@googlegroups.com.