[ 
https://issues.apache.org/jira/browse/LOG4J2-1182?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15828758#comment-15828758
 ] 

Jan commented on LOG4J2-1182:
-----------------------------

{quote}
Jan, Does the issue also occur with 2.7?
{quote}
Hi [~rem...@yahoo.com], I cannot say yet. I am about updating to 2.7. If I 
encounter it with 2.7, I'll update this ticket.

> RandomAccessFile IOException: Stream Closed is back
> ---------------------------------------------------
>
>                 Key: LOG4J2-1182
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1182
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Appenders
>    Affects Versions: 2.4.1
>         Environment: Java 1.8.0_60-b27, OSX 10.11, Jackson 2.6.1, Maven 3.3.3
>            Reporter: Ravi Gairola
>            Priority: Minor
>              Labels: Rollover
>
> This error pops up every now and then and looks very similar to LOG4J2-636:
> {code:java}
> 2015-10-27-23:00:00 2015-10-27 16:00:00,038 scribe-EventScribe ERROR Unable 
> to write to stream logs/server.log for appender AppLog
> 2015-10-27-23:00:00 2015-10-27 16:00:00,038 scribe-EventScribe ERROR An 
> exception occurred processing Appender AppLog 
> org.apache.logging.log4j.core.appender.AppenderLoggingException: Error 
> writing to RandomAccessFile logs/server.log
> 2015-10-27-23:00:00   at 
> org.apache.logging.log4j.core.appender.rolling.RollingRandomAccessFileManager.flush(RollingRandomAccessFileManager.java:132)
> 2015-10-27-23:00:00   at 
> org.apache.logging.log4j.core.appender.rolling.RollingRandomAccessFileManager.write(RollingRandomAccessFileManager.java:112)
> 2015-10-27-23:00:00   at 
> org.apache.logging.log4j.core.appender.OutputStreamManager.write(OutputStreamManager.java:136)
> 2015-10-27-23:00:00   at 
> org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.append(AbstractOutputStreamAppender.java:105)
> 2015-10-27-23:00:00   at 
> org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender.append(RollingRandomAccessFileAppender.java:98)
> 2015-10-27-23:00:00   at 
> org.apache.logging.log4j.core.config.AppenderControl.tryCallAppender(AppenderControl.java:152)
> 2015-10-27-23:00:00   at 
> org.apache.logging.log4j.core.config.AppenderControl.callAppender0(AppenderControl.java:125)
> 2015-10-27-23:00:00   at 
> org.apache.logging.log4j.core.config.AppenderControl.callAppenderPreventRecursion(AppenderControl.java:116)
> 2015-10-27-23:00:00   at 
> org.apache.logging.log4j.core.config.AppenderControl.callAppender(AppenderControl.java:84)
> 2015-10-27-23:00:00   at 
> org.apache.logging.log4j.core.config.LoggerConfig.callAppenders(LoggerConfig.java:390)
> 2015-10-27-23:00:00   at 
> org.apache.logging.log4j.core.config.LoggerConfig.processLogEvent(LoggerConfig.java:378)
> 2015-10-27-23:00:00   at 
> org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:362)
> 2015-10-27-23:00:00   at 
> org.apache.logging.log4j.core.config.LoggerConfig.logParent(LoggerConfig.java:384)
> 2015-10-27-23:00:00   at 
> org.apache.logging.log4j.core.config.LoggerConfig.processLogEvent(LoggerConfig.java:379)
> 2015-10-27-23:00:00   at 
> org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:362)
> 2015-10-27-23:00:00   at 
> org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:352)
> 2015-10-27-23:00:00   at 
> org.apache.logging.log4j.core.config.AwaitCompletionReliabilityStrategy.log(AwaitCompletionReliabilityStrategy.java:63)
> 2015-10-27-23:00:00   at 
> org.apache.logging.log4j.core.Logger.logMessage(Logger.java:143)
> 2015-10-27-23:00:00   at 
> org.apache.logging.log4j.spi.AbstractLogger.logMessage(AbstractLogger.java:1011)
> 2015-10-27-23:00:00   at 
> org.apache.logging.log4j.spi.AbstractLogger.logIfEnabled(AbstractLogger.java:988)
> 2015-10-27-23:00:00   at 
> org.apache.logging.slf4j.Log4jLogger.error(Log4jLogger.java:318)
> 2015-10-27-23:00:00   at 
> com.nextbit.syncserver.common.EventScribe$Scribe.run(EventScribe.java:142)
> 2015-10-27-23:00:00 Caused by: java.io.IOException: Stream Closed
> 2015-10-27-23:00:00   at java.io.RandomAccessFile.writeBytes(Native Method)
> 2015-10-27-23:00:00   at 
> java.io.RandomAccessFile.write(RandomAccessFile.java:525)
> 2015-10-27-23:00:00   at 
> org.apache.logging.log4j.core.appender.rolling.RollingRandomAccessFileManager.flush(RollingRandomAccessFileManager.java:129)
> 2015-10-27-23:00:00   ... 21 more
> {code}
> Here's the respective yaml configuration:
> {code}
> configuration:
>   monitorInterval: 60
>   status: WARN
>   name: Production Configuration
>   packages: com.our.packages
>   appenders:
>     appender:
>       -
>         type: Console
>         name: CONSOLE
>         PatternLayout: { pattern: '%d{yyyy-MMM-dd-HH:mm:ss.SSS} 
> [%p|%c{1}|%t|%X{rid}] %h: %m %n' }
>       -
>         type: RollingRandomAccessFile
>         name: AppLog
>         fileName: logs/server.log
>         filePattern: 'logs/server.log.%d{yyyy-MM-dd-HH}.gz'
>         append: true
>         PatternLayout: { pattern: '%d{yyyy-MMM-dd-HH:mm:ss.SSS} 
> [%p|%c{1}|%t|%X{rid}] %h: %m %n' }
>         TimeBasedTriggeringPolicy: { modulate: true }
>         DefaultRolloverStrategy: { max: 240 }
>   loggers:
>       - { name: com.amazonaws, level: warn }
>       - { name: org.hibernate, level: warn }
>     root:
>       level: info
>       AppenderRef: { ref: AppLog }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org

Reply via email to