logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ravi Gairola (JIRA)" <j...@apache.org>
Subject [jira] [Created] (LOG4J2-1182) RandomAccessFile IOException: Stream Closed is back
Date Wed, 28 Oct 2015 18:39:27 GMT
Ravi Gairola created LOG4J2-1182:
------------------------------------

             Summary: 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


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-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Mime
View raw message