2019-03-03 02:21:29 UTC - Samuel Sun: one question for parameter what is this for ? export PULSAR_LOG_APPENDER=$PULSAR_LOG_APPENDER ---- 2019-03-03 02:21:30 UTC - Samuel Sun: thanks ---- 2019-03-03 02:25:36 UTC - Samuel Sun: is this class PulsarAppender for the implementation ? ---- 2019-03-03 02:37:21 UTC - Sijie Guo: this is for configuring log4j:
<https://github.com/apache/pulsar/blob/master/bin/pulsar#L275> <https://github.com/apache/pulsar/blob/master/conf/log4j2.yaml#L135> ---- 2019-03-03 02:49:04 UTC - Samuel Sun: found a possible issue, if this feature is enabled, error logs can’t be output fully, e.g. ---- 2019-03-03 02:49:07 UTC - Samuel Sun: 18:48:24.869 [main] INFO org.apache.bookkeeper.proto.BookieNettyServer - Shutting down BookieNettyServer 18:48:24.881 [main] ERROR org.apache.bookkeeper.server.Main - Failed to build bookie server org.apache.bookkeeper.bookie.BookieException$InvalidCookieException: Cookie [4 ---- 2019-03-03 02:50:40 UTC - Samuel Sun: if bookkeeper did not start successfully , it would show this error in pulsar-bookie-hostname.log only if disable PULSAR_LOG_APPENDER in pulsar-daemon. pulsar version is 2.2.1 ---- 2019-03-03 02:51:26 UTC - Samuel Sun: not sure it could be anything else wrong, but spent a log fo time on this possible issue. ---- 2019-03-03 03:34:07 UTC - Sijie Guo: I guess it might be related to how log4j configuring from system properties. did you see any logs at the standout or stderr? ---- 2019-03-03 03:46:17 UTC - Samuel Sun: nothing in console, I think it could be pulsar broker call bookie to start , but dose not get error from bookie to output ? ---- 2019-03-03 03:47:00 UTC - Samuel Sun: if enabled, the last log is “19:44:44.116 [main-EventThread] INFO org.apache.bookkeeper.zookeeper.ZooKeeperWatc” ---- 2019-03-03 03:48:58 UTC - Samuel Sun: but if “#export PULSAR_LOG_APPENDER=$PULSAR_LOG_APPENDER”, errors will be output in pulsar-bookie-hostname.out instead of xxx.log and contains the error details of bookie start failed ---- 2019-03-03 03:55:16 UTC - Sijie Guo: bin/pulsar-daemon set `PULSAR_LOG_APPENDER` to RollingFile. so when exporting `PULSAR_LOG_APPENDER`, log4j will use RollingFile, which will log the outputs to log file; if disabled, it will be using the default appender which is RoutingAppend, it will be logging the output to std, which is the pulsar-bookie-hostname.out in this case. ---- 2019-03-03 04:17:10 UTC - Samuel Sun: yeah, current status is output looks like having more logs than .log, for errors from bookie start. ---- 2019-03-03 05:27:42 UTC - Samuel Sun: I’ll dig into a little to check , thanks for explaination ---- 2019-03-03 05:29:47 UTC - Sijie Guo: ok. let me know if you have any findings ----
