Expand my Community achievements bar.

SOLVED

AEM 6.3 offline Tar compaction error under Windows

Avatar

Level 7

I am doing an offline Tar compaction on AEM 6.3 on Windows using oak-run v1.6.6. The commands are bing run in an administrative command window and AEM has been sucessfully shut down (ie no Java processes are running)

I am seeing the following error:

10:35:14.202 [main] WARN  o.a.j.oak.segment.file.FileReaper - Unable to remove file C:\Adobe\aem6.3\.\crx-quickstart\repository\segmentstore\data00016a.tar

java.nio.file.FileSystemException: C:\Adobe\aem6.3\.\crx-quickstart\repository\segmentstore\data00016a.tar: The process cannot access the file because it is being used by another process.

    at sun.nio.fs.WindowsException.translateToIOException(Unknown Source) ~[na:1.8.0_161]

    at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source) ~[na:1.8.0_161]

    at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source) ~[na:1.8.0_161]

    at sun.nio.fs.WindowsFileSystemProvider.implDelete(Unknown Source) ~[na:1.8.0_161]

    at sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(Unknown Source) ~[na:1.8.0_161]

    at java.nio.file.Files.deleteIfExists(Unknown Source) ~[na:1.8.0_161]

    at org.apache.jackrabbit.oak.segment.file.FileReaper.reap(FileReaper.java:73) ~[oak-run-1.6.6.jar:1.6.6]

    at org.apache.jackrabbit.oak.segment.file.FileStore.close(FileStore.java:496) [oak-run-1.6.6.jar:1.6.6]

    at org.apache.jackrabbit.oak.segment.tool.Compact.compact(Compact.java:138) [oak-run-1.6.6.jar:1.6.6]

    at org.apache.jackrabbit.oak.segment.tool.Compact.run(Compact.java:112) [oak-run-1.6.6.jar:1.6.6]

    at org.apache.jackrabbit.oak.run.SegmentTarUtils.compact(SegmentTarUtils.java:206) [oak-run-1.6.6.jar:1.6.6]

    at org.apache.jackrabbit.oak.run.CompactCommand.execute(CompactCommand.java:92) [oak-run-1.6.6.jar:1.6.6]

    at org.apache.jackrabbit.oak.run.Mode.execute(Mode.java:65) [oak-run-1.6.6.jar:1.6.6]

    at org.apache.jackrabbit.oak.run.Main.main(Main.java:49) [oak-run-1.6.6.jar:1.6.6]

I am not sure why it is failing to delete these files. I have tested it on Windows 10 and Windows Server 2012 R2 - same thing happens

1 Accepted Solution

Avatar

Correct answer by
Level 7

Found the answer - in Windows, you have to specify:

-Dsun.arch.data.model=32

e.g.

java -jar -Dsun.arch.data.model=32 oak-run.jar compact install-folder/crx-quickstart/repository/segmentstore

Revision Cleanup

Re: Segment Store GC failing on Windows

View solution in original post

4 Replies

Avatar

Correct answer by
Level 7

Found the answer - in Windows, you have to specify:

-Dsun.arch.data.model=32

e.g.

java -jar -Dsun.arch.data.model=32 oak-run.jar compact install-folder/crx-quickstart/repository/segmentstore

Revision Cleanup

Re: Segment Store GC failing on Windows

Avatar

Level 2

Curious why you're running offline compaction with AEM 6.3.  Was the online compaction now available with AEM 6.3 unable to keep up with needs of your environment or did you disable online compaction for some reason?

Thanks

Ned

Avatar

Level 7

To be honest, I haven't investigated 6.3 to the extent of the other releases. From 6.0 through to all releases of 6.2 it was a major issue and required offline compactions at regular intervals to keep the size down. I guess its habit now as we were promised for 3+ major releases and various service packs it was fixed when in fact it was very much still broken and kept consuming space until the system fell over.

Avatar

Level 2

Our online compaction was failing since we migrated from 6.1 to 6.3 and I cannot figure out what causes it.

One error showing not enough memory to proceed the "Revision Clean up" daily scheduled tasks. Even I increased the memory before running the start.bat again just to fulfill the requirements of the task.


So, after running our offline compaction script and added the additional argument, it clears out the failing daily maintenance task and I am able to run my daily maintenance tasks now.