IOException after midnight roll

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

IOException after midnight roll

Benjamin Asbach
Hi,

every night after rolling we experience IOExceptions when our logger
tries to log. So after midnight there's no logging to that log file at
all. The application is running on four WebLogic12 nodes. All nodes are
running on the same machine. All logs are going to the same directory.
The log files are separated by the server id.

Looking forward for any input.

## Config
appender.localmsglog.type = RollingFile
appender.localmsglog.name = localmsglog
# NOTE: %d is needed for TimeBasedTriggeringPolicy
appender.localmsglog.filePattern =
/LOG/%d{yyyy_MM_dd}/messages-$${date:yyyy_MM_dd_HH_mm_ss}-${serverinstance:}.log
appender.localmsglog.layout.type = CustomXMLLayout
appender.localmsglog.policies.type = Policies
appender.localmsglog.policies.1.type = SizeBasedTriggeringPolicy
appender.localmsglog.policies.1.size = 250MB
appender.localmsglog.policies.2.type = TimeBasedTriggeringPolicy


## Error
TRACE StatusLogger PatternProcessor.getNextTime returning
2020/06/19-00:00:00.000, nextFileTime=2020/06/18-00:00:00.000,
prevFileTime=2020/06/17-00:00:00.000, current=2020/06/18-02:37:49.794,
freq=DAILY
DEBUG StatusLogger Rolling
/LOG/2020_06_17/messages-2020_06_17_19_52_34-1.log
DEBUG StatusLogger Formatting file name. useCurrentTime=false.
currentFileTime=1592440669794, prevFileTime=1592344800000
DEBUG StatusLogger Found 0 eligible files, max is  2147483647
TRACE StatusLogger DirectWriteRolloverStrategy.purge() took 0.0
milliseconds
DEBUG StatusLogger OutputStream closed
DEBUG StatusLogger Formatting file name. useCurrentTime=false.
currentFileTime=1592440669794, prevFileTime=1592344800000
DEBUG StatusLogger Formatting file name. useCurrentTime=true.
currentFileTime=1592440669794, prevFileTime=1592344800000
DEBUG StatusLogger Now writing to
/LOG/2020_06_18/messages-2020_06_18_02_37_49-1.log at
2020-06-18T02:37:49.804+0200
ERROR StatusLogger RollingFileManager
/LOG/%d{yyyy_MM_dd}/messages-${date:yyyy_MM_dd_HH_mm_ss}-1.log Failed to
create file after rollover: java.io.FileNotFoundException:
/LOG/2020_06_18/messages-2020_06_18_02_37_49-1.log (No such file or
directory)
java.io.FileNotFoundException:
/LOG/2020_06_18/messages-2020_06_18_02_37_49-1.log (No such file or
directory)
         at java.io.FileOutputStream.open0(Native Method)
         at java.io.FileOutputStream.open(FileOutputStream.java:270)
         at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
         at
org.apache.logging.log4j.core.appender.FileManager.createOutputStream(FileManager.java:191)
         at
org.apache.logging.log4j.core.appender.rolling.RollingFileManager.createFileAfterRollover(RollingFileManager.java:351)
         at
org.apache.logging.log4j.core.appender.rolling.RollingFileManager.rollover(RollingFileManager.java:343)
         at
org.apache.logging.log4j.core.appender.rolling.RollingFileManager.checkRollover(RollingFileManager.java:273)
         at
org.apache.logging.log4j.core.appender.RollingFileAppender.append(RollingFileAppender.java:311)
         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:543)
         at
org.apache.logging.log4j.core.config.LoggerConfig.processLogEvent(LoggerConfig.java:502)
         at
org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:485)
         at
org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:460)
         at
org.apache.logging.log4j.core.config.AwaitCompletionReliabilityStrategy.log(AwaitCompletionReliabilityStrategy.java:82)
         at org.apache.logging.log4j.core.Logger.log(Logger.java:161)
         at
org.apache.logging.log4j.spi.AbstractLogger.tryLogMessage(AbstractLogger.java:2198)
         at
org.apache.logging.log4j.spi.AbstractLogger.logMessageTrackRecursion(AbstractLogger.java:2152)
         at
org.apache.logging.log4j.spi.AbstractLogger.logMessageSafely(AbstractLogger.java:2135)
         at
org.apache.logging.log4j.spi.AbstractLogger.logMessage(AbstractLogger.java:2011)
         at
org.apache.logging.log4j.spi.AbstractLogger.logIfEnabled(AbstractLogger.java:1983)
         at
org.apache.logging.log4j.spi.AbstractLogger.info(AbstractLogger.java:1320)
         ...
         at
weblogic.ejb.container.internal.MDListener.execute(MDListener.java:453)
         at
weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:376)
         at
weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:311)
         at
weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4855)
         at weblogic.jms.client.JMSSession.execute(JMSSession.java:4529)
         at
weblogic.jms.client.JMSSession.executeMessage(JMSSession.java:3976)
         at
weblogic.jms.client.JMSSession.access$000(JMSSession.java:120)
         at
weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:5375)
         at
weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:553)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)
ERROR StatusLogger Unable to write to stream
/LOG/%d{yyyy_MM_dd}/messages-${date:yyyy_MM_dd_HH_mm_ss}-1.log for
appender localmsglog
org.apache.logging.log4j.core.appender.AppenderLoggingException: Error
writing to stream
/LOG/%d{yyyy_MM_dd}/messages-${date:yyyy_MM_dd_HH_mm_ss}-1.log
         at
org.apache.logging.log4j.core.appender.OutputStreamManager.writeToDestination(OutputStreamManager.java:252)
         at
org.apache.logging.log4j.core.appender.FileManager.writeToDestination(FileManager.java:273)
         at
org.apache.logging.log4j.core.appender.rolling.RollingFileManager.writeToDestination(RollingFileManager.java:240)
         at
org.apache.logging.log4j.core.appender.OutputStreamManager.flushBuffer(OutputStreamManager.java:282)
         at
org.apache.logging.log4j.core.appender.OutputStreamManager.flush(OutputStreamManager.java:291)
         at
org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.directEncodeEvent(AbstractOutputStreamAppender.java:199)
         at
org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.tryAppend(AbstractOutputStreamAppender.java:190)
         at
org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.append(AbstractOutputStreamAppender.java:181)
         at
org.apache.logging.log4j.core.appender.RollingFileAppender.append(RollingFileAppender.java:312)
         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:543)
         at
org.apache.logging.log4j.core.config.LoggerConfig.processLogEvent(LoggerConfig.java:502)
         at
org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:485)
         at
org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:460)
         at
org.apache.logging.log4j.core.config.AwaitCompletionReliabilityStrategy.log(AwaitCompletionReliabilityStrategy.java:82)
         at org.apache.logging.log4j.core.Logger.log(Logger.java:161)
         at
org.apache.logging.log4j.spi.AbstractLogger.tryLogMessage(AbstractLogger.java:2198)
         at
org.apache.logging.log4j.spi.AbstractLogger.logMessageTrackRecursion(AbstractLogger.java:2152)
         at
org.apache.logging.log4j.spi.AbstractLogger.logMessageSafely(AbstractLogger.java:2135)
         at
org.apache.logging.log4j.spi.AbstractLogger.logMessage(AbstractLogger.java:2011)
         at
org.apache.logging.log4j.spi.AbstractLogger.logIfEnabled(AbstractLogger.java:1983)
         at
org.apache.logging.log4j.spi.AbstractLogger.info(AbstractLogger.java:1320)
         ...
         at
weblogic.ejb.container.internal.MDListener.execute(MDListener.java:453)
         at
weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:376)
         at
weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:311)
         at
weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4855)
         at weblogic.jms.client.JMSSession.execute(JMSSession.java:4529)
         at
weblogic.jms.client.JMSSession.executeMessage(JMSSession.java:3976)
         at
weblogic.jms.client.JMSSession.access$000(JMSSession.java:120)
         at
weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:5375)
         at
weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:553)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)
Caused by: java.io.IOException: Stream Closed
         at java.io.FileOutputStream.writeBytes(Native Method)
         at java.io.FileOutputStream.write(FileOutputStream.java:326)
         at
org.apache.logging.log4j.core.appender.OutputStreamManager.writeToDestination(OutputStreamManager.java:250)
         ... 39 more
ERROR StatusLogger An exception occurred processing Appender localmsglog
org.apache.logging.log4j.core.appender.AppenderLoggingException: Error
writing to stream
/LOG/%d{yyyy_MM_dd}/messages-${date:yyyy_MM_dd_HH_mm_ss}-1.log
         at
org.apache.logging.log4j.core.appender.OutputStreamManager.writeToDestination(OutputStreamManager.java:252)
         at
org.apache.logging.log4j.core.appender.FileManager.writeToDestination(FileManager.java:273)
         at
org.apache.logging.log4j.core.appender.rolling.RollingFileManager.writeToDestination(RollingFileManager.java:240)
         at
org.apache.logging.log4j.core.appender.OutputStreamManager.flushBuffer(OutputStreamManager.java:282)
         at
org.apache.logging.log4j.core.appender.OutputStreamManager.flush(OutputStreamManager.java:291)
         at
org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.directEncodeEvent(AbstractOutputStreamAppender.java:199)
         at
org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.tryAppend(AbstractOutputStreamAppender.java:190)
         at
org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.append(AbstractOutputStreamAppender.java:181)
         at
org.apache.logging.log4j.core.appender.RollingFileAppender.append(RollingFileAppender.java:312)
         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:543)
         at
org.apache.logging.log4j.core.config.LoggerConfig.processLogEvent(LoggerConfig.java:502)
         at
org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:485)
         at
org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:460)
         at
org.apache.logging.log4j.core.config.AwaitCompletionReliabilityStrategy.log(AwaitCompletionReliabilityStrategy.java:82)
         at org.apache.logging.log4j.core.Logger.log(Logger.java:161)
         at
org.apache.logging.log4j.spi.AbstractLogger.tryLogMessage(AbstractLogger.java:2198)
         at
org.apache.logging.log4j.spi.AbstractLogger.logMessageTrackRecursion(AbstractLogger.java:2152)
         at
org.apache.logging.log4j.spi.AbstractLogger.logMessageSafely(AbstractLogger.java:2135)
         at
org.apache.logging.log4j.spi.AbstractLogger.logMessage(AbstractLogger.java:2011)
         at
org.apache.logging.log4j.spi.AbstractLogger.logIfEnabled(AbstractLogger.java:1983)
         at
org.apache.logging.log4j.spi.AbstractLogger.info(AbstractLogger.java:1320)
         ...
         at
weblogic.ejb.container.internal.MDListener.execute(MDListener.java:453)
         at
weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:376)
         at
weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:311)
         at
weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4855)
         at weblogic.jms.client.JMSSession.execute(JMSSession.java:4529)
         at
weblogic.jms.client.JMSSession.executeMessage(JMSSession.java:3976)
         at
weblogic.jms.client.JMSSession.access$000(JMSSession.java:120)
         at
weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:5375)
         at
weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:553)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)
Caused by: java.io.IOException: Stream Closed
         at java.io.FileOutputStream.writeBytes(Native Method)
         at java.io.FileOutputStream.write(FileOutputStream.java:326)
         at
org.apache.logging.log4j.core.appender.OutputStreamManager.writeToDestination(OutputStreamManager.java:250)
         ... 39 more
ERROR StatusLogger Unable to write to stream
/LOG/%d{yyyy_MM_dd}/messages-${date:yyyy_MM_dd_HH_mm_ss}-1.log for
appender localmsglog
org.apache.logging.log4j.core.appender.AppenderLoggingException: Error
writing to stream
/LOG/%d{yyyy_MM_dd}/messages-${date:yyyy_MM_dd_HH_mm_ss}-1.log
         at
org.apache.logging.log4j.core.appender.OutputStreamManager.writeToDestination(OutputStreamManager.java:252)
         at
org.apache.logging.log4j.core.appender.FileManager.writeToDestination(FileManager.java:273)
         at
org.apache.logging.log4j.core.appender.rolling.RollingFileManager.writeToDestination(RollingFileManager.java:240)
         at
org.apache.logging.log4j.core.appender.OutputStreamManager.flushBuffer(OutputStreamManager.java:282)
         at
org.apache.logging.log4j.core.appender.OutputStreamManager.flush(OutputStreamManager.java:291)
         at
org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.directEncodeEvent(AbstractOutputStreamAppender.java:199)
         at
org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.tryAppend(AbstractOutputStreamAppender.java:190)
         at
org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.append(AbstractOutputStreamAppender.java:181)
         at
org.apache.logging.log4j.core.appender.RollingFileAppender.append(RollingFileAppender.java:312)
         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:543)
         at
org.apache.logging.log4j.core.config.LoggerConfig.processLogEvent(LoggerConfig.java:502)
         at
org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:485)
         at
org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:460)
         at
org.apache.logging.log4j.core.config.AwaitCompletionReliabilityStrategy.log(AwaitCompletionReliabilityStrategy.java:82)
         at org.apache.logging.log4j.core.Logger.log(Logger.java:161)
         at
org.apache.logging.log4j.spi.AbstractLogger.tryLogMessage(AbstractLogger.java:2198)
         at
org.apache.logging.log4j.spi.AbstractLogger.logMessageTrackRecursion(AbstractLogger.java:2152)
         at
org.apache.logging.log4j.spi.AbstractLogger.logMessageSafely(AbstractLogger.java:2135)
         at
org.apache.logging.log4j.spi.AbstractLogger.logMessage(AbstractLogger.java:2011)
         at
org.apache.logging.log4j.spi.AbstractLogger.logIfEnabled(AbstractLogger.java:1983)
         at
org.apache.logging.log4j.spi.AbstractLogger.info(AbstractLogger.java:1320)
         ...
         at
weblogic.ejb.container.internal.MDListener.execute(MDListener.java:453)
         at
weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:376)
         at
weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:311)
         at
weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4855)
         at weblogic.jms.client.JMSSession.execute(JMSSession.java:4529)
         at
weblogic.jms.client.JMSSession.executeMessage(JMSSession.java:3976)
         at
weblogic.jms.client.JMSSession.access$000(JMSSession.java:120)
         at
weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:5375)
         at
weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:553)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)
Caused by: java.io.IOException: Stream Closed
         at java.io.FileOutputStream.writeBytes(Native Method)
         at java.io.FileOutputStream.write(FileOutputStream.java:326)
         at
org.apache.logging.log4j.core.appender.OutputStreamManager.writeToDestination(OutputStreamManager.java:250)
         ... 40 more

Thanks
Benjamin

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: IOException after midnight roll

Ralph Goers
You don’t have a filename specified so it is trying to use DirectWriteRolloverStrategy. You are using SizeBasedTriggeringPolicy and don’t have %I in the pattern, which is normally required for a size based rollover. However, that doesn’t seem to be a problem here.

I notice that the previous file was in the directory named 2020_06_17 while the new file is supposed to go in 2020_06_18.  I have a suspicion it isn’t creating the directory for some reason.

Ralph

> On Jun 17, 2020, at 6:09 PM, Benjamin Asbach <[hidden email]> wrote:
>
> Hi,
>
> every night after rolling we experience IOExceptions when our logger tries to log. So after midnight there's no logging to that log file at all. The application is running on four WebLogic12 nodes. All nodes are running on the same machine. All logs are going to the same directory. The log files are separated by the server id.
>
> Looking forward for any input.
>
> ## Config
> appender.localmsglog.type = RollingFile
> appender.localmsglog.name = localmsglog
> # NOTE: %d is needed for TimeBasedTriggeringPolicy
> appender.localmsglog.filePattern = /LOG/%d{yyyy_MM_dd}/messages-$${date:yyyy_MM_dd_HH_mm_ss}-${serverinstance:}.log
> appender.localmsglog.layout.type = CustomXMLLayout
> appender.localmsglog.policies.type = Policies
> appender.localmsglog.policies.1.type = SizeBasedTriggeringPolicy
> appender.localmsglog.policies.1.size = 250MB
> appender.localmsglog.policies.2.type = TimeBasedTriggeringPolicy
>
>
> ## Error
> TRACE StatusLogger PatternProcessor.getNextTime returning 2020/06/19-00:00:00.000, nextFileTime=2020/06/18-00:00:00.000, prevFileTime=2020/06/17-00:00:00.000, current=2020/06/18-02:37:49.794, freq=DAILY
> DEBUG StatusLogger Rolling /LOG/2020_06_17/messages-2020_06_17_19_52_34-1.log
> DEBUG StatusLogger Formatting file name. useCurrentTime=false. currentFileTime=1592440669794, prevFileTime=1592344800000
> DEBUG StatusLogger Found 0 eligible files, max is  2147483647
> TRACE StatusLogger DirectWriteRolloverStrategy.purge() took 0.0 milliseconds
> DEBUG StatusLogger OutputStream closed
> DEBUG StatusLogger Formatting file name. useCurrentTime=false. currentFileTime=1592440669794, prevFileTime=1592344800000
> DEBUG StatusLogger Formatting file name. useCurrentTime=true. currentFileTime=1592440669794, prevFileTime=1592344800000
> DEBUG StatusLogger Now writing to /LOG/2020_06_18/messages-2020_06_18_02_37_49-1.log at 2020-06-18T02:37:49.804+0200
> ERROR StatusLogger RollingFileManager /LOG/%d{yyyy_MM_dd}/messages-${date:yyyy_MM_dd_HH_mm_ss}-1.log Failed to create file after rollover: java.io.FileNotFoundException: /LOG/2020_06_18/messages-2020_06_18_02_37_49-1.log (No such file or directory)
> java.io.FileNotFoundException: /LOG/2020_06_18/messages-2020_06_18_02_37_49-1.log (No such file or directory)
>        at java.io.FileOutputStream.open0(Native Method)
>        at java.io.FileOutputStream.open(FileOutputStream.java:270)
>        at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
>        at org.apache.logging.log4j.core.appender.FileManager.createOutputStream(FileManager.java:191)
>        at org.apache.logging.log4j.core.appender.rolling.RollingFileManager.createFileAfterRollover(RollingFileManager.java:351)
>        at org.apache.logging.log4j.core.appender.rolling.RollingFileManager.rollover(RollingFileManager.java:343)
>        at org.apache.logging.log4j.core.appender.rolling.RollingFileManager.checkRollover(RollingFileManager.java:273)
>        at org.apache.logging.log4j.core.appender.RollingFileAppender.append(RollingFileAppender.java:311)
>        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:543)
>        at org.apache.logging.log4j.core.config.LoggerConfig.processLogEvent(LoggerConfig.java:502)
>        at org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:485)
>        at org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:460)
>        at org.apache.logging.log4j.core.config.AwaitCompletionReliabilityStrategy.log(AwaitCompletionReliabilityStrategy.java:82)
>        at org.apache.logging.log4j.core.Logger.log(Logger.java:161)
>        at org.apache.logging.log4j.spi.AbstractLogger.tryLogMessage(AbstractLogger.java:2198)
>        at org.apache.logging.log4j.spi.AbstractLogger.logMessageTrackRecursion(AbstractLogger.java:2152)
>        at org.apache.logging.log4j.spi.AbstractLogger.logMessageSafely(AbstractLogger.java:2135)
>        at org.apache.logging.log4j.spi.AbstractLogger.logMessage(AbstractLogger.java:2011)
>        at org.apache.logging.log4j.spi.AbstractLogger.logIfEnabled(AbstractLogger.java:1983)
>        at org.apache.logging.log4j.spi.AbstractLogger.info(AbstractLogger.java:1320)
>        ...
>        at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:453)
>        at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:376)
>        at weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:311)
>        at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4855)
>        at weblogic.jms.client.JMSSession.execute(JMSSession.java:4529)
>        at weblogic.jms.client.JMSSession.executeMessage(JMSSession.java:3976)
>        at weblogic.jms.client.JMSSession.access$000(JMSSession.java:120)
>        at weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:5375)
>        at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:553)
>        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)
>        at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)
> ERROR StatusLogger Unable to write to stream /LOG/%d{yyyy_MM_dd}/messages-${date:yyyy_MM_dd_HH_mm_ss}-1.log for appender localmsglog
> org.apache.logging.log4j.core.appender.AppenderLoggingException: Error writing to stream /LOG/%d{yyyy_MM_dd}/messages-${date:yyyy_MM_dd_HH_mm_ss}-1.log
>        at org.apache.logging.log4j.core.appender.OutputStreamManager.writeToDestination(OutputStreamManager.java:252)
>        at org.apache.logging.log4j.core.appender.FileManager.writeToDestination(FileManager.java:273)
>        at org.apache.logging.log4j.core.appender.rolling.RollingFileManager.writeToDestination(RollingFileManager.java:240)
>        at org.apache.logging.log4j.core.appender.OutputStreamManager.flushBuffer(OutputStreamManager.java:282)
>        at org.apache.logging.log4j.core.appender.OutputStreamManager.flush(OutputStreamManager.java:291)
>        at org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.directEncodeEvent(AbstractOutputStreamAppender.java:199)
>        at org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.tryAppend(AbstractOutputStreamAppender.java:190)
>        at org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.append(AbstractOutputStreamAppender.java:181)
>        at org.apache.logging.log4j.core.appender.RollingFileAppender.append(RollingFileAppender.java:312)
>        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:543)
>        at org.apache.logging.log4j.core.config.LoggerConfig.processLogEvent(LoggerConfig.java:502)
>        at org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:485)
>        at org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:460)
>        at org.apache.logging.log4j.core.config.AwaitCompletionReliabilityStrategy.log(AwaitCompletionReliabilityStrategy.java:82)
>        at org.apache.logging.log4j.core.Logger.log(Logger.java:161)
>        at org.apache.logging.log4j.spi.AbstractLogger.tryLogMessage(AbstractLogger.java:2198)
>        at org.apache.logging.log4j.spi.AbstractLogger.logMessageTrackRecursion(AbstractLogger.java:2152)
>        at org.apache.logging.log4j.spi.AbstractLogger.logMessageSafely(AbstractLogger.java:2135)
>        at org.apache.logging.log4j.spi.AbstractLogger.logMessage(AbstractLogger.java:2011)
>        at org.apache.logging.log4j.spi.AbstractLogger.logIfEnabled(AbstractLogger.java:1983)
>        at org.apache.logging.log4j.spi.AbstractLogger.info(AbstractLogger.java:1320)
>        ...
>        at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:453)
>        at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:376)
>        at weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:311)
>        at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4855)
>        at weblogic.jms.client.JMSSession.execute(JMSSession.java:4529)
>        at weblogic.jms.client.JMSSession.executeMessage(JMSSession.java:3976)
>        at weblogic.jms.client.JMSSession.access$000(JMSSession.java:120)
>        at weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:5375)
>        at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:553)
>        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)
>        at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)
> Caused by: java.io.IOException: Stream Closed
>        at java.io.FileOutputStream.writeBytes(Native Method)
>        at java.io.FileOutputStream.write(FileOutputStream.java:326)
>        at org.apache.logging.log4j.core.appender.OutputStreamManager.writeToDestination(OutputStreamManager.java:250)
>        ... 39 more
> ERROR StatusLogger An exception occurred processing Appender localmsglog
> org.apache.logging.log4j.core.appender.AppenderLoggingException: Error writing to stream /LOG/%d{yyyy_MM_dd}/messages-${date:yyyy_MM_dd_HH_mm_ss}-1.log
>        at org.apache.logging.log4j.core.appender.OutputStreamManager.writeToDestination(OutputStreamManager.java:252)
>        at org.apache.logging.log4j.core.appender.FileManager.writeToDestination(FileManager.java:273)
>        at org.apache.logging.log4j.core.appender.rolling.RollingFileManager.writeToDestination(RollingFileManager.java:240)
>        at org.apache.logging.log4j.core.appender.OutputStreamManager.flushBuffer(OutputStreamManager.java:282)
>        at org.apache.logging.log4j.core.appender.OutputStreamManager.flush(OutputStreamManager.java:291)
>        at org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.directEncodeEvent(AbstractOutputStreamAppender.java:199)
>        at org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.tryAppend(AbstractOutputStreamAppender.java:190)
>        at org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.append(AbstractOutputStreamAppender.java:181)
>        at org.apache.logging.log4j.core.appender.RollingFileAppender.append(RollingFileAppender.java:312)
>        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:543)
>        at org.apache.logging.log4j.core.config.LoggerConfig.processLogEvent(LoggerConfig.java:502)
>        at org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:485)
>        at org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:460)
>        at org.apache.logging.log4j.core.config.AwaitCompletionReliabilityStrategy.log(AwaitCompletionReliabilityStrategy.java:82)
>        at org.apache.logging.log4j.core.Logger.log(Logger.java:161)
>        at org.apache.logging.log4j.spi.AbstractLogger.tryLogMessage(AbstractLogger.java:2198)
>        at org.apache.logging.log4j.spi.AbstractLogger.logMessageTrackRecursion(AbstractLogger.java:2152)
>        at org.apache.logging.log4j.spi.AbstractLogger.logMessageSafely(AbstractLogger.java:2135)
>        at org.apache.logging.log4j.spi.AbstractLogger.logMessage(AbstractLogger.java:2011)
>        at org.apache.logging.log4j.spi.AbstractLogger.logIfEnabled(AbstractLogger.java:1983)
>        at org.apache.logging.log4j.spi.AbstractLogger.info(AbstractLogger.java:1320)
>        ...
>        at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:453)
>        at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:376)
>        at weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:311)
>        at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4855)
>        at weblogic.jms.client.JMSSession.execute(JMSSession.java:4529)
>        at weblogic.jms.client.JMSSession.executeMessage(JMSSession.java:3976)
>        at weblogic.jms.client.JMSSession.access$000(JMSSession.java:120)
>        at weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:5375)
>        at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:553)
>        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)
>        at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)
> Caused by: java.io.IOException: Stream Closed
>        at java.io.FileOutputStream.writeBytes(Native Method)
>        at java.io.FileOutputStream.write(FileOutputStream.java:326)
>        at org.apache.logging.log4j.core.appender.OutputStreamManager.writeToDestination(OutputStreamManager.java:250)
>        ... 39 more
> ERROR StatusLogger Unable to write to stream /LOG/%d{yyyy_MM_dd}/messages-${date:yyyy_MM_dd_HH_mm_ss}-1.log for appender localmsglog
> org.apache.logging.log4j.core.appender.AppenderLoggingException: Error writing to stream /LOG/%d{yyyy_MM_dd}/messages-${date:yyyy_MM_dd_HH_mm_ss}-1.log
>        at org.apache.logging.log4j.core.appender.OutputStreamManager.writeToDestination(OutputStreamManager.java:252)
>        at org.apache.logging.log4j.core.appender.FileManager.writeToDestination(FileManager.java:273)
>        at org.apache.logging.log4j.core.appender.rolling.RollingFileManager.writeToDestination(RollingFileManager.java:240)
>        at org.apache.logging.log4j.core.appender.OutputStreamManager.flushBuffer(OutputStreamManager.java:282)
>        at org.apache.logging.log4j.core.appender.OutputStreamManager.flush(OutputStreamManager.java:291)
>        at org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.directEncodeEvent(AbstractOutputStreamAppender.java:199)
>        at org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.tryAppend(AbstractOutputStreamAppender.java:190)
>        at org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.append(AbstractOutputStreamAppender.java:181)
>        at org.apache.logging.log4j.core.appender.RollingFileAppender.append(RollingFileAppender.java:312)
>        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:543)
>        at org.apache.logging.log4j.core.config.LoggerConfig.processLogEvent(LoggerConfig.java:502)
>        at org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:485)
>        at org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:460)
>        at org.apache.logging.log4j.core.config.AwaitCompletionReliabilityStrategy.log(AwaitCompletionReliabilityStrategy.java:82)
>        at org.apache.logging.log4j.core.Logger.log(Logger.java:161)
>        at org.apache.logging.log4j.spi.AbstractLogger.tryLogMessage(AbstractLogger.java:2198)
>        at org.apache.logging.log4j.spi.AbstractLogger.logMessageTrackRecursion(AbstractLogger.java:2152)
>        at org.apache.logging.log4j.spi.AbstractLogger.logMessageSafely(AbstractLogger.java:2135)
>        at org.apache.logging.log4j.spi.AbstractLogger.logMessage(AbstractLogger.java:2011)
>        at org.apache.logging.log4j.spi.AbstractLogger.logIfEnabled(AbstractLogger.java:1983)
>        at org.apache.logging.log4j.spi.AbstractLogger.info(AbstractLogger.java:1320)
>        ...
>        at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:453)
>        at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:376)
>        at weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:311)
>        at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4855)
>        at weblogic.jms.client.JMSSession.execute(JMSSession.java:4529)
>        at weblogic.jms.client.JMSSession.executeMessage(JMSSession.java:3976)
>        at weblogic.jms.client.JMSSession.access$000(JMSSession.java:120)
>        at weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:5375)
>        at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:553)
>        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)
>        at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)
> Caused by: java.io.IOException: Stream Closed
>        at java.io.FileOutputStream.writeBytes(Native Method)
>        at java.io.FileOutputStream.write(FileOutputStream.java:326)
>        at org.apache.logging.log4j.core.appender.OutputStreamManager.writeToDestination(OutputStreamManager.java:250)
>        ... 40 more
>
> Thanks
> Benjamin
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: IOException after midnight roll

Benjamin Asbach
Yes you're right the folder is not created.

Just additional information: We're using Java 1.8u151.

Greetings
Benjamin

On 2020-06-18 05:05, Ralph Goers wrote:

> You don’t have a filename specified so it is trying to use
> DirectWriteRolloverStrategy. You are using SizeBasedTriggeringPolicy
> and don’t have %I in the pattern, which is normally required for a
> size based rollover. However, that doesn’t seem to be a problem here.
>
> I notice that the previous file was in the directory named 2020_06_17
> while the new file is supposed to go in 2020_06_18.  I have a
> suspicion it isn’t creating the directory for some reason.
>
> Ralph
>
>> On Jun 17, 2020, at 6:09 PM, Benjamin Asbach <[hidden email]>
>> wrote:
>>
>> Hi,
>>
>> every night after rolling we experience IOExceptions when our logger
>> tries to log. So after midnight there's no logging to that log file at
>> all. The application is running on four WebLogic12 nodes. All nodes
>> are running on the same machine. All logs are going to the same
>> directory. The log files are separated by the server id.
>>
>> Looking forward for any input.
>>
>> ## Config
>> appender.localmsglog.type = RollingFile
>> appender.localmsglog.name = localmsglog
>> # NOTE: %d is needed for TimeBasedTriggeringPolicy
>> appender.localmsglog.filePattern =
>> /LOG/%d{yyyy_MM_dd}/messages-$${date:yyyy_MM_dd_HH_mm_ss}-${serverinstance:}.log
>> appender.localmsglog.layout.type = CustomXMLLayout
>> appender.localmsglog.policies.type = Policies
>> appender.localmsglog.policies.1.type = SizeBasedTriggeringPolicy
>> appender.localmsglog.policies.1.size = 250MB
>> appender.localmsglog.policies.2.type = TimeBasedTriggeringPolicy
>>
>>
>> ## Error
>> TRACE StatusLogger PatternProcessor.getNextTime returning
>> 2020/06/19-00:00:00.000, nextFileTime=2020/06/18-00:00:00.000,
>> prevFileTime=2020/06/17-00:00:00.000, current=2020/06/18-02:37:49.794,
>> freq=DAILY
>> DEBUG StatusLogger Rolling
>> /LOG/2020_06_17/messages-2020_06_17_19_52_34-1.log
>> DEBUG StatusLogger Formatting file name. useCurrentTime=false.
>> currentFileTime=1592440669794, prevFileTime=1592344800000
>> DEBUG StatusLogger Found 0 eligible files, max is  2147483647
>> TRACE StatusLogger DirectWriteRolloverStrategy.purge() took 0.0
>> milliseconds
>> DEBUG StatusLogger OutputStream closed
>> DEBUG StatusLogger Formatting file name. useCurrentTime=false.
>> currentFileTime=1592440669794, prevFileTime=1592344800000
>> DEBUG StatusLogger Formatting file name. useCurrentTime=true.
>> currentFileTime=1592440669794, prevFileTime=1592344800000
>> DEBUG StatusLogger Now writing to
>> /LOG/2020_06_18/messages-2020_06_18_02_37_49-1.log at
>> 2020-06-18T02:37:49.804+0200
>> ERROR StatusLogger RollingFileManager
>> /LOG/%d{yyyy_MM_dd}/messages-${date:yyyy_MM_dd_HH_mm_ss}-1.log Failed
>> to create file after rollover: java.io.FileNotFoundException:
>> /LOG/2020_06_18/messages-2020_06_18_02_37_49-1.log (No such file or
>> directory)
>> java.io.FileNotFoundException:
>> /LOG/2020_06_18/messages-2020_06_18_02_37_49-1.log (No such file or
>> directory)
>>        at java.io.FileOutputStream.open0(Native Method)
>>        at java.io.FileOutputStream.open(FileOutputStream.java:270)
>>        at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
>>        at
>> org.apache.logging.log4j.core.appender.FileManager.createOutputStream(FileManager.java:191)
>>        at
>> org.apache.logging.log4j.core.appender.rolling.RollingFileManager.createFileAfterRollover(RollingFileManager.java:351)
>>        at
>> org.apache.logging.log4j.core.appender.rolling.RollingFileManager.rollover(RollingFileManager.java:343)
>>        at
>> org.apache.logging.log4j.core.appender.rolling.RollingFileManager.checkRollover(RollingFileManager.java:273)
>>        at
>> org.apache.logging.log4j.core.appender.RollingFileAppender.append(RollingFileAppender.java:311)
>>        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:543)
>>        at
>> org.apache.logging.log4j.core.config.LoggerConfig.processLogEvent(LoggerConfig.java:502)
>>        at
>> org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:485)
>>        at
>> org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:460)
>>        at
>> org.apache.logging.log4j.core.config.AwaitCompletionReliabilityStrategy.log(AwaitCompletionReliabilityStrategy.java:82)
>>        at org.apache.logging.log4j.core.Logger.log(Logger.java:161)
>>        at
>> org.apache.logging.log4j.spi.AbstractLogger.tryLogMessage(AbstractLogger.java:2198)
>>        at
>> org.apache.logging.log4j.spi.AbstractLogger.logMessageTrackRecursion(AbstractLogger.java:2152)
>>        at
>> org.apache.logging.log4j.spi.AbstractLogger.logMessageSafely(AbstractLogger.java:2135)
>>        at
>> org.apache.logging.log4j.spi.AbstractLogger.logMessage(AbstractLogger.java:2011)
>>        at
>> org.apache.logging.log4j.spi.AbstractLogger.logIfEnabled(AbstractLogger.java:1983)
>>        at
>> org.apache.logging.log4j.spi.AbstractLogger.info(AbstractLogger.java:1320)
>>        ...
>>        at
>> weblogic.ejb.container.internal.MDListener.execute(MDListener.java:453)
>>        at
>> weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:376)
>>        at
>> weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:311)
>>        at
>> weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4855)
>>        at weblogic.jms.client.JMSSession.execute(JMSSession.java:4529)
>>        at
>> weblogic.jms.client.JMSSession.executeMessage(JMSSession.java:3976)
>>        at
>> weblogic.jms.client.JMSSession.access$000(JMSSession.java:120)
>>        at
>> weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:5375)
>>        at
>> weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:553)
>>        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)
>>        at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)
>> ERROR StatusLogger Unable to write to stream
>> /LOG/%d{yyyy_MM_dd}/messages-${date:yyyy_MM_dd_HH_mm_ss}-1.log for
>> appender localmsglog
>> org.apache.logging.log4j.core.appender.AppenderLoggingException: Error
>> writing to stream
>> /LOG/%d{yyyy_MM_dd}/messages-${date:yyyy_MM_dd_HH_mm_ss}-1.log
>>        at
>> org.apache.logging.log4j.core.appender.OutputStreamManager.writeToDestination(OutputStreamManager.java:252)
>>        at
>> org.apache.logging.log4j.core.appender.FileManager.writeToDestination(FileManager.java:273)
>>        at
>> org.apache.logging.log4j.core.appender.rolling.RollingFileManager.writeToDestination(RollingFileManager.java:240)
>>        at
>> org.apache.logging.log4j.core.appender.OutputStreamManager.flushBuffer(OutputStreamManager.java:282)
>>        at
>> org.apache.logging.log4j.core.appender.OutputStreamManager.flush(OutputStreamManager.java:291)
>>        at
>> org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.directEncodeEvent(AbstractOutputStreamAppender.java:199)
>>        at
>> org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.tryAppend(AbstractOutputStreamAppender.java:190)
>>        at
>> org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.append(AbstractOutputStreamAppender.java:181)
>>        at
>> org.apache.logging.log4j.core.appender.RollingFileAppender.append(RollingFileAppender.java:312)
>>        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:543)
>>        at
>> org.apache.logging.log4j.core.config.LoggerConfig.processLogEvent(LoggerConfig.java:502)
>>        at
>> org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:485)
>>        at
>> org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:460)
>>        at
>> org.apache.logging.log4j.core.config.AwaitCompletionReliabilityStrategy.log(AwaitCompletionReliabilityStrategy.java:82)
>>        at org.apache.logging.log4j.core.Logger.log(Logger.java:161)
>>        at
>> org.apache.logging.log4j.spi.AbstractLogger.tryLogMessage(AbstractLogger.java:2198)
>>        at
>> org.apache.logging.log4j.spi.AbstractLogger.logMessageTrackRecursion(AbstractLogger.java:2152)
>>        at
>> org.apache.logging.log4j.spi.AbstractLogger.logMessageSafely(AbstractLogger.java:2135)
>>        at
>> org.apache.logging.log4j.spi.AbstractLogger.logMessage(AbstractLogger.java:2011)
>>        at
>> org.apache.logging.log4j.spi.AbstractLogger.logIfEnabled(AbstractLogger.java:1983)
>>        at
>> org.apache.logging.log4j.spi.AbstractLogger.info(AbstractLogger.java:1320)
>>        ...
>>        at
>> weblogic.ejb.container.internal.MDListener.execute(MDListener.java:453)
>>        at
>> weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:376)
>>        at
>> weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:311)
>>        at
>> weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4855)
>>        at weblogic.jms.client.JMSSession.execute(JMSSession.java:4529)
>>        at
>> weblogic.jms.client.JMSSession.executeMessage(JMSSession.java:3976)
>>        at
>> weblogic.jms.client.JMSSession.access$000(JMSSession.java:120)
>>        at
>> weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:5375)
>>        at
>> weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:553)
>>        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)
>>        at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)
>> Caused by: java.io.IOException: Stream Closed
>>        at java.io.FileOutputStream.writeBytes(Native Method)
>>        at java.io.FileOutputStream.write(FileOutputStream.java:326)
>>        at
>> org.apache.logging.log4j.core.appender.OutputStreamManager.writeToDestination(OutputStreamManager.java:250)
>>        ... 39 more
>> ERROR StatusLogger An exception occurred processing Appender
>> localmsglog
>> org.apache.logging.log4j.core.appender.AppenderLoggingException: Error
>> writing to stream
>> /LOG/%d{yyyy_MM_dd}/messages-${date:yyyy_MM_dd_HH_mm_ss}-1.log
>>        at
>> org.apache.logging.log4j.core.appender.OutputStreamManager.writeToDestination(OutputStreamManager.java:252)
>>        at
>> org.apache.logging.log4j.core.appender.FileManager.writeToDestination(FileManager.java:273)
>>        at
>> org.apache.logging.log4j.core.appender.rolling.RollingFileManager.writeToDestination(RollingFileManager.java:240)
>>        at
>> org.apache.logging.log4j.core.appender.OutputStreamManager.flushBuffer(OutputStreamManager.java:282)
>>        at
>> org.apache.logging.log4j.core.appender.OutputStreamManager.flush(OutputStreamManager.java:291)
>>        at
>> org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.directEncodeEvent(AbstractOutputStreamAppender.java:199)
>>        at
>> org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.tryAppend(AbstractOutputStreamAppender.java:190)
>>        at
>> org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.append(AbstractOutputStreamAppender.java:181)
>>        at
>> org.apache.logging.log4j.core.appender.RollingFileAppender.append(RollingFileAppender.java:312)
>>        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:543)
>>        at
>> org.apache.logging.log4j.core.config.LoggerConfig.processLogEvent(LoggerConfig.java:502)
>>        at
>> org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:485)
>>        at
>> org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:460)
>>        at
>> org.apache.logging.log4j.core.config.AwaitCompletionReliabilityStrategy.log(AwaitCompletionReliabilityStrategy.java:82)
>>        at org.apache.logging.log4j.core.Logger.log(Logger.java:161)
>>        at
>> org.apache.logging.log4j.spi.AbstractLogger.tryLogMessage(AbstractLogger.java:2198)
>>        at
>> org.apache.logging.log4j.spi.AbstractLogger.logMessageTrackRecursion(AbstractLogger.java:2152)
>>        at
>> org.apache.logging.log4j.spi.AbstractLogger.logMessageSafely(AbstractLogger.java:2135)
>>        at
>> org.apache.logging.log4j.spi.AbstractLogger.logMessage(AbstractLogger.java:2011)
>>        at
>> org.apache.logging.log4j.spi.AbstractLogger.logIfEnabled(AbstractLogger.java:1983)
>>        at
>> org.apache.logging.log4j.spi.AbstractLogger.info(AbstractLogger.java:1320)
>>        ...
>>        at
>> weblogic.ejb.container.internal.MDListener.execute(MDListener.java:453)
>>        at
>> weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:376)
>>        at
>> weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:311)
>>        at
>> weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4855)
>>        at weblogic.jms.client.JMSSession.execute(JMSSession.java:4529)
>>        at
>> weblogic.jms.client.JMSSession.executeMessage(JMSSession.java:3976)
>>        at
>> weblogic.jms.client.JMSSession.access$000(JMSSession.java:120)
>>        at
>> weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:5375)
>>        at
>> weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:553)
>>        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)
>>        at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)
>> Caused by: java.io.IOException: Stream Closed
>>        at java.io.FileOutputStream.writeBytes(Native Method)
>>        at java.io.FileOutputStream.write(FileOutputStream.java:326)
>>        at
>> org.apache.logging.log4j.core.appender.OutputStreamManager.writeToDestination(OutputStreamManager.java:250)
>>        ... 39 more
>> ERROR StatusLogger Unable to write to stream
>> /LOG/%d{yyyy_MM_dd}/messages-${date:yyyy_MM_dd_HH_mm_ss}-1.log for
>> appender localmsglog
>> org.apache.logging.log4j.core.appender.AppenderLoggingException: Error
>> writing to stream
>> /LOG/%d{yyyy_MM_dd}/messages-${date:yyyy_MM_dd_HH_mm_ss}-1.log
>>        at
>> org.apache.logging.log4j.core.appender.OutputStreamManager.writeToDestination(OutputStreamManager.java:252)
>>        at
>> org.apache.logging.log4j.core.appender.FileManager.writeToDestination(FileManager.java:273)
>>        at
>> org.apache.logging.log4j.core.appender.rolling.RollingFileManager.writeToDestination(RollingFileManager.java:240)
>>        at
>> org.apache.logging.log4j.core.appender.OutputStreamManager.flushBuffer(OutputStreamManager.java:282)
>>        at
>> org.apache.logging.log4j.core.appender.OutputStreamManager.flush(OutputStreamManager.java:291)
>>        at
>> org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.directEncodeEvent(AbstractOutputStreamAppender.java:199)
>>        at
>> org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.tryAppend(AbstractOutputStreamAppender.java:190)
>>        at
>> org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.append(AbstractOutputStreamAppender.java:181)
>>        at
>> org.apache.logging.log4j.core.appender.RollingFileAppender.append(RollingFileAppender.java:312)
>>        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:543)
>>        at
>> org.apache.logging.log4j.core.config.LoggerConfig.processLogEvent(LoggerConfig.java:502)
>>        at
>> org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:485)
>>        at
>> org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:460)
>>        at
>> org.apache.logging.log4j.core.config.AwaitCompletionReliabilityStrategy.log(AwaitCompletionReliabilityStrategy.java:82)
>>        at org.apache.logging.log4j.core.Logger.log(Logger.java:161)
>>        at
>> org.apache.logging.log4j.spi.AbstractLogger.tryLogMessage(AbstractLogger.java:2198)
>>        at
>> org.apache.logging.log4j.spi.AbstractLogger.logMessageTrackRecursion(AbstractLogger.java:2152)
>>        at
>> org.apache.logging.log4j.spi.AbstractLogger.logMessageSafely(AbstractLogger.java:2135)
>>        at
>> org.apache.logging.log4j.spi.AbstractLogger.logMessage(AbstractLogger.java:2011)
>>        at
>> org.apache.logging.log4j.spi.AbstractLogger.logIfEnabled(AbstractLogger.java:1983)
>>        at
>> org.apache.logging.log4j.spi.AbstractLogger.info(AbstractLogger.java:1320)
>>        ...
>>        at
>> weblogic.ejb.container.internal.MDListener.execute(MDListener.java:453)
>>        at
>> weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:376)
>>        at
>> weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:311)
>>        at
>> weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4855)
>>        at weblogic.jms.client.JMSSession.execute(JMSSession.java:4529)
>>        at
>> weblogic.jms.client.JMSSession.executeMessage(JMSSession.java:3976)
>>        at
>> weblogic.jms.client.JMSSession.access$000(JMSSession.java:120)
>>        at
>> weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:5375)
>>        at
>> weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:553)
>>        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)
>>        at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)
>> Caused by: java.io.IOException: Stream Closed
>>        at java.io.FileOutputStream.writeBytes(Native Method)
>>        at java.io.FileOutputStream.write(FileOutputStream.java:326)
>>        at
>> org.apache.logging.log4j.core.appender.OutputStreamManager.writeToDestination(OutputStreamManager.java:250)
>>        ... 40 more
>>
>> Thanks
>> Benjamin
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: IOException after midnight roll

Benjamin Asbach
In reply to this post by Ralph Goers
I could reproduce the problem wiht some test code:

```
import java.util.Properties;
import org.apache.logging.log4j.core.Logger;
import org.apache.logging.log4j.core.LoggerContext;
import
org.apache.logging.log4j.core.config.properties.PropertiesConfiguration;
import
org.apache.logging.log4j.core.config.properties.PropertiesConfigurationBuilder;
import org.junit.jupiter.api.Test;

public class RollingTest {

   @Test
   public void streamClosedError() throws Exception {
     Properties log4j2Properties = new Properties();
     log4j2Properties.put("appender.localmsglog.type", "RollingFile");
     log4j2Properties.put("appender.localmsglog.name", "localmsglog");
     log4j2Properties.put("appender.localmsglog.filePattern",
"C:/dev/tmp/log/%d{yyyy_MM_dd-mm}/messages-$${date:yyyy_MM_dd_HH_mm_ss}.log");
     log4j2Properties.put("appender.localmsglog.policies.type",
"Policies");
     log4j2Properties.put("appender.localmsglog.policies.1.type",
"TimeBasedTriggeringPolicy");

     log4j2Properties.put("rootLogger.level", "info");
     log4j2Properties.put("rootLogger.appenderRef.1.ref", "localmsglog");

     PropertiesConfiguration config = new
PropertiesConfigurationBuilder()
             .setRootProperties(log4j2Properties)
             .build();

     
org.apache.logging.log4j.core.config.Configurator.reconfigure(config);

     LoggerContext context = LoggerContext.getContext(false);
     Logger log = context.getRootLogger();
     while(true) {
       log.info("AAA");
       Thread.sleep(15000);
     }
   }
}
```

Greetings
Benjamin

On 2020-06-18 05:05, Ralph Goers wrote:

> You don’t have a filename specified so it is trying to use
> DirectWriteRolloverStrategy. You are using SizeBasedTriggeringPolicy
> and don’t have %I in the pattern, which is normally required for a
> size based rollover. However, that doesn’t seem to be a problem here.
>
> I notice that the previous file was in the directory named 2020_06_17
> while the new file is supposed to go in 2020_06_18.  I have a
> suspicion it isn’t creating the directory for some reason.
>
> Ralph
>
>> On Jun 17, 2020, at 6:09 PM, Benjamin Asbach <[hidden email]>
>> wrote:
>>
>> Hi,
>>
>> every night after rolling we experience IOExceptions when our logger
>> tries to log. So after midnight there's no logging to that log file at
>> all. The application is running on four WebLogic12 nodes. All nodes
>> are running on the same machine. All logs are going to the same
>> directory. The log files are separated by the server id.
>>
>> Looking forward for any input.
>>
>> ## Config
>> appender.localmsglog.type = RollingFile
>> appender.localmsglog.name = localmsglog
>> # NOTE: %d is needed for TimeBasedTriggeringPolicy
>> appender.localmsglog.filePattern =
>> /LOG/%d{yyyy_MM_dd}/messages-$${date:yyyy_MM_dd_HH_mm_ss}-${serverinstance:}.log
>> appender.localmsglog.layout.type = CustomXMLLayout
>> appender.localmsglog.policies.type = Policies
>> appender.localmsglog.policies.1.type = SizeBasedTriggeringPolicy
>> appender.localmsglog.policies.1.size = 250MB
>> appender.localmsglog.policies.2.type = TimeBasedTriggeringPolicy
>>
>>
>> ## Error
>> TRACE StatusLogger PatternProcessor.getNextTime returning
>> 2020/06/19-00:00:00.000, nextFileTime=2020/06/18-00:00:00.000,
>> prevFileTime=2020/06/17-00:00:00.000, current=2020/06/18-02:37:49.794,
>> freq=DAILY
>> DEBUG StatusLogger Rolling
>> /LOG/2020_06_17/messages-2020_06_17_19_52_34-1.log
>> DEBUG StatusLogger Formatting file name. useCurrentTime=false.
>> currentFileTime=1592440669794, prevFileTime=1592344800000
>> DEBUG StatusLogger Found 0 eligible files, max is  2147483647
>> TRACE StatusLogger DirectWriteRolloverStrategy.purge() took 0.0
>> milliseconds
>> DEBUG StatusLogger OutputStream closed
>> DEBUG StatusLogger Formatting file name. useCurrentTime=false.
>> currentFileTime=1592440669794, prevFileTime=1592344800000
>> DEBUG StatusLogger Formatting file name. useCurrentTime=true.
>> currentFileTime=1592440669794, prevFileTime=1592344800000
>> DEBUG StatusLogger Now writing to
>> /LOG/2020_06_18/messages-2020_06_18_02_37_49-1.log at
>> 2020-06-18T02:37:49.804+0200
>> ERROR StatusLogger RollingFileManager
>> /LOG/%d{yyyy_MM_dd}/messages-${date:yyyy_MM_dd_HH_mm_ss}-1.log Failed
>> to create file after rollover: java.io.FileNotFoundException:
>> /LOG/2020_06_18/messages-2020_06_18_02_37_49-1.log (No such file or
>> directory)
>> java.io.FileNotFoundException:
>> /LOG/2020_06_18/messages-2020_06_18_02_37_49-1.log (No such file or
>> directory)
>>        at java.io.FileOutputStream.open0(Native Method)
>>        at java.io.FileOutputStream.open(FileOutputStream.java:270)
>>        at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
>>        at
>> org.apache.logging.log4j.core.appender.FileManager.createOutputStream(FileManager.java:191)
>>        at
>> org.apache.logging.log4j.core.appender.rolling.RollingFileManager.createFileAfterRollover(RollingFileManager.java:351)
>>        at
>> org.apache.logging.log4j.core.appender.rolling.RollingFileManager.rollover(RollingFileManager.java:343)
>>        at
>> org.apache.logging.log4j.core.appender.rolling.RollingFileManager.checkRollover(RollingFileManager.java:273)
>>        at
>> org.apache.logging.log4j.core.appender.RollingFileAppender.append(RollingFileAppender.java:311)
>>        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:543)
>>        at
>> org.apache.logging.log4j.core.config.LoggerConfig.processLogEvent(LoggerConfig.java:502)
>>        at
>> org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:485)
>>        at
>> org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:460)
>>        at
>> org.apache.logging.log4j.core.config.AwaitCompletionReliabilityStrategy.log(AwaitCompletionReliabilityStrategy.java:82)
>>        at org.apache.logging.log4j.core.Logger.log(Logger.java:161)
>>        at
>> org.apache.logging.log4j.spi.AbstractLogger.tryLogMessage(AbstractLogger.java:2198)
>>        at
>> org.apache.logging.log4j.spi.AbstractLogger.logMessageTrackRecursion(AbstractLogger.java:2152)
>>        at
>> org.apache.logging.log4j.spi.AbstractLogger.logMessageSafely(AbstractLogger.java:2135)
>>        at
>> org.apache.logging.log4j.spi.AbstractLogger.logMessage(AbstractLogger.java:2011)
>>        at
>> org.apache.logging.log4j.spi.AbstractLogger.logIfEnabled(AbstractLogger.java:1983)
>>        at
>> org.apache.logging.log4j.spi.AbstractLogger.info(AbstractLogger.java:1320)
>>        ...
>>        at
>> weblogic.ejb.container.internal.MDListener.execute(MDListener.java:453)
>>        at
>> weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:376)
>>        at
>> weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:311)
>>        at
>> weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4855)
>>        at weblogic.jms.client.JMSSession.execute(JMSSession.java:4529)
>>        at
>> weblogic.jms.client.JMSSession.executeMessage(JMSSession.java:3976)
>>        at
>> weblogic.jms.client.JMSSession.access$000(JMSSession.java:120)
>>        at
>> weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:5375)
>>        at
>> weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:553)
>>        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)
>>        at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)
>> ERROR StatusLogger Unable to write to stream
>> /LOG/%d{yyyy_MM_dd}/messages-${date:yyyy_MM_dd_HH_mm_ss}-1.log for
>> appender localmsglog
>> org.apache.logging.log4j.core.appender.AppenderLoggingException: Error
>> writing to stream
>> /LOG/%d{yyyy_MM_dd}/messages-${date:yyyy_MM_dd_HH_mm_ss}-1.log
>>        at
>> org.apache.logging.log4j.core.appender.OutputStreamManager.writeToDestination(OutputStreamManager.java:252)
>>        at
>> org.apache.logging.log4j.core.appender.FileManager.writeToDestination(FileManager.java:273)
>>        at
>> org.apache.logging.log4j.core.appender.rolling.RollingFileManager.writeToDestination(RollingFileManager.java:240)
>>        at
>> org.apache.logging.log4j.core.appender.OutputStreamManager.flushBuffer(OutputStreamManager.java:282)
>>        at
>> org.apache.logging.log4j.core.appender.OutputStreamManager.flush(OutputStreamManager.java:291)
>>        at
>> org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.directEncodeEvent(AbstractOutputStreamAppender.java:199)
>>        at
>> org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.tryAppend(AbstractOutputStreamAppender.java:190)
>>        at
>> org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.append(AbstractOutputStreamAppender.java:181)
>>        at
>> org.apache.logging.log4j.core.appender.RollingFileAppender.append(RollingFileAppender.java:312)
>>        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:543)
>>        at
>> org.apache.logging.log4j.core.config.LoggerConfig.processLogEvent(LoggerConfig.java:502)
>>        at
>> org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:485)
>>        at
>> org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:460)
>>        at
>> org.apache.logging.log4j.core.config.AwaitCompletionReliabilityStrategy.log(AwaitCompletionReliabilityStrategy.java:82)
>>        at org.apache.logging.log4j.core.Logger.log(Logger.java:161)
>>        at
>> org.apache.logging.log4j.spi.AbstractLogger.tryLogMessage(AbstractLogger.java:2198)
>>        at
>> org.apache.logging.log4j.spi.AbstractLogger.logMessageTrackRecursion(AbstractLogger.java:2152)
>>        at
>> org.apache.logging.log4j.spi.AbstractLogger.logMessageSafely(AbstractLogger.java:2135)
>>        at
>> org.apache.logging.log4j.spi.AbstractLogger.logMessage(AbstractLogger.java:2011)
>>        at
>> org.apache.logging.log4j.spi.AbstractLogger.logIfEnabled(AbstractLogger.java:1983)
>>        at
>> org.apache.logging.log4j.spi.AbstractLogger.info(AbstractLogger.java:1320)
>>        ...
>>        at
>> weblogic.ejb.container.internal.MDListener.execute(MDListener.java:453)
>>        at
>> weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:376)
>>        at
>> weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:311)
>>        at
>> weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4855)
>>        at weblogic.jms.client.JMSSession.execute(JMSSession.java:4529)
>>        at
>> weblogic.jms.client.JMSSession.executeMessage(JMSSession.java:3976)
>>        at
>> weblogic.jms.client.JMSSession.access$000(JMSSession.java:120)
>>        at
>> weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:5375)
>>        at
>> weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:553)
>>        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)
>>        at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)
>> Caused by: java.io.IOException: Stream Closed
>>        at java.io.FileOutputStream.writeBytes(Native Method)
>>        at java.io.FileOutputStream.write(FileOutputStream.java:326)
>>        at
>> org.apache.logging.log4j.core.appender.OutputStreamManager.writeToDestination(OutputStreamManager.java:250)
>>        ... 39 more
>> ERROR StatusLogger An exception occurred processing Appender
>> localmsglog
>> org.apache.logging.log4j.core.appender.AppenderLoggingException: Error
>> writing to stream
>> /LOG/%d{yyyy_MM_dd}/messages-${date:yyyy_MM_dd_HH_mm_ss}-1.log
>>        at
>> org.apache.logging.log4j.core.appender.OutputStreamManager.writeToDestination(OutputStreamManager.java:252)
>>        at
>> org.apache.logging.log4j.core.appender.FileManager.writeToDestination(FileManager.java:273)
>>        at
>> org.apache.logging.log4j.core.appender.rolling.RollingFileManager.writeToDestination(RollingFileManager.java:240)
>>        at
>> org.apache.logging.log4j.core.appender.OutputStreamManager.flushBuffer(OutputStreamManager.java:282)
>>        at
>> org.apache.logging.log4j.core.appender.OutputStreamManager.flush(OutputStreamManager.java:291)
>>        at
>> org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.directEncodeEvent(AbstractOutputStreamAppender.java:199)
>>        at
>> org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.tryAppend(AbstractOutputStreamAppender.java:190)
>>        at
>> org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.append(AbstractOutputStreamAppender.java:181)
>>        at
>> org.apache.logging.log4j.core.appender.RollingFileAppender.append(RollingFileAppender.java:312)
>>        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:543)
>>        at
>> org.apache.logging.log4j.core.config.LoggerConfig.processLogEvent(LoggerConfig.java:502)
>>        at
>> org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:485)
>>        at
>> org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:460)
>>        at
>> org.apache.logging.log4j.core.config.AwaitCompletionReliabilityStrategy.log(AwaitCompletionReliabilityStrategy.java:82)
>>        at org.apache.logging.log4j.core.Logger.log(Logger.java:161)
>>        at
>> org.apache.logging.log4j.spi.AbstractLogger.tryLogMessage(AbstractLogger.java:2198)
>>        at
>> org.apache.logging.log4j.spi.AbstractLogger.logMessageTrackRecursion(AbstractLogger.java:2152)
>>        at
>> org.apache.logging.log4j.spi.AbstractLogger.logMessageSafely(AbstractLogger.java:2135)
>>        at
>> org.apache.logging.log4j.spi.AbstractLogger.logMessage(AbstractLogger.java:2011)
>>        at
>> org.apache.logging.log4j.spi.AbstractLogger.logIfEnabled(AbstractLogger.java:1983)
>>        at
>> org.apache.logging.log4j.spi.AbstractLogger.info(AbstractLogger.java:1320)
>>        ...
>>        at
>> weblogic.ejb.container.internal.MDListener.execute(MDListener.java:453)
>>        at
>> weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:376)
>>        at
>> weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:311)
>>        at
>> weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4855)
>>        at weblogic.jms.client.JMSSession.execute(JMSSession.java:4529)
>>        at
>> weblogic.jms.client.JMSSession.executeMessage(JMSSession.java:3976)
>>        at
>> weblogic.jms.client.JMSSession.access$000(JMSSession.java:120)
>>        at
>> weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:5375)
>>        at
>> weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:553)
>>        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)
>>        at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)
>> Caused by: java.io.IOException: Stream Closed
>>        at java.io.FileOutputStream.writeBytes(Native Method)
>>        at java.io.FileOutputStream.write(FileOutputStream.java:326)
>>        at
>> org.apache.logging.log4j.core.appender.OutputStreamManager.writeToDestination(OutputStreamManager.java:250)
>>        ... 39 more
>> ERROR StatusLogger Unable to write to stream
>> /LOG/%d{yyyy_MM_dd}/messages-${date:yyyy_MM_dd_HH_mm_ss}-1.log for
>> appender localmsglog
>> org.apache.logging.log4j.core.appender.AppenderLoggingException: Error
>> writing to stream
>> /LOG/%d{yyyy_MM_dd}/messages-${date:yyyy_MM_dd_HH_mm_ss}-1.log
>>        at
>> org.apache.logging.log4j.core.appender.OutputStreamManager.writeToDestination(OutputStreamManager.java:252)
>>        at
>> org.apache.logging.log4j.core.appender.FileManager.writeToDestination(FileManager.java:273)
>>        at
>> org.apache.logging.log4j.core.appender.rolling.RollingFileManager.writeToDestination(RollingFileManager.java:240)
>>        at
>> org.apache.logging.log4j.core.appender.OutputStreamManager.flushBuffer(OutputStreamManager.java:282)
>>        at
>> org.apache.logging.log4j.core.appender.OutputStreamManager.flush(OutputStreamManager.java:291)
>>        at
>> org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.directEncodeEvent(AbstractOutputStreamAppender.java:199)
>>        at
>> org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.tryAppend(AbstractOutputStreamAppender.java:190)
>>        at
>> org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.append(AbstractOutputStreamAppender.java:181)
>>        at
>> org.apache.logging.log4j.core.appender.RollingFileAppender.append(RollingFileAppender.java:312)
>>        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:543)
>>        at
>> org.apache.logging.log4j.core.config.LoggerConfig.processLogEvent(LoggerConfig.java:502)
>>        at
>> org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:485)
>>        at
>> org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:460)
>>        at
>> org.apache.logging.log4j.core.config.AwaitCompletionReliabilityStrategy.log(AwaitCompletionReliabilityStrategy.java:82)
>>        at org.apache.logging.log4j.core.Logger.log(Logger.java:161)
>>        at
>> org.apache.logging.log4j.spi.AbstractLogger.tryLogMessage(AbstractLogger.java:2198)
>>        at
>> org.apache.logging.log4j.spi.AbstractLogger.logMessageTrackRecursion(AbstractLogger.java:2152)
>>        at
>> org.apache.logging.log4j.spi.AbstractLogger.logMessageSafely(AbstractLogger.java:2135)
>>        at
>> org.apache.logging.log4j.spi.AbstractLogger.logMessage(AbstractLogger.java:2011)
>>        at
>> org.apache.logging.log4j.spi.AbstractLogger.logIfEnabled(AbstractLogger.java:1983)
>>        at
>> org.apache.logging.log4j.spi.AbstractLogger.info(AbstractLogger.java:1320)
>>        ...
>>        at
>> weblogic.ejb.container.internal.MDListener.execute(MDListener.java:453)
>>        at
>> weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:376)
>>        at
>> weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:311)
>>        at
>> weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4855)
>>        at weblogic.jms.client.JMSSession.execute(JMSSession.java:4529)
>>        at
>> weblogic.jms.client.JMSSession.executeMessage(JMSSession.java:3976)
>>        at
>> weblogic.jms.client.JMSSession.access$000(JMSSession.java:120)
>>        at
>> weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:5375)
>>        at
>> weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:553)
>>        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)
>>        at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)
>> Caused by: java.io.IOException: Stream Closed
>>        at java.io.FileOutputStream.writeBytes(Native Method)
>>        at java.io.FileOutputStream.write(FileOutputStream.java:326)
>>        at
>> org.apache.logging.log4j.core.appender.OutputStreamManager.writeToDestination(OutputStreamManager.java:250)
>>        ... 40 more
>>
>> Thanks
>> Benjamin
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: IOException after midnight roll

Ralph Goers
Thanks,

Would you mind creating a Jira issue and attaching this there?

Ralph

> On Jun 18, 2020, at 8:12 AM, Benjamin Asbach <[hidden email]> wrote:
>
> I could reproduce the problem wiht some test code:
>
> ```
> import java.util.Properties;
> import org.apache.logging.log4j.core.Logger;
> import org.apache.logging.log4j.core.LoggerContext;
> import org.apache.logging.log4j.core.config.properties.PropertiesConfiguration;
> import org.apache.logging.log4j.core.config.properties.PropertiesConfigurationBuilder;
> import org.junit.jupiter.api.Test;
>
> public class RollingTest {
>
>  @Test
>  public void streamClosedError() throws Exception {
>    Properties log4j2Properties = new Properties();
>    log4j2Properties.put("appender.localmsglog.type", "RollingFile");
>    log4j2Properties.put("appender.localmsglog.name", "localmsglog");
>    log4j2Properties.put("appender.localmsglog.filePattern", "C:/dev/tmp/log/%d{yyyy_MM_dd-mm}/messages-$${date:yyyy_MM_dd_HH_mm_ss}.log");
>    log4j2Properties.put("appender.localmsglog.policies.type", "Policies");
>    log4j2Properties.put("appender.localmsglog.policies.1.type", "TimeBasedTriggeringPolicy");
>
>    log4j2Properties.put("rootLogger.level", "info");
>    log4j2Properties.put("rootLogger.appenderRef.1.ref", "localmsglog");
>
>    PropertiesConfiguration config = new PropertiesConfigurationBuilder()
>            .setRootProperties(log4j2Properties)
>            .build();
>
>    org.apache.logging.log4j.core.config.Configurator.reconfigure(config);
>
>    LoggerContext context = LoggerContext.getContext(false);
>    Logger log = context.getRootLogger();
>    while(true) {
>      log.info("AAA");
>      Thread.sleep(15000);
>    }
>  }
> }
> ```
>
> Greetings
> Benjamin
>
> On 2020-06-18 05:05, Ralph Goers wrote:
>> You don’t have a filename specified so it is trying to use
>> DirectWriteRolloverStrategy. You are using SizeBasedTriggeringPolicy
>> and don’t have %I in the pattern, which is normally required for a
>> size based rollover. However, that doesn’t seem to be a problem here.
>> I notice that the previous file was in the directory named 2020_06_17
>> while the new file is supposed to go in 2020_06_18.  I have a
>> suspicion it isn’t creating the directory for some reason.
>> Ralph
>>> On Jun 17, 2020, at 6:09 PM, Benjamin Asbach <[hidden email]> wrote:
>>> Hi,
>>> every night after rolling we experience IOExceptions when our logger tries to log. So after midnight there's no logging to that log file at all. The application is running on four WebLogic12 nodes. All nodes are running on the same machine. All logs are going to the same directory. The log files are separated by the server id.
>>> Looking forward for any input.
>>> ## Config
>>> appender.localmsglog.type = RollingFile
>>> appender.localmsglog.name = localmsglog
>>> # NOTE: %d is needed for TimeBasedTriggeringPolicy
>>> appender.localmsglog.filePattern = /LOG/%d{yyyy_MM_dd}/messages-$${date:yyyy_MM_dd_HH_mm_ss}-${serverinstance:}.log
>>> appender.localmsglog.layout.type = CustomXMLLayout
>>> appender.localmsglog.policies.type = Policies
>>> appender.localmsglog.policies.1.type = SizeBasedTriggeringPolicy
>>> appender.localmsglog.policies.1.size = 250MB
>>> appender.localmsglog.policies.2.type = TimeBasedTriggeringPolicy
>>> ## Error
>>> TRACE StatusLogger PatternProcessor.getNextTime returning 2020/06/19-00:00:00.000, nextFileTime=2020/06/18-00:00:00.000, prevFileTime=2020/06/17-00:00:00.000, current=2020/06/18-02:37:49.794, freq=DAILY
>>> DEBUG StatusLogger Rolling /LOG/2020_06_17/messages-2020_06_17_19_52_34-1.log
>>> DEBUG StatusLogger Formatting file name. useCurrentTime=false. currentFileTime=1592440669794, prevFileTime=1592344800000
>>> DEBUG StatusLogger Found 0 eligible files, max is  2147483647
>>> TRACE StatusLogger DirectWriteRolloverStrategy.purge() took 0.0 milliseconds
>>> DEBUG StatusLogger OutputStream closed
>>> DEBUG StatusLogger Formatting file name. useCurrentTime=false. currentFileTime=1592440669794, prevFileTime=1592344800000
>>> DEBUG StatusLogger Formatting file name. useCurrentTime=true. currentFileTime=1592440669794, prevFileTime=1592344800000
>>> DEBUG StatusLogger Now writing to /LOG/2020_06_18/messages-2020_06_18_02_37_49-1.log at 2020-06-18T02:37:49.804+0200
>>> ERROR StatusLogger RollingFileManager /LOG/%d{yyyy_MM_dd}/messages-${date:yyyy_MM_dd_HH_mm_ss}-1.log Failed to create file after rollover: java.io.FileNotFoundException: /LOG/2020_06_18/messages-2020_06_18_02_37_49-1.log (No such file or directory)
>>> java.io.FileNotFoundException: /LOG/2020_06_18/messages-2020_06_18_02_37_49-1.log (No such file or directory)
>>>       at java.io.FileOutputStream.open0(Native Method)
>>>       at java.io.FileOutputStream.open(FileOutputStream.java:270)
>>>       at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
>>>       at org.apache.logging.log4j.core.appender.FileManager.createOutputStream(FileManager.java:191)
>>>       at org.apache.logging.log4j.core.appender.rolling.RollingFileManager.createFileAfterRollover(RollingFileManager.java:351)
>>>       at org.apache.logging.log4j.core.appender.rolling.RollingFileManager.rollover(RollingFileManager.java:343)
>>>       at org.apache.logging.log4j.core.appender.rolling.RollingFileManager.checkRollover(RollingFileManager.java:273)
>>>       at org.apache.logging.log4j.core.appender.RollingFileAppender.append(RollingFileAppender.java:311)
>>>       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:543)
>>>       at org.apache.logging.log4j.core.config.LoggerConfig.processLogEvent(LoggerConfig.java:502)
>>>       at org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:485)
>>>       at org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:460)
>>>       at org.apache.logging.log4j.core.config.AwaitCompletionReliabilityStrategy.log(AwaitCompletionReliabilityStrategy.java:82)
>>>       at org.apache.logging.log4j.core.Logger.log(Logger.java:161)
>>>       at org.apache.logging.log4j.spi.AbstractLogger.tryLogMessage(AbstractLogger.java:2198)
>>>       at org.apache.logging.log4j.spi.AbstractLogger.logMessageTrackRecursion(AbstractLogger.java:2152)
>>>       at org.apache.logging.log4j.spi.AbstractLogger.logMessageSafely(AbstractLogger.java:2135)
>>>       at org.apache.logging.log4j.spi.AbstractLogger.logMessage(AbstractLogger.java:2011)
>>>       at org.apache.logging.log4j.spi.AbstractLogger.logIfEnabled(AbstractLogger.java:1983)
>>>       at org.apache.logging.log4j.spi.AbstractLogger.info(AbstractLogger.java:1320)
>>>       ...
>>>       at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:453)
>>>       at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:376)
>>>       at weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:311)
>>>       at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4855)
>>>       at weblogic.jms.client.JMSSession.execute(JMSSession.java:4529)
>>>       at weblogic.jms.client.JMSSession.executeMessage(JMSSession.java:3976)
>>>       at weblogic.jms.client.JMSSession.access$000(JMSSession.java:120)
>>>       at weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:5375)
>>>       at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:553)
>>>       at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)
>>>       at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)
>>> ERROR StatusLogger Unable to write to stream /LOG/%d{yyyy_MM_dd}/messages-${date:yyyy_MM_dd_HH_mm_ss}-1.log for appender localmsglog
>>> org.apache.logging.log4j.core.appender.AppenderLoggingException: Error writing to stream /LOG/%d{yyyy_MM_dd}/messages-${date:yyyy_MM_dd_HH_mm_ss}-1.log
>>>       at org.apache.logging.log4j.core.appender.OutputStreamManager.writeToDestination(OutputStreamManager.java:252)
>>>       at org.apache.logging.log4j.core.appender.FileManager.writeToDestination(FileManager.java:273)
>>>       at org.apache.logging.log4j.core.appender.rolling.RollingFileManager.writeToDestination(RollingFileManager.java:240)
>>>       at org.apache.logging.log4j.core.appender.OutputStreamManager.flushBuffer(OutputStreamManager.java:282)
>>>       at org.apache.logging.log4j.core.appender.OutputStreamManager.flush(OutputStreamManager.java:291)
>>>       at org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.directEncodeEvent(AbstractOutputStreamAppender.java:199)
>>>       at org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.tryAppend(AbstractOutputStreamAppender.java:190)
>>>       at org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.append(AbstractOutputStreamAppender.java:181)
>>>       at org.apache.logging.log4j.core.appender.RollingFileAppender.append(RollingFileAppender.java:312)
>>>       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:543)
>>>       at org.apache.logging.log4j.core.config.LoggerConfig.processLogEvent(LoggerConfig.java:502)
>>>       at org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:485)
>>>       at org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:460)
>>>       at org.apache.logging.log4j.core.config.AwaitCompletionReliabilityStrategy.log(AwaitCompletionReliabilityStrategy.java:82)
>>>       at org.apache.logging.log4j.core.Logger.log(Logger.java:161)
>>>       at org.apache.logging.log4j.spi.AbstractLogger.tryLogMessage(AbstractLogger.java:2198)
>>>       at org.apache.logging.log4j.spi.AbstractLogger.logMessageTrackRecursion(AbstractLogger.java:2152)
>>>       at org.apache.logging.log4j.spi.AbstractLogger.logMessageSafely(AbstractLogger.java:2135)
>>>       at org.apache.logging.log4j.spi.AbstractLogger.logMessage(AbstractLogger.java:2011)
>>>       at org.apache.logging.log4j.spi.AbstractLogger.logIfEnabled(AbstractLogger.java:1983)
>>>       at org.apache.logging.log4j.spi.AbstractLogger.info(AbstractLogger.java:1320)
>>>       ...
>>>       at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:453)
>>>       at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:376)
>>>       at weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:311)
>>>       at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4855)
>>>       at weblogic.jms.client.JMSSession.execute(JMSSession.java:4529)
>>>       at weblogic.jms.client.JMSSession.executeMessage(JMSSession.java:3976)
>>>       at weblogic.jms.client.JMSSession.access$000(JMSSession.java:120)
>>>       at weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:5375)
>>>       at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:553)
>>>       at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)
>>>       at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)
>>> Caused by: java.io.IOException: Stream Closed
>>>       at java.io.FileOutputStream.writeBytes(Native Method)
>>>       at java.io.FileOutputStream.write(FileOutputStream.java:326)
>>>       at org.apache.logging.log4j.core.appender.OutputStreamManager.writeToDestination(OutputStreamManager.java:250)
>>>       ... 39 more
>>> ERROR StatusLogger An exception occurred processing Appender localmsglog
>>> org.apache.logging.log4j.core.appender.AppenderLoggingException: Error writing to stream /LOG/%d{yyyy_MM_dd}/messages-${date:yyyy_MM_dd_HH_mm_ss}-1.log
>>>       at org.apache.logging.log4j.core.appender.OutputStreamManager.writeToDestination(OutputStreamManager.java:252)
>>>       at org.apache.logging.log4j.core.appender.FileManager.writeToDestination(FileManager.java:273)
>>>       at org.apache.logging.log4j.core.appender.rolling.RollingFileManager.writeToDestination(RollingFileManager.java:240)
>>>       at org.apache.logging.log4j.core.appender.OutputStreamManager.flushBuffer(OutputStreamManager.java:282)
>>>       at org.apache.logging.log4j.core.appender.OutputStreamManager.flush(OutputStreamManager.java:291)
>>>       at org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.directEncodeEvent(AbstractOutputStreamAppender.java:199)
>>>       at org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.tryAppend(AbstractOutputStreamAppender.java:190)
>>>       at org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.append(AbstractOutputStreamAppender.java:181)
>>>       at org.apache.logging.log4j.core.appender.RollingFileAppender.append(RollingFileAppender.java:312)
>>>       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:543)
>>>       at org.apache.logging.log4j.core.config.LoggerConfig.processLogEvent(LoggerConfig.java:502)
>>>       at org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:485)
>>>       at org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:460)
>>>       at org.apache.logging.log4j.core.config.AwaitCompletionReliabilityStrategy.log(AwaitCompletionReliabilityStrategy.java:82)
>>>       at org.apache.logging.log4j.core.Logger.log(Logger.java:161)
>>>       at org.apache.logging.log4j.spi.AbstractLogger.tryLogMessage(AbstractLogger.java:2198)
>>>       at org.apache.logging.log4j.spi.AbstractLogger.logMessageTrackRecursion(AbstractLogger.java:2152)
>>>       at org.apache.logging.log4j.spi.AbstractLogger.logMessageSafely(AbstractLogger.java:2135)
>>>       at org.apache.logging.log4j.spi.AbstractLogger.logMessage(AbstractLogger.java:2011)
>>>       at org.apache.logging.log4j.spi.AbstractLogger.logIfEnabled(AbstractLogger.java:1983)
>>>       at org.apache.logging.log4j.spi.AbstractLogger.info(AbstractLogger.java:1320)
>>>       ...
>>>       at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:453)
>>>       at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:376)
>>>       at weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:311)
>>>       at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4855)
>>>       at weblogic.jms.client.JMSSession.execute(JMSSession.java:4529)
>>>       at weblogic.jms.client.JMSSession.executeMessage(JMSSession.java:3976)
>>>       at weblogic.jms.client.JMSSession.access$000(JMSSession.java:120)
>>>       at weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:5375)
>>>       at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:553)
>>>       at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)
>>>       at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)
>>> Caused by: java.io.IOException: Stream Closed
>>>       at java.io.FileOutputStream.writeBytes(Native Method)
>>>       at java.io.FileOutputStream.write(FileOutputStream.java:326)
>>>       at org.apache.logging.log4j.core.appender.OutputStreamManager.writeToDestination(OutputStreamManager.java:250)
>>>       ... 39 more
>>> ERROR StatusLogger Unable to write to stream /LOG/%d{yyyy_MM_dd}/messages-${date:yyyy_MM_dd_HH_mm_ss}-1.log for appender localmsglog
>>> org.apache.logging.log4j.core.appender.AppenderLoggingException: Error writing to stream /LOG/%d{yyyy_MM_dd}/messages-${date:yyyy_MM_dd_HH_mm_ss}-1.log
>>>       at org.apache.logging.log4j.core.appender.OutputStreamManager.writeToDestination(OutputStreamManager.java:252)
>>>       at org.apache.logging.log4j.core.appender.FileManager.writeToDestination(FileManager.java:273)
>>>       at org.apache.logging.log4j.core.appender.rolling.RollingFileManager.writeToDestination(RollingFileManager.java:240)
>>>       at org.apache.logging.log4j.core.appender.OutputStreamManager.flushBuffer(OutputStreamManager.java:282)
>>>       at org.apache.logging.log4j.core.appender.OutputStreamManager.flush(OutputStreamManager.java:291)
>>>       at org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.directEncodeEvent(AbstractOutputStreamAppender.java:199)
>>>       at org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.tryAppend(AbstractOutputStreamAppender.java:190)
>>>       at org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.append(AbstractOutputStreamAppender.java:181)
>>>       at org.apache.logging.log4j.core.appender.RollingFileAppender.append(RollingFileAppender.java:312)
>>>       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:543)
>>>       at org.apache.logging.log4j.core.config.LoggerConfig.processLogEvent(LoggerConfig.java:502)
>>>       at org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:485)
>>>       at org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:460)
>>>       at org.apache.logging.log4j.core.config.AwaitCompletionReliabilityStrategy.log(AwaitCompletionReliabilityStrategy.java:82)
>>>       at org.apache.logging.log4j.core.Logger.log(Logger.java:161)
>>>       at org.apache.logging.log4j.spi.AbstractLogger.tryLogMessage(AbstractLogger.java:2198)
>>>       at org.apache.logging.log4j.spi.AbstractLogger.logMessageTrackRecursion(AbstractLogger.java:2152)
>>>       at org.apache.logging.log4j.spi.AbstractLogger.logMessageSafely(AbstractLogger.java:2135)
>>>       at org.apache.logging.log4j.spi.AbstractLogger.logMessage(AbstractLogger.java:2011)
>>>       at org.apache.logging.log4j.spi.AbstractLogger.logIfEnabled(AbstractLogger.java:1983)
>>>       at org.apache.logging.log4j.spi.AbstractLogger.info(AbstractLogger.java:1320)
>>>       ...
>>>       at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:453)
>>>       at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:376)
>>>       at weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:311)
>>>       at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4855)
>>>       at weblogic.jms.client.JMSSession.execute(JMSSession.java:4529)
>>>       at weblogic.jms.client.JMSSession.executeMessage(JMSSession.java:3976)
>>>       at weblogic.jms.client.JMSSession.access$000(JMSSession.java:120)
>>>       at weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:5375)
>>>       at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:553)
>>>       at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)
>>>       at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)
>>> Caused by: java.io.IOException: Stream Closed
>>>       at java.io.FileOutputStream.writeBytes(Native Method)
>>>       at java.io.FileOutputStream.write(FileOutputStream.java:326)
>>>       at org.apache.logging.log4j.core.appender.OutputStreamManager.writeToDestination(OutputStreamManager.java:250)
>>>       ... 40 more
>>> Thanks
>>> Benjamin
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [hidden email]
>>> For additional commands, e-mail: [hidden email]
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: IOException after midnight roll

Benjamin Asbach
Sure. I was not 100% sure if this is a bug or a configuration issue.

https://issues.apache.org/jira/browse/LOG4J2-2875

Greetings
Benjamin

On 2020-06-18 17:15, Ralph Goers wrote:

> Thanks,
>
> Would you mind creating a Jira issue and attaching this there?
>
> Ralph
>
>> On Jun 18, 2020, at 8:12 AM, Benjamin Asbach <[hidden email]>
>> wrote:
>>
>> I could reproduce the problem wiht some test code:
>>
>> ```
>> import java.util.Properties;
>> import org.apache.logging.log4j.core.Logger;
>> import org.apache.logging.log4j.core.LoggerContext;
>> import
>> org.apache.logging.log4j.core.config.properties.PropertiesConfiguration;
>> import
>> org.apache.logging.log4j.core.config.properties.PropertiesConfigurationBuilder;
>> import org.junit.jupiter.api.Test;
>>
>> public class RollingTest {
>>
>>  @Test
>>  public void streamClosedError() throws Exception {
>>    Properties log4j2Properties = new Properties();
>>    log4j2Properties.put("appender.localmsglog.type", "RollingFile");
>>    log4j2Properties.put("appender.localmsglog.name", "localmsglog");
>>    log4j2Properties.put("appender.localmsglog.filePattern",
>> "C:/dev/tmp/log/%d{yyyy_MM_dd-mm}/messages-$${date:yyyy_MM_dd_HH_mm_ss}.log");
>>    log4j2Properties.put("appender.localmsglog.policies.type",
>> "Policies");
>>    log4j2Properties.put("appender.localmsglog.policies.1.type",
>> "TimeBasedTriggeringPolicy");
>>
>>    log4j2Properties.put("rootLogger.level", "info");
>>    log4j2Properties.put("rootLogger.appenderRef.1.ref",
>> "localmsglog");
>>
>>    PropertiesConfiguration config = new
>> PropertiesConfigurationBuilder()
>>            .setRootProperties(log4j2Properties)
>>            .build();
>>
>>    
>> org.apache.logging.log4j.core.config.Configurator.reconfigure(config);
>>
>>    LoggerContext context = LoggerContext.getContext(false);
>>    Logger log = context.getRootLogger();
>>    while(true) {
>>      log.info("AAA");
>>      Thread.sleep(15000);
>>    }
>>  }
>> }
>> ```
>>
>> Greetings
>> Benjamin
>>
>> On 2020-06-18 05:05, Ralph Goers wrote:
>>> You don’t have a filename specified so it is trying to use
>>> DirectWriteRolloverStrategy. You are using SizeBasedTriggeringPolicy
>>> and don’t have %I in the pattern, which is normally required for a
>>> size based rollover. However, that doesn’t seem to be a problem here.
>>> I notice that the previous file was in the directory named 2020_06_17
>>> while the new file is supposed to go in 2020_06_18.  I have a
>>> suspicion it isn’t creating the directory for some reason.
>>> Ralph
>>>> On Jun 17, 2020, at 6:09 PM, Benjamin Asbach <[hidden email]>
>>>> wrote:
>>>> Hi,
>>>> every night after rolling we experience IOExceptions when our logger
>>>> tries to log. So after midnight there's no logging to that log file
>>>> at all. The application is running on four WebLogic12 nodes. All
>>>> nodes are running on the same machine. All logs are going to the
>>>> same directory. The log files are separated by the server id.
>>>> Looking forward for any input.
>>>> ## Config
>>>> appender.localmsglog.type = RollingFile
>>>> appender.localmsglog.name = localmsglog
>>>> # NOTE: %d is needed for TimeBasedTriggeringPolicy
>>>> appender.localmsglog.filePattern =
>>>> /LOG/%d{yyyy_MM_dd}/messages-$${date:yyyy_MM_dd_HH_mm_ss}-${serverinstance:}.log
>>>> appender.localmsglog.layout.type = CustomXMLLayout
>>>> appender.localmsglog.policies.type = Policies
>>>> appender.localmsglog.policies.1.type = SizeBasedTriggeringPolicy
>>>> appender.localmsglog.policies.1.size = 250MB
>>>> appender.localmsglog.policies.2.type = TimeBasedTriggeringPolicy
>>>> ## Error
>>>> TRACE StatusLogger PatternProcessor.getNextTime returning
>>>> 2020/06/19-00:00:00.000, nextFileTime=2020/06/18-00:00:00.000,
>>>> prevFileTime=2020/06/17-00:00:00.000,
>>>> current=2020/06/18-02:37:49.794, freq=DAILY
>>>> DEBUG StatusLogger Rolling
>>>> /LOG/2020_06_17/messages-2020_06_17_19_52_34-1.log
>>>> DEBUG StatusLogger Formatting file name. useCurrentTime=false.
>>>> currentFileTime=1592440669794, prevFileTime=1592344800000
>>>> DEBUG StatusLogger Found 0 eligible files, max is  2147483647
>>>> TRACE StatusLogger DirectWriteRolloverStrategy.purge() took 0.0
>>>> milliseconds
>>>> DEBUG StatusLogger OutputStream closed
>>>> DEBUG StatusLogger Formatting file name. useCurrentTime=false.
>>>> currentFileTime=1592440669794, prevFileTime=1592344800000
>>>> DEBUG StatusLogger Formatting file name. useCurrentTime=true.
>>>> currentFileTime=1592440669794, prevFileTime=1592344800000
>>>> DEBUG StatusLogger Now writing to
>>>> /LOG/2020_06_18/messages-2020_06_18_02_37_49-1.log at
>>>> 2020-06-18T02:37:49.804+0200
>>>> ERROR StatusLogger RollingFileManager
>>>> /LOG/%d{yyyy_MM_dd}/messages-${date:yyyy_MM_dd_HH_mm_ss}-1.log
>>>> Failed to create file after rollover: java.io.FileNotFoundException:
>>>> /LOG/2020_06_18/messages-2020_06_18_02_37_49-1.log (No such file or
>>>> directory)
>>>> java.io.FileNotFoundException:
>>>> /LOG/2020_06_18/messages-2020_06_18_02_37_49-1.log (No such file or
>>>> directory)
>>>>       at java.io.FileOutputStream.open0(Native Method)
>>>>       at java.io.FileOutputStream.open(FileOutputStream.java:270)
>>>>       at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
>>>>       at
>>>> org.apache.logging.log4j.core.appender.FileManager.createOutputStream(FileManager.java:191)
>>>>       at
>>>> org.apache.logging.log4j.core.appender.rolling.RollingFileManager.createFileAfterRollover(RollingFileManager.java:351)
>>>>       at
>>>> org.apache.logging.log4j.core.appender.rolling.RollingFileManager.rollover(RollingFileManager.java:343)
>>>>       at
>>>> org.apache.logging.log4j.core.appender.rolling.RollingFileManager.checkRollover(RollingFileManager.java:273)
>>>>       at
>>>> org.apache.logging.log4j.core.appender.RollingFileAppender.append(RollingFileAppender.java:311)
>>>>       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:543)
>>>>       at
>>>> org.apache.logging.log4j.core.config.LoggerConfig.processLogEvent(LoggerConfig.java:502)
>>>>       at
>>>> org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:485)
>>>>       at
>>>> org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:460)
>>>>       at
>>>> org.apache.logging.log4j.core.config.AwaitCompletionReliabilityStrategy.log(AwaitCompletionReliabilityStrategy.java:82)
>>>>       at org.apache.logging.log4j.core.Logger.log(Logger.java:161)
>>>>       at
>>>> org.apache.logging.log4j.spi.AbstractLogger.tryLogMessage(AbstractLogger.java:2198)
>>>>       at
>>>> org.apache.logging.log4j.spi.AbstractLogger.logMessageTrackRecursion(AbstractLogger.java:2152)
>>>>       at
>>>> org.apache.logging.log4j.spi.AbstractLogger.logMessageSafely(AbstractLogger.java:2135)
>>>>       at
>>>> org.apache.logging.log4j.spi.AbstractLogger.logMessage(AbstractLogger.java:2011)
>>>>       at
>>>> org.apache.logging.log4j.spi.AbstractLogger.logIfEnabled(AbstractLogger.java:1983)
>>>>       at
>>>> org.apache.logging.log4j.spi.AbstractLogger.info(AbstractLogger.java:1320)
>>>>       ...
>>>>       at
>>>> weblogic.ejb.container.internal.MDListener.execute(MDListener.java:453)
>>>>       at
>>>> weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:376)
>>>>       at
>>>> weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:311)
>>>>       at
>>>> weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4855)
>>>>       at
>>>> weblogic.jms.client.JMSSession.execute(JMSSession.java:4529)
>>>>       at
>>>> weblogic.jms.client.JMSSession.executeMessage(JMSSession.java:3976)
>>>>       at
>>>> weblogic.jms.client.JMSSession.access$000(JMSSession.java:120)
>>>>       at
>>>> weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:5375)
>>>>       at
>>>> weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:553)
>>>>       at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)
>>>>       at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)
>>>> ERROR StatusLogger Unable to write to stream
>>>> /LOG/%d{yyyy_MM_dd}/messages-${date:yyyy_MM_dd_HH_mm_ss}-1.log for
>>>> appender localmsglog
>>>> org.apache.logging.log4j.core.appender.AppenderLoggingException:
>>>> Error writing to stream
>>>> /LOG/%d{yyyy_MM_dd}/messages-${date:yyyy_MM_dd_HH_mm_ss}-1.log
>>>>       at
>>>> org.apache.logging.log4j.core.appender.OutputStreamManager.writeToDestination(OutputStreamManager.java:252)
>>>>       at
>>>> org.apache.logging.log4j.core.appender.FileManager.writeToDestination(FileManager.java:273)
>>>>       at
>>>> org.apache.logging.log4j.core.appender.rolling.RollingFileManager.writeToDestination(RollingFileManager.java:240)
>>>>       at
>>>> org.apache.logging.log4j.core.appender.OutputStreamManager.flushBuffer(OutputStreamManager.java:282)
>>>>       at
>>>> org.apache.logging.log4j.core.appender.OutputStreamManager.flush(OutputStreamManager.java:291)
>>>>       at
>>>> org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.directEncodeEvent(AbstractOutputStreamAppender.java:199)
>>>>       at
>>>> org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.tryAppend(AbstractOutputStreamAppender.java:190)
>>>>       at
>>>> org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.append(AbstractOutputStreamAppender.java:181)
>>>>       at
>>>> org.apache.logging.log4j.core.appender.RollingFileAppender.append(RollingFileAppender.java:312)
>>>>       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:543)
>>>>       at
>>>> org.apache.logging.log4j.core.config.LoggerConfig.processLogEvent(LoggerConfig.java:502)
>>>>       at
>>>> org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:485)
>>>>       at
>>>> org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:460)
>>>>       at
>>>> org.apache.logging.log4j.core.config.AwaitCompletionReliabilityStrategy.log(AwaitCompletionReliabilityStrategy.java:82)
>>>>       at org.apache.logging.log4j.core.Logger.log(Logger.java:161)
>>>>       at
>>>> org.apache.logging.log4j.spi.AbstractLogger.tryLogMessage(AbstractLogger.java:2198)
>>>>       at
>>>> org.apache.logging.log4j.spi.AbstractLogger.logMessageTrackRecursion(AbstractLogger.java:2152)
>>>>       at
>>>> org.apache.logging.log4j.spi.AbstractLogger.logMessageSafely(AbstractLogger.java:2135)
>>>>       at
>>>> org.apache.logging.log4j.spi.AbstractLogger.logMessage(AbstractLogger.java:2011)
>>>>       at
>>>> org.apache.logging.log4j.spi.AbstractLogger.logIfEnabled(AbstractLogger.java:1983)
>>>>       at
>>>> org.apache.logging.log4j.spi.AbstractLogger.info(AbstractLogger.java:1320)
>>>>       ...
>>>>       at
>>>> weblogic.ejb.container.internal.MDListener.execute(MDListener.java:453)
>>>>       at
>>>> weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:376)
>>>>       at
>>>> weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:311)
>>>>       at
>>>> weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4855)
>>>>       at
>>>> weblogic.jms.client.JMSSession.execute(JMSSession.java:4529)
>>>>       at
>>>> weblogic.jms.client.JMSSession.executeMessage(JMSSession.java:3976)
>>>>       at
>>>> weblogic.jms.client.JMSSession.access$000(JMSSession.java:120)
>>>>       at
>>>> weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:5375)
>>>>       at
>>>> weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:553)
>>>>       at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)
>>>>       at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)
>>>> Caused by: java.io.IOException: Stream Closed
>>>>       at java.io.FileOutputStream.writeBytes(Native Method)
>>>>       at java.io.FileOutputStream.write(FileOutputStream.java:326)
>>>>       at
>>>> org.apache.logging.log4j.core.appender.OutputStreamManager.writeToDestination(OutputStreamManager.java:250)
>>>>       ... 39 more
>>>> ERROR StatusLogger An exception occurred processing Appender
>>>> localmsglog
>>>> org.apache.logging.log4j.core.appender.AppenderLoggingException:
>>>> Error writing to stream
>>>> /LOG/%d{yyyy_MM_dd}/messages-${date:yyyy_MM_dd_HH_mm_ss}-1.log
>>>>       at
>>>> org.apache.logging.log4j.core.appender.OutputStreamManager.writeToDestination(OutputStreamManager.java:252)
>>>>       at
>>>> org.apache.logging.log4j.core.appender.FileManager.writeToDestination(FileManager.java:273)
>>>>       at
>>>> org.apache.logging.log4j.core.appender.rolling.RollingFileManager.writeToDestination(RollingFileManager.java:240)
>>>>       at
>>>> org.apache.logging.log4j.core.appender.OutputStreamManager.flushBuffer(OutputStreamManager.java:282)
>>>>       at
>>>> org.apache.logging.log4j.core.appender.OutputStreamManager.flush(OutputStreamManager.java:291)
>>>>       at
>>>> org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.directEncodeEvent(AbstractOutputStreamAppender.java:199)
>>>>       at
>>>> org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.tryAppend(AbstractOutputStreamAppender.java:190)
>>>>       at
>>>> org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.append(AbstractOutputStreamAppender.java:181)
>>>>       at
>>>> org.apache.logging.log4j.core.appender.RollingFileAppender.append(RollingFileAppender.java:312)
>>>>       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:543)
>>>>       at
>>>> org.apache.logging.log4j.core.config.LoggerConfig.processLogEvent(LoggerConfig.java:502)
>>>>       at
>>>> org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:485)
>>>>       at
>>>> org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:460)
>>>>       at
>>>> org.apache.logging.log4j.core.config.AwaitCompletionReliabilityStrategy.log(AwaitCompletionReliabilityStrategy.java:82)
>>>>       at org.apache.logging.log4j.core.Logger.log(Logger.java:161)
>>>>       at
>>>> org.apache.logging.log4j.spi.AbstractLogger.tryLogMessage(AbstractLogger.java:2198)
>>>>       at
>>>> org.apache.logging.log4j.spi.AbstractLogger.logMessageTrackRecursion(AbstractLogger.java:2152)
>>>>       at
>>>> org.apache.logging.log4j.spi.AbstractLogger.logMessageSafely(AbstractLogger.java:2135)
>>>>       at
>>>> org.apache.logging.log4j.spi.AbstractLogger.logMessage(AbstractLogger.java:2011)
>>>>       at
>>>> org.apache.logging.log4j.spi.AbstractLogger.logIfEnabled(AbstractLogger.java:1983)
>>>>       at
>>>> org.apache.logging.log4j.spi.AbstractLogger.info(AbstractLogger.java:1320)
>>>>       ...
>>>>       at
>>>> weblogic.ejb.container.internal.MDListener.execute(MDListener.java:453)
>>>>       at
>>>> weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:376)
>>>>       at
>>>> weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:311)
>>>>       at
>>>> weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4855)
>>>>       at
>>>> weblogic.jms.client.JMSSession.execute(JMSSession.java:4529)
>>>>       at
>>>> weblogic.jms.client.JMSSession.executeMessage(JMSSession.java:3976)
>>>>       at
>>>> weblogic.jms.client.JMSSession.access$000(JMSSession.java:120)
>>>>       at
>>>> weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:5375)
>>>>       at
>>>> weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:553)
>>>>       at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)
>>>>       at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)
>>>> Caused by: java.io.IOException: Stream Closed
>>>>       at java.io.FileOutputStream.writeBytes(Native Method)
>>>>       at java.io.FileOutputStream.write(FileOutputStream.java:326)
>>>>       at
>>>> org.apache.logging.log4j.core.appender.OutputStreamManager.writeToDestination(OutputStreamManager.java:250)
>>>>       ... 39 more
>>>> ERROR StatusLogger Unable to write to stream
>>>> /LOG/%d{yyyy_MM_dd}/messages-${date:yyyy_MM_dd_HH_mm_ss}-1.log for
>>>> appender localmsglog
>>>> org.apache.logging.log4j.core.appender.AppenderLoggingException:
>>>> Error writing to stream
>>>> /LOG/%d{yyyy_MM_dd}/messages-${date:yyyy_MM_dd_HH_mm_ss}-1.log
>>>>       at
>>>> org.apache.logging.log4j.core.appender.OutputStreamManager.writeToDestination(OutputStreamManager.java:252)
>>>>       at
>>>> org.apache.logging.log4j.core.appender.FileManager.writeToDestination(FileManager.java:273)
>>>>       at
>>>> org.apache.logging.log4j.core.appender.rolling.RollingFileManager.writeToDestination(RollingFileManager.java:240)
>>>>       at
>>>> org.apache.logging.log4j.core.appender.OutputStreamManager.flushBuffer(OutputStreamManager.java:282)
>>>>       at
>>>> org.apache.logging.log4j.core.appender.OutputStreamManager.flush(OutputStreamManager.java:291)
>>>>       at
>>>> org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.directEncodeEvent(AbstractOutputStreamAppender.java:199)
>>>>       at
>>>> org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.tryAppend(AbstractOutputStreamAppender.java:190)
>>>>       at
>>>> org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.append(AbstractOutputStreamAppender.java:181)
>>>>       at
>>>> org.apache.logging.log4j.core.appender.RollingFileAppender.append(RollingFileAppender.java:312)
>>>>       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:543)
>>>>       at
>>>> org.apache.logging.log4j.core.config.LoggerConfig.processLogEvent(LoggerConfig.java:502)
>>>>       at
>>>> org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:485)
>>>>       at
>>>> org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:460)
>>>>       at
>>>> org.apache.logging.log4j.core.config.AwaitCompletionReliabilityStrategy.log(AwaitCompletionReliabilityStrategy.java:82)
>>>>       at org.apache.logging.log4j.core.Logger.log(Logger.java:161)
>>>>       at
>>>> org.apache.logging.log4j.spi.AbstractLogger.tryLogMessage(AbstractLogger.java:2198)
>>>>       at
>>>> org.apache.logging.log4j.spi.AbstractLogger.logMessageTrackRecursion(AbstractLogger.java:2152)
>>>>       at
>>>> org.apache.logging.log4j.spi.AbstractLogger.logMessageSafely(AbstractLogger.java:2135)
>>>>       at
>>>> org.apache.logging.log4j.spi.AbstractLogger.logMessage(AbstractLogger.java:2011)
>>>>       at
>>>> org.apache.logging.log4j.spi.AbstractLogger.logIfEnabled(AbstractLogger.java:1983)
>>>>       at
>>>> org.apache.logging.log4j.spi.AbstractLogger.info(AbstractLogger.java:1320)
>>>>       ...
>>>>       at
>>>> weblogic.ejb.container.internal.MDListener.execute(MDListener.java:453)
>>>>       at
>>>> weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:376)
>>>>       at
>>>> weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:311)
>>>>       at
>>>> weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4855)
>>>>       at
>>>> weblogic.jms.client.JMSSession.execute(JMSSession.java:4529)
>>>>       at
>>>> weblogic.jms.client.JMSSession.executeMessage(JMSSession.java:3976)
>>>>       at
>>>> weblogic.jms.client.JMSSession.access$000(JMSSession.java:120)
>>>>       at
>>>> weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:5375)
>>>>       at
>>>> weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:553)
>>>>       at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)
>>>>       at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)
>>>> Caused by: java.io.IOException: Stream Closed
>>>>       at java.io.FileOutputStream.writeBytes(Native Method)
>>>>       at java.io.FileOutputStream.write(FileOutputStream.java:326)
>>>>       at
>>>> org.apache.logging.log4j.core.appender.OutputStreamManager.writeToDestination(OutputStreamManager.java:250)
>>>>       ... 40 more
>>>> Thanks
>>>> Benjamin
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: [hidden email]
>>>> For additional commands, e-mail: [hidden email]
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [hidden email]
>>> For additional commands, e-mail: [hidden email]
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]