Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-1934

JMS Appender does not know how to recover from a broken connection

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 2.8.2
    • 2.9.0
    • Appenders
    • None

    Description

      If a broker, like ActiveMQ goes up, down, and up. Log4j gives me:

      2017-06-06 18:26:58,396 HPM-ListeningIoReactor 4 ERROR An exception occurred processing Appender ActiveMQ org.apache.logging.log4j.core.appender.AppenderLoggingException: javax.jms.IllegalStateException: The Session is closed
      	at org.apache.logging.log4j.core.appender.mom.JmsAppender.append(JmsAppender.java:69)
      	at org.apache.logging.log4j.core.config.AppenderControl.tryCallAppender(AppenderControl.java:156)
      	at org.apache.logging.log4j.core.config.AppenderControl.callAppender0(AppenderControl.java:129)
      	at org.apache.logging.log4j.core.config.AppenderControl.callAppenderPreventRecursion(AppenderControl.java:120)
      	at org.apache.logging.log4j.core.config.AppenderControl.callAppender(AppenderControl.java:84)
      	at org.apache.logging.log4j.core.config.LoggerConfig.callAppenders(LoggerConfig.java:448)
      	at org.apache.logging.log4j.core.config.LoggerConfig.processLogEvent(LoggerConfig.java:433)
      	at org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:417)
      	at org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:403)
      	at org.apache.logging.log4j.core.config.AwaitCompletionReliabilityStrategy.log(AwaitCompletionReliabilityStrategy.java:63)
      	at org.apache.logging.log4j.core.Logger.logMessage(Logger.java:146)
      	at org.apache.logging.log4j.spi.AbstractLogger.logMessageSafely(AbstractLogger.java:2091)
      	at org.apache.logging.log4j.spi.AbstractLogger.logIfEnabled(AbstractLogger.java:1813)
      	at org.apache.logging.log4j.spi.AbstractLogger.info(AbstractLogger.java:1267)
      	>SNIP<
      	at org.apache.http.nio.protocol.HttpAsyncService.requestReceived(HttpAsyncService.java:338)
      	at org.apache.http.impl.nio.DefaultNHttpServerConnection.consumeInput(DefaultNHttpServerConnection.java:273)
      	at org.apache.http.impl.nio.DefaultHttpServerIODispatch.onInputReady(DefaultHttpServerIODispatch.java:158)
      	at org.apache.http.impl.nio.DefaultHttpServerIODispatch.onInputReady(DefaultHttpServerIODispatch.java:52)
      	at org.apache.http.impl.nio.reactor.AbstractIODispatch.inputReady(AbstractIODispatch.java:114)
      	at org.apache.http.impl.nio.reactor.BaseIOReactor.readable(BaseIOReactor.java:162)
      	at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(AbstractIOReactor.java:337)
      	at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents(AbstractIOReactor.java:315)
      	at org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:276)
      	at org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:104)
      	at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:588)
      	at java.lang.Thread.run(Unknown Source)
      Caused by: javax.jms.IllegalStateException: The Session is closed
      	at org.apache.activemq.ActiveMQSession.checkClosed(ActiveMQSession.java:771)
      	at org.apache.activemq.ActiveMQSession.configureMessage(ActiveMQSession.java:759)
      	at org.apache.activemq.ActiveMQSession.createMapMessage(ActiveMQSession.java:338)
      	at org.apache.logging.log4j.core.appender.mom.JmsManager.createMessage(JmsManager.java:136)
      	at org.apache.logging.log4j.core.appender.mom.JmsAppender.append(JmsAppender.java:65)
      	... 28 more
      

      I plan on fixing that ASAP.

      Attachments

        Activity

          People

            ggregory Gary D. Gregory
            ggregory Gary D. Gregory
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: