Getting LogManager error of type OPEN_FAILURE: Unable to rotate log file
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 7.0.8
- Windows
Issue
-
Getting LogManager error of type OPEN_FAILURE: Unable to rotate log file:
LogManager error of type OPEN_FAILURE: Unable to rotate log file The process cannot access the file because it is being used by another process. at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:86) at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97) at sun.nio.fs.WindowsFileCopy.move(WindowsFileCopy.java:387) at sun.nio.fs.WindowsFileSystemProvider.move(WindowsFileSystemProvider.java:287) at java.nio.file.Files.move(Files.java:1395) at org.jboss.logmanager.handlers.PeriodicSizeRotatingFileHandler.rotate(PeriodicSizeRotatingFileHandler.java:251) at org.jboss.logmanager.handlers.PeriodicSizeRotatingFileHandler.preWrite(PeriodicSizeRotatingFileHandler.java:232) at org.jboss.logmanager.handlers.WriterHandler.doPublish(WriterHandler.java:60)
Resolution
Update to EAP 7.1.1
As a workaround, run the below CLI command:
/subsystem=logging/periodic-size-rotating-file-handler=PERIODIC_SIZE_ROTATING_FILE_HANDLER_NAME:write-attribute(name=file, value={relative-to=jboss.server.log.dir, path=server.log})
This should reset the file and allow the handler to start working again without having to reload the server.
Root Cause
SBR
Components
Category
Tags
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.