https://bugzilla.redhat.com/show_bug.cgi?id=1509010
Bug ID: 1509010
Summary: $ZOOCFGDIR needs to be added to classpath for
log4j.properties
Product: Fedora
Version: 26
Component: zookeeper
Assignee: tstclair(a)heptio.com
Reporter: shawn.bohrer(a)gmail.com
QA Contact: extras-qa(a)fedoraproject.org
CC: ctubbsii(a)fedoraproject.org, greg.hellings(a)gmail.com,
java-sig-commits(a)lists.fedoraproject.org,
mluscon(a)gmail.com, s(a)shk.io, tstclair(a)heptio.com
Description of problem:
When setting up zookeeper I found to problems with logging. The first was that
I needed to install:
slf4j-log4j12-1.7.22-4.fc26.noarch
I see that the zookeeper package depends on log4j12 and slf4j but not
slf4j-log4j12. Next, once I had that installed I received the following
warnings:
log4j:WARN No appenders could be found for logger
(org.apache.zookeeper.server.quorum.QuorumPeerConfig).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See
http://logging.apache.org/log4j/1.2/faq.html#noconfig for more
info.
This occurs because /etc/zookeeper needs to be added to the classpath, in order
to find /etc/zookeeper/log4j.properties. Interestingly in
/usr/libexec/zkEnv.sh there are the following lines:
ZOOCFGDIR="/etc/zookeeper"
...
#add the zoocfg dir to classpath
CLASSPATH="/usr/share/java/zookeeper/zookeeper.jar"
CLASSPATH="$CLASSPATH:/usr/share/java/zookeeper/zookeeper-ZooInspector.jar"
CLASSPATH="$CLASSPATH:/usr/share/java/zookeeper/zookeeper-tests.jar"
...
Despite that comment, it does not add $ZOOCFGDIR to the classpath which makes
me think that perhaps it was removed or maybe they wrote the comment and never
did it. There also does not appear to be any environment variables or similar
ways to add additional items to the classpath so you must edit
/usr/libexec/zkEnv.sh
Version-Release number of selected component (if applicable):
zookeeper-java-3.4.9-3.fc26.x86_64
zookeeper-3.4.9-3.fc26.x86_64
--
You are receiving this mail because:
You are on the CC list for the bug.