Issue

A SegmentNotFoundException is observed in the log files. Restarting AEM makes the error go away for one day (or longer).

For example:

29.09.2017 05:40:27.031 *ERROR* [10.40.228.155 [1506663627021] GET /services/createvaultpackage HTTP/1.1] org.apache.jackrabbit.oak.segment.SegmentNotFoundExceptionListener Segment not found: 6c3c7910-6501-4c0a-af5d-6972006c6145. SegmentId age=654602216ms,segment-generation=17
org.apache.jackrabbit.oak.segment.SegmentNotFoundException: Segment 6c3c7910-6501-4c0a-af5d-6972006c6145 not found
at org.apache.jackrabbit.oak.segment.file.FileStore$8.call(FileStore.java:602)
...
at org.apache.jackrabbit.oak.plugins.nodetype.ReadOnlyNodeTypeManager.internalGetNodeType(ReadOnlyNodeTypeManager.java:409)
at org.apache.jackrabbit.oak.plugins.nodetype.ReadOnlyNodeTypeManager.getNodeType(ReadOnlyNodeTypeManager.java:147)
at org.apache.jackrabbit.vault.packaging.impl.JcrPackageManagerImpl.initNodeTypes(JcrPackageManagerImpl.java:737)
at org.apache.jackrabbit.vault.packaging.impl.JcrPackageManagerImpl.(JcrPackageManagerImpl.java:109)
at org.apache.jackrabbit.vault.packaging.PackagingService.getPackageManager(PackagingService.java:49)
at customcode.VaultPackageFromSearchServlet.doGet(VaultPackageFromSearchServlet.java:172)

Environment

AEM 6.3 and later versions with Online Compaction enabled

Cause

It can be caused due to long running JCR sessions along with online compaction.

Resolution

Avoid keeping JCR sessions open for a long time.  To resolve the issue:

  1. Close the session and open a new one when required.
  2. Or periodically call session.refresh(true).

See this article for more details on the topic of long running sessions being an anti-pattern in AEM 6.x.

이 작업에는 Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License의 라이센스가 부여되었습니다.  Twitter™ 및 Facebook 게시물은 Creative Commons 약관을 적용받지 않습니다.

법적 고지 사항   |   온라인 개인 정보 보호 정책