Return-Path: X-Original-To: apmail-logging-log4j-dev-archive@www.apache.org Delivered-To: apmail-logging-log4j-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 579AA11ED8 for ; Wed, 21 May 2014 02:33:38 +0000 (UTC) Received: (qmail 22602 invoked by uid 500); 21 May 2014 02:33:38 -0000 Delivered-To: apmail-logging-log4j-dev-archive@logging.apache.org Received: (qmail 22542 invoked by uid 500); 21 May 2014 02:33:38 -0000 Mailing-List: contact log4j-dev-help@logging.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Log4J Developers List" Reply-To: "Log4J Developers List" Delivered-To: mailing list log4j-dev@logging.apache.org Received: (qmail 22533 invoked by uid 99); 21 May 2014 02:33:38 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 May 2014 02:33:38 +0000 Date: Wed, 21 May 2014 02:33:38 +0000 (UTC) From: "Remko Popma (JIRA)" To: log4j-dev@logging.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (LOG4J2-636) IOException: Stream Closed RollingRandomAccessFile MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/LOG4J2-636?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14004238#comment-14004238 ] Remko Popma commented on LOG4J2-636: ------------------------------------ One explanation I can think of is that in your application one thread has shut down the logging subsystem while other threads are still logging. Is it possible that this is happening? Another explanation is that this is a problem in the rollover logic. As far as I can tell the rollover logic looks fine (closes the file and creates a new file inside a synchronized block). > IOException: Stream Closed RollingRandomAccessFile > -------------------------------------------------- > > Key: LOG4J2-636 > URL: https://issues.apache.org/jira/browse/LOG4J2-636 > Project: Log4j 2 > Issue Type: Bug > Components: Appenders > Affects Versions: 2.0-rc1 > Environment: Linux 3.2.0-4-amd64 #1 SMP Debian 3.2.54-2 x86_64 GNU/Linux > Reporter: Adrian Wilford > > After some time, RollingRandomAccessFile can no longer write logging events (have not run out of disk space). > {code} > 2014-05-13 10:05:18,284 ERROR Unable to write to stream logs/CALEEBaskets.log for appender RollingRandomAccessFile > 2014-05-13 10:05:18,284 ERROR An exception occurred processing Appender RollingRandomAccessFile org.apache.logging.log4j.core.appender.AppenderLoggingException: Error writing to RandomAccessFile logs/CALEEBaskets.log > at org.apache.logging.log4j.core.appender.rolling.RollingRandomAccessFileManager.flush(RollingRandomAccessFileManager.java:109) > at org.apache.logging.log4j.core.appender.rolling.RollingRandomAccessFileManager.write(RollingRandomAccessFileManager.java:90) > at org.apache.logging.log4j.core.appender.OutputStreamManager.write(OutputStreamManager.java:129) > at org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.append(AbstractOutputStreamAppender.java:120) > at org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender.append(RollingRandomAccessFileAppender.java:96) > at org.apache.logging.log4j.core.config.AppenderControl.callAppender(AppenderControl.java:97) > at org.apache.logging.log4j.core.config.LoggerConfig.callAppenders(LoggerConfig.java:425) > at org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:406) > at org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:367) > at org.apache.logging.log4j.core.Logger.log(Logger.java:112) > at org.apache.logging.log4j.spi.AbstractLogger.debug(AbstractLogger.java:338) > at com.corticalSystems.CALEE.algorithms.baskets.persistence.orderLogging.OrderLoggingDAL.createNewOrder(OrderLoggingDAL.java:163) > at com.corticalSystems.CALEE.algorithms.baskets.logic.ConstituentLogicThread.sendNewOrder(ConstituentLogicThread.java:1087) > at com.corticalSystems.CALEE.algorithms.baskets.logic.ConstituentLogicThread.run(ConstituentLogicThread.java:1587) > at java.lang.Thread.run(Thread.java:744) > Caused by: java.io.IOException: Stream Closed > at java.io.RandomAccessFile.writeBytes0(Native Method) > at java.io.RandomAccessFile.writeBytes(RandomAccessFile.java:520) > at java.io.RandomAccessFile.write(RandomAccessFile.java:550) > at org.apache.logging.log4j.core.appender.rolling.RollingRandomAccessFileManager.flush(RollingRandomAccessFileManager.java:106) > ... 14 more > {code} -- This message was sent by Atlassian JIRA (v6.2#6252) --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org For additional commands, e-mail: log4j-dev-help@logging.apache.org