AEM6.2 Instance throwing error after restart, and won't start fully | Community
Skip to main content
September 27, 2016

AEM6.2 Instance throwing error after restart, and won't start fully

  • September 27, 2016
  • 2 replies
  • 10165 views

When trying to start our new AEM 6.2 Instance we are seeing the attached exception.  It appears to be related our link checker settings.  Attaching those also.

We are not able to reproduce this in a local version, it's only happening on our prod server.

This instance is freshly created and we ran the jcr to oak migration tool to get our content in.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

kautuk_sahni
Community Manager
Community Manager
September 28, 2016

Hi 

It seems that there is some inconsistency in these segment store.

Try 1:-

Reverting the Oak repository to fix "SegmentNotFoundException"

The check run-mode [2] of oak-run can be used to determine the last known good revision of a segment store, which can subequently be restored manually. This utility can be used to revert a corrupt segment store to its latest good revision change into Oak's working directory (the one containing the crx-quickstart folder) and backup all files in ./crx-quickstart/repository/segmentstore/.

1. Run the consistency check,
java -jar oak-run-*.jar check -d1 --bin=-1 -p
crx-quickstart/repository/segmentstore/


it will search backwards through the revisions until it finds a consistent
one:
14:00:30.783 [main] INFO  o.a.j.o.p.s.f.t.ConsistencyChecker - Found
latest good revision afdb922d-ba53-4a1b-aa1b-1cb044b535cf:234880


2. Revert the repository to this revision by editing
./crx-quickstart/repository/segmentstore/journal.log and deleting all
lines after the line containing the latest good revision.

3. Remove all ./crx-quickstart/repository/segmentstore/*.bak files.
4. Run checkpoint clean-up to remove orphaned checkpoints:
java -jar oak-run-*.jar checkpoints
./crx-quickstart/repository/segmentstore rm-unreferenced

5. Finally compact the repository:
java -jar oak-run-*.jar compact ./crx-quickstart/repository/segmentstore/

[2] 
https://github.com/apache/jackrabbit-oak/blob/trunk/oak-run/README.md#check

 

Answer Source :- https://mail-archives.apache.org/mod_mbox/jackrabbit-users/201511.mbox/%3CD26B66B4.A6602%25akhoury@adobe.com%3Emod_mbox/jackrabbit-users/201511.mbox/%3CD26B66B4.A6602%25akhoury@adobe.com%3E

Kautuk Sahni
Level 2
December 13, 2016

Hello,

I have tried the above steps but getting the following error. Please help.

org.apache.jackrabbit.oak.segment.file.InvalidFileStoreVersionException: Using oak-segment-tar, but oak-segment should be used

        at org.apache.jackrabbit.oak.segment.file.AbstractFileStore.checkManifest(AbstractFileStore.java:153)
        at org.apache.jackrabbit.oak.segment.file.ReadOnlyFileStore.<init>(ReadOnlyFileStore.java:79)
        at org.apache.jackrabbit.oak.segment.file.FileStoreBuilder.buildReadOnly(FileStoreBuilder.java:331)
        at org.apache.jackrabbit.oak.segment.file.tooling.ConsistencyChecker.<init>(ConsistencyChecker.java:122)
        at org.apache.jackrabbit.oak.segment.file.tooling.ConsistencyChecker.checkConsistency(ConsistencyChecker.java:83)
        at org.apache.jackrabbit.oak.segment.tool.Check.run(Check.java:159)

Level 2
January 31, 2017

That means that your oak version in aem does not match the oak-run you're using to find the last revision.

In my case I had to use the 1.2.18.

full instructions.

 

1. Download oak-run jar file from here http://repo1.maven.org/maven2/org/apache/jackrabbit/oak-run/

   * AEM6.1 - Download the oak-run 1.2.x version matching what is installed (check via /system/console/bundles UI)

 

2. Stop AEM/Oak

 

3. Run this command:

java -jar oak-run-*.jar check -d1 --bin=-1 -p crx-quickstart/repository/segmentstore/

it which will search backwards through the revisions until it finds a consistent one:

14:00:30.783 [main] INFO  o.a.j.o.p.s.f.t.ConsistencyChecker - Found latest good revision afdb922d-ba53-4a1b-aa1b-1cb044b535cf:234880

 

4. Revert the repository to this revision by editing ./crx-quickstart/repository/segmentstore/journal.log. Delete all lines after the line containing the latest good revision.

If you would like to find out what date and time you are reverting the repository to then run this command in the segmentstore folder (replace afdb922d-ba53-4a1b-aa1b-1cb044b535cf with the latest good revision in your journal.log):

find . -type f -name "data*.tar" -exec sh -c "tar -tvf {} |grep afdb922d-ba53-4a1b-aa1b-1cb044b535cf" \; -print

The output would show you an approximate date and time of that revision.

 

5. Remove all ./crx-quickstart/repository/segmentstore/*.bak files.

 

6. Run checkpoint clean-up to remove orphaned checkpoints:

java -jar oak-run-*.jar checkpoints ./crx-quickstart/repository/segmentstore rm-unreferenced

 

7. Finally compact the repository:

java -jar oak-run-*.jar compact ./crx-quickstart/repository/segmentstore/

 

 

Best regards,

Tiago

ravi_p_pandey
May 29, 2017
While running consistency check my command execution process stuck at 'o.a.j.o.p.s.f.t.ConsistencyChecker - Checking...'. Any suggestions how I can complete the execution of check command. Also, what we need to do if 'no good revision found' result comes?
September 6, 2018

Hi Ravi,

Did you solve the problem?, I am also getting no good revision found. I am taking the repository backup from staging and trying to mount to dev environment to save the content migration.

OAK jar is - oak-run-1.4.6.jar

Thanks,

Umesh