The file handler stops any logging output after changing "encoding" attribute in JBoss EAP 7

Solution Verified - Updated -

Issue

When setting encoding attribute on the file handler (file-handler, periodic-rotating-file-handler, size-rotating-file-handler, and periodic-size-rotating-file-handler) in CLI on JBoss EAP 7, LogManager throws the following error message in the console log and stops any logging output to the file handler:

LogManager error of type FLUSH_FAILURE: Error on flush
java.io.IOException: Stream Closed
    at java.io.FileOutputStream.writeBytes(Native Method)
    at java.io.FileOutputStream.write(FileOutputStream.java:326)
    at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
    at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
    at org.jboss.logmanager.handlers.UninterruptibleOutputStream.flush(UninterruptibleOutputStream.java:110)
    at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:297)
    at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:141)
    at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:229)
    at java.io.BufferedWriter.flush(BufferedWriter.java:254)
    at org.jboss.logmanager.handlers.WriterHandler.safeFlush(WriterHandler.java:170)
    at org.jboss.logmanager.handlers.WriterHandler.flush(WriterHandler.java:139)
    at org.jboss.logmanager.ExtHandler.doPublish(ExtHandler.java:105)
    at org.jboss.logmanager.handlers.WriterHandler.doPublish(WriterHandler.java:67)
    at org.jboss.logmanager.ExtHandler.publish(ExtHandler.java:77)
    at org.jboss.logmanager.LoggerNode.publish(LoggerNode.java:333)
    at org.jboss.logmanager.LoggerNode.publish(LoggerNode.java:341)
    at org.jboss.logmanager.LoggerNode.publish(LoggerNode.java:341)
    at org.jboss.logmanager.LoggerNode.publish(LoggerNode.java:341)
    at org.jboss.logmanager.LoggerNode.publish(LoggerNode.java:341)
    at org.jboss.logmanager.LoggerNode.publish(LoggerNode.java:341)
    at org.jboss.logmanager.Logger.logRaw(Logger.java:850)
    at org.jboss.logmanager.Logger.log(Logger.java:802)
    at org.jboss.logging.JBossLogManagerLogger.doLogf(JBossLogManagerLogger.java:53)
    at org.jboss.logging.Logger.logf(Logger.java:2398)
    at org.jboss.as.mail.extension.MailLogger_$logger.unboundMailSession(MailLogger_$logger.java:42)
    at org.jboss.as.mail.extension.MailSessionAdd$1.handleEvent(MailSessionAdd.java:150)
    at org.jboss.msc.service.ServiceControllerImpl$LifecycleListenerTask.execute(ServiceControllerImpl.java:1857)
    at org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1556)
    at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
    at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)
    at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)
    at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1364)
    at java.lang.Thread.run(Thread.java:748)

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 7.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content