FUSE Message Broker
  1. FUSE Message Broker
  2. MB-805

Web-console does not function with root logging set to debug

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Done
    • Affects Version/s: 5.4.2-fuse-00-00
    • Fix Version/s: 5.5.0-fuse-00-00
    • Component/s: broker
    • Labels:
      None
    • Similar Issues:
      Show 10 results 

      Description

      Hi,

      When setting the logging to debug:

      log4j.rootLogger=DEBUG, logfile, console

      The Web Console is unreachable. The log file shows java.lang.ClassCircularityErrors:

      INFO   | jvm 1    | 2011/01/21 13:34:15 | Exception in thread "ActiveMQ Journal Checkpoint Worker" java.lang.ClassCircularityError: org/apache/log4j/spi/LoggingEvent
      INFO   | jvm 1    | 2011/01/21 13:34:15 |       at org.fusesource.web.console.server.logging.BrowserAppender.toLogEvent(BrowserAppender.java:106)
      INFO   | jvm 1    | 2011/01/21 13:34:15 |       at org.fusesource.web.console.server.logging.BrowserAppender.append(BrowserAppender.java:68)
      INFO   | jvm 1    | 2011/01/21 13:34:15 |       at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:230)
      INFO   | jvm 1    | 2011/01/21 13:34:15 |       at org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:65)
      INFO   | jvm 1    | 2011/01/21 13:34:15 |       at org.apache.log4j.Category.callAppenders(Category.java:203)
      INFO   | jvm 1    | 2011/01/21 13:34:15 |       at org.apache.log4j.Category.forcedLog(Category.java:388)
      INFO   | jvm 1    | 2011/01/21 13:34:15 |       at org.apache.log4j.Category.log(Category.java:853)
      INFO   | jvm 1    | 2011/01/21 13:34:15 |       at org.apache.commons.logging.impl.Log4JLogger.debug(Log4JLogger.java:171)
      INFO   | jvm 1    | 2011/01/21 13:34:15 |       at org.apache.activemq.store.kahadb.MessageDatabase.checkpointUpdate(MessageDatabase.java:1131)
      INFO   | jvm 1    | 2011/01/21 13:34:15 |       at org.apache.activemq.store.kahadb.MessageDatabase$10.execute(MessageDatabase.java:698)
      INFO   | jvm 1    | 2011/01/21 13:34:15 |       at org.apache.kahadb.page.Transaction.execute(Transaction.java:728)
      INFO   | jvm 1    | 2011/01/21 13:34:15 |       at org.apache.activemq.store.kahadb.MessageDatabase.checkpointCleanup(MessageDatabase.java:696)
      INFO   | jvm 1    | 2011/01/21 13:34:15 |       at org.apache.activemq.store.kahadb.MessageDatabase$3.run(MessageDatabase.java:293)
      ...
      INFO   | jvm 1    | 2011/01/21 13:34:15 |  WARN | Error for /console/admin/agent
      INFO   | jvm 1    | 2011/01/21 13:34:15 | java.lang.ClassCircularityError: org/apache/log4j/spi/LoggingEvent
      INFO   | jvm 1    | 2011/01/21 13:34:15 |       at org.fusesource.web.console.server.logging.BrowserAppender.toLogEvent(BrowserAppender.java:106)
      ....
      INFO   | jvm 1    | 2011/01/21 13:56:18 |  WARN | /console/admin/agent: java.lang.ClassCircularityError: org/apache/log4j/spi/LoggingEvent
      INFO   | jvm 1    | 2011/01/21 13:56:18 |  WARN | handle failed
      INFO   | jvm 1    | 2011/01/21 13:56:18 | java.lang.ClassCircularityError: org/apache/log4j/spi/LoggingEvent
      INFO   | jvm 1    | 2011/01/21 13:56:18 |       at org.fusesource.web.console.server.logging.BrowserAppender.toLogEvent(BrowserAppender.java:106)
      INFO   | jvm 1    | 2011/01/21 13:56:18 |       at org.fusesource.web.console.server.logging.BrowserAppender.append(BrowserAppender.java:68)
      INFO   | jvm 1    | 2011/01/21 13:56:18 |       at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:230)
      
      

      Complete log file attached.

      Workaround
      ====================
      The customer has been instructed to leave root logger on INFO and set activemq to DEBUG:

      log4j.logger.org.apache.activemq=DEBUG

      Susan

        Activity

        Hide
        Susan Javurek
        added a comment -

        BQ:Medium

        Show
        Susan Javurek
        added a comment - BQ:Medium
        Hide
        Dejan Bosanac
        added a comment -

        So the problem is that fuse web console have a log appender to enable log preview in the web. With debug logging turned on Jetty (web container we're using) starts logging events of loading classes and that's where circular exception happens.

        The only possible solution is to prevent jetty logger doing this. It will be done by default in 5.5.0 release and in older versions you can do it by simply adding

        log4j.logger.org.eclipse.jetty.util.log=INFO

        to log4j.properties

        Show
        Dejan Bosanac
        added a comment - So the problem is that fuse web console have a log appender to enable log preview in the web. With debug logging turned on Jetty (web container we're using) starts logging events of loading classes and that's where circular exception happens. The only possible solution is to prevent jetty logger doing this. It will be done by default in 5.5.0 release and in older versions you can do it by simply adding log4j.logger.org.eclipse.jetty.util.log=INFO to log4j.properties

          People

          • Assignee:
            Dejan Bosanac
            Reporter:
            Susan Javurek
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: