You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by laredotornado <la...@gmail.com> on 2009/01/02 16:25:50 UTC

ERROR Failed to flush writer, java.io.InterruptedIOException

Hi,

I'm running Java 1.5 on Weblogic 9.2.2 (Solaris 9) and using log4j 1.2.15. 
During the execution of my program, I'm getting this error ...

log4j:ERROR Failed to flush writer,
java.io.InterruptedIOException
        at java.io.FileOutputStream.writeBytes(Native Method)
        at java.io.FileOutputStream.write(FileOutputStream.java:260)
        at
sun.nio.cs.StreamEncoder$CharsetSE.writeBytes(StreamEncoder.java:336)
        at
sun.nio.cs.StreamEncoder$CharsetSE.implFlushBuffer(StreamEncoder.java:404)
        at
sun.nio.cs.StreamEncoder$CharsetSE.implFlush(StreamEncoder.java:408)
        at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:152)
        at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:213)
        at org.apache.log4j.helpers.QuietWriter.flush(QuietWriter.java:57)
        at
org.apache.log4j.WriterAppender.subAppend(WriterAppender.java:315)
        at
org.apache.log4j.DailyRollingFileAppender.subAppend(DailyRollingFileAppender.java:358)
        at org.apache.log4j.WriterAppender.append(WriterAppender.java:159)
        at
org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:230)
        at
org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:65)
        at org.apache.log4j.Category.callAppenders(Category.java:203)
        at org.apache.log4j.Category.forcedLog(Category.java:388)
        at org.apache.log4j.Category.debug(Category.java:257)
        at
com.myco.safariview.cedarpoint.connector.CPThreadedLogin.run(CPThreadedLogin.java:119)

It is happening on this line:

log.debug(this.cpSwitchAttributes.getCLLI() + " exiting id=" + createTime);

Per a suggestion I read online, I checked to see if I have enough disk
space, and it appears I do ...


orma3% df /
/                  (/dev/vx/dsk/bootdg/rootvol): 1587550 blocks   253027
files


Any other ideas on how to troubleshoot this problem?  Thanks, - Dave

-- 
View this message in context: http://www.nabble.com/ERROR-Failed-to-flush-writer%2C-java.io.InterruptedIOException-tp21252656p21252656.html
Sent from the Log4j - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: ERROR Failed to flush writer, java.io.InterruptedIOException

Posted by Curt Arnold <ca...@apache.org>.
On Jan 2, 2009, at 12:10 PM, Jacob Kjome wrote:

> Does this happen ever single time your log line is called or just  
> sporadically?
> You point out that you have enough disk space, but are you running  
> Java with a
> user having write permissions?  Is the log file actually being  
> created?
>
> Jake
>
> On 1/2/2009 9:25 AM, laredotornado wrote:
>> Hi,
>>
>> I'm running Java 1.5 on Weblogic 9.2.2 (Solaris 9) and using log4j  
>> 1.2.15.
>> During the execution of my program, I'm getting this error ...
>>
>> log4j:ERROR Failed to flush writer,
>> java.io.InterruptedIOException
>>
>>        at java.io.FileOutputStream.writeBytes(Native Method)
>>        at java.io.FileOutputStream.write(FileOutputStream.java:260)
>>        at
>> sun.nio.cs.StreamEncoder$CharsetSE.writeBytes(StreamEncoder.java:336)
>>        at
>> sun.nio.cs.StreamEncoder 
>> $CharsetSE.implFlushBuffer(StreamEncoder.java:404)
>>        at
>> sun.nio.cs.StreamEncoder$CharsetSE.implFlush(StreamEncoder.java:408)
>>        at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:152)
>>        at java.io.OutputStreamWriter.flush(OutputStreamWriter.java: 
>> 213)
>>        at  
>> org.apache.log4j.helpers.QuietWriter.flush(QuietWriter.java:57)
>>        at
>> org.apache.log4j.WriterAppender.subAppend(WriterAppender.java:315)
>>        at
>> org 
>> .apache 
>> .log4j 
>> .DailyRollingFileAppender.subAppend(DailyRollingFileAppender.java: 
>> 358)
>>        at  
>> org.apache.log4j.WriterAppender.append(WriterAppender.java:159)
>>        at
>> org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:230)
>>        at
>> org 
>> .apache 
>> .log4j 
>> .helpers 
>> .AppenderAttachableImpl 
>> .appendLoopOnAppenders(AppenderAttachableImpl.java:65)
>>        at org.apache.log4j.Category.callAppenders(Category.java:203)
>>        at org.apache.log4j.Category.forcedLog(Category.java:388)
>>        at org.apache.log4j.Category.debug(Category.java:257)
>>        at
>> com 
>> .myco 
>> .safariview 
>> .cedarpoint.connector.CPThreadedLogin.run(CPThreadedLogin.java:119)
>>
>> It is happening on this line:
>>
>> log.debug(this.cpSwitchAttributes.getCLLI() + " exiting id=" +  
>> createTime);
>>
>> Per a suggestion I read online, I checked to see if I have enough  
>> disk
>> space, and it appears I do ...
>>
>>
>> orma3% df /
>> /                  (/dev/vx/dsk/bootdg/rootvol): 1587550 blocks    
>> 253027
>> files
>>
>>
>> Any other ideas on how to troubleshoot this problem?  Thanks, - Dave
>>
>


I think that is likely an issue with Solaris JRE 1.5 implementation of  
StreamEncoder.  Update the JVM to the latest available for that  
version of Solaris.

There were changes to log4j that addressed catching  
InterruptedIOExceptions.  It would not fix the problem, but running  
the SVN HEAD might make it less problematic.

For similar reported issues see:

https://issues.apache.org/bugzilla/show_bug.cgi?id=42213
https://issues.apache.org/bugzilla/show_bug.cgi?id=41214#c22


https://issues.apache.org/bugzilla/show_bug.cgi?id=41214#c22

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: ERROR Failed to flush writer, java.io.InterruptedIOException

Posted by Jacob Kjome <ho...@visi.com>.
Does this happen ever single time your log line is called or just sporadically?
You point out that you have enough disk space, but are you running Java with a
user having write permissions?  Is the log file actually being created?

Jake

On 1/2/2009 9:25 AM, laredotornado wrote:
> Hi,
> 
> I'm running Java 1.5 on Weblogic 9.2.2 (Solaris 9) and using log4j 1.2.15. 
> During the execution of my program, I'm getting this error ...
> 
> log4j:ERROR Failed to flush writer,
> java.io.InterruptedIOException
>         at java.io.FileOutputStream.writeBytes(Native Method)
>         at java.io.FileOutputStream.write(FileOutputStream.java:260)
>         at
> sun.nio.cs.StreamEncoder$CharsetSE.writeBytes(StreamEncoder.java:336)
>         at
> sun.nio.cs.StreamEncoder$CharsetSE.implFlushBuffer(StreamEncoder.java:404)
>         at
> sun.nio.cs.StreamEncoder$CharsetSE.implFlush(StreamEncoder.java:408)
>         at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:152)
>         at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:213)
>         at org.apache.log4j.helpers.QuietWriter.flush(QuietWriter.java:57)
>         at
> org.apache.log4j.WriterAppender.subAppend(WriterAppender.java:315)
>         at
> org.apache.log4j.DailyRollingFileAppender.subAppend(DailyRollingFileAppender.java:358)
>         at org.apache.log4j.WriterAppender.append(WriterAppender.java:159)
>         at
> org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:230)
>         at
> org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:65)
>         at org.apache.log4j.Category.callAppenders(Category.java:203)
>         at org.apache.log4j.Category.forcedLog(Category.java:388)
>         at org.apache.log4j.Category.debug(Category.java:257)
>         at
> com.myco.safariview.cedarpoint.connector.CPThreadedLogin.run(CPThreadedLogin.java:119)
> 
> It is happening on this line:
> 
> log.debug(this.cpSwitchAttributes.getCLLI() + " exiting id=" + createTime);
> 
> Per a suggestion I read online, I checked to see if I have enough disk
> space, and it appears I do ...
> 
> 
> orma3% df /
> /                  (/dev/vx/dsk/bootdg/rootvol): 1587550 blocks   253027
> files
> 
> 
> Any other ideas on how to troubleshoot this problem?  Thanks, - Dave
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org