RaulGracia opened a new issue, #3299:
URL: https://github.com/apache/bookkeeper/issues/3299
**BUG REPORT**
Problem with log4j configuration when using `bkctl` tool.
***To Reproduce***
Steps to reproduce the behavior:
Used `bkctl` tool on a pod with Bookkeeper 4.15 deployed and observed the
following error:
```
/opt/bookkeeper # bin/bkctl bookies list
[Fatal Error] log4j2.cli.xml:30:11: The element type "Appenders" must be
terminated by the matching end-tag "</Appenders>".
ERROR StatusLogger Error parsing /opt/bookkeeper/conf/log4j2.cli.xml
org.xml.sax.SAXParseException; systemId:
file:///opt/bookkeeper/conf/log4j2.cli.xml; lineNumber: 30; columnNumber: 11;
The element type "Appenders" must be terminated by the matching end-tag
"</Appenders>".
at
java.xml/com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown
Source)
at
java.xml/com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown
Source)
at
org.apache.logging.log4j.core.config.xml.XmlConfiguration.<init>(XmlConfiguration.java:94)
at
org.apache.logging.log4j.core.config.xml.XmlConfigurationFactory.getConfiguration(XmlConfigurationFactory.java:46)
at
org.apache.logging.log4j.core.config.ConfigurationFactory$Factory.getConfiguration(ConfigurationFactory.java:525)
at
org.apache.logging.log4j.core.config.ConfigurationFactory$Factory.getConfiguration(ConfigurationFactory.java:500)
at
org.apache.logging.log4j.core.config.ConfigurationFactory$Factory.getConfiguration(ConfigurationFactory.java:424)
at
org.apache.logging.log4j.core.config.ConfigurationFactory.getConfiguration(ConfigurationFactory.java:325)
at
org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:690)
at
org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:711)
at
org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:253)
at
org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:155)
at
org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:47)
at org.apache.logging.log4j.LogManager.getContext(LogManager.java:196)
at
org.apache.logging.log4j.spi.AbstractLoggerAdapter.getContext(AbstractLoggerAdapter.java:137)
at
org.apache.logging.slf4j.Log4jLoggerFactory.getContext(Log4jLoggerFactory.java:55)
at
org.apache.logging.log4j.spi.AbstractLoggerAdapter.getLogger(AbstractLoggerAdapter.java:47)
at
org.apache.logging.slf4j.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:33)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:363)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:388)
at org.apache.bookkeeper.tools.cli.BKCtl.<clinit>(BKCtl.java:32)
ERROR StatusLogger No logging configuration
```
***Expected behavior***
Logging should be working fine.
***Screenshots***
n/a
***Additional context***
The problem is related to wrong `xml` configuration. When deleting an extra
`</Console>` and extra `</Logger>` from the xml, the command seems to work fine:
```
/opt/bookkeeper # bin/bkctl bookies list
09:28:02,151 INFO BookKeeper metadata driver manager initialized
09:28:02,166 INFO Initialize zookeeper metadata driver at metadata service
uri zk://zookeeper-client:2181/pravega/pravega/bookkeeper/ledgers : zkServers =
zookeeper-client:2181, ledgersRootPath = /pravega/pravega/bookkeeper/ledgers.
...
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]