AEM 6.1 not starting due to Lucene errors | Community
Skip to main content
New Participant
October 16, 2015
Solved

AEM 6.1 not starting due to Lucene errors

  • October 16, 2015
  • 18 replies
  • 7953 views

Hi,

Our AEM 6.1 is not starting.  The error.log file has the following warning and error error

 *WARN* [pool-7-thread-16] org.apache.jackrabbit.oak.plugins.index.lucene.IndexCopier Error occurred while copying file [_sf.cfs] from OakDirectory@78da42b4 lockFactory=org.apache.lucene.store.NoLockFactory@41517568 to MMapDirectory@/build2/install/cq/migratedauthor/561Upgrade/author/crx-quickstart/repository/index/e5a943cdec3000bd8ce54924fd2070ab5d1d35b9ecf530963a3583d43bf28293/1 lockFactory=NativeFSLockFactory@/build2/install/cq/migratedauthor/561Upgrade/author/crx-quickstart/repository/index/e5a943cdec3000bd8ce54924fd2070ab5d1d35b9ecf530963a3583d43bf28293/1
java.io.EOFException: reached end of stream after reading 0 bytes; 11726 bytes expected

 

*ERROR* [FelixStartLevel] org.apache.jackrabbit.oak.plugins.index.lucene.IndexTracker Could not access the Lucene index at /oak:index/lucene
java.io.EOFException: reached end of stream after reading 0 bytes; 11726 bytes expected

The error.log file did state that the Repository was started

*INFO* [FelixStartLevel] com.adobe.granite.repository.impl.CRX3RepositoryImpl Repository started.

 

However, we are not able to connect to AEM 6.1.  The logs so far have not been very verbose...

Any advice?

Thank You

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

Ok, finally, our CQ is upgraded to AEM 6.1 successfully.  A couple of gotchas 

1. Prior to upgrading to AEM 6.1, we had datastore consistency errors.  We needed to make sure that those errors are resolved.  They stemmed from -1 length cq:properties node in /var/audit and -1 length data node in CQ created versions for some dam assets.  For versioning errors due to missing data, use the version manager tool in etc to purge old versions.  For -1 cq:properties node in /var/audit, locate the path and remove the node

2. Remove all replication agents (although this might not be necessary).  

3. Clear all assigned, cancelled and unassigned jobs in /var/eventing/jobs

4. Uninstall all custom 3rd party vendor packages

5. Once the repository is migrated, do NOT update the start script and start AEM in hopes of upgrading CQ.  Please use "java -jar aem-quickstart-6.1.0.jar -r <proper runmodes> -Doak.mongo.uri=mongodb://<host>:<port> -Doak.mongo.db=<db name>"

6. Once AEM is started and login is possible, stop AEM, update the start script (pay attention to the run modes near the end of the provided start script), start AEM

Thank You ALL for your wonderful help! 

18 replies

Voon_SiongAuthorAccepted solution
New Participant
October 17, 2015

Ok, finally, our CQ is upgraded to AEM 6.1 successfully.  A couple of gotchas 

1. Prior to upgrading to AEM 6.1, we had datastore consistency errors.  We needed to make sure that those errors are resolved.  They stemmed from -1 length cq:properties node in /var/audit and -1 length data node in CQ created versions for some dam assets.  For versioning errors due to missing data, use the version manager tool in etc to purge old versions.  For -1 cq:properties node in /var/audit, locate the path and remove the node

2. Remove all replication agents (although this might not be necessary).  

3. Clear all assigned, cancelled and unassigned jobs in /var/eventing/jobs

4. Uninstall all custom 3rd party vendor packages

5. Once the repository is migrated, do NOT update the start script and start AEM in hopes of upgrading CQ.  Please use "java -jar aem-quickstart-6.1.0.jar -r <proper runmodes> -Doak.mongo.uri=mongodb://<host>:<port> -Doak.mongo.db=<db name>"

6. Once AEM is started and login is possible, stop AEM, update the start script (pay attention to the run modes near the end of the provided start script), start AEM

Thank You ALL for your wonderful help! 

Kunal_Gaba_
New Participant
October 16, 2015

I think you need to rebuild the OAK indexes as it seems they are corrupt. 

Employee
October 16, 2015

Hi,

have you already raised a daycare ticket?

Were there any changes made to the system before your restarted it? Is there enough disk space?

Regards,

Opkar

New Participant
October 16, 2015

Hi Kunal,

Do you know how we can rebuild the OAK indexes?  I have tried lookup for instructions but failed to find any...

Thank You

New Participant
October 16, 2015

Hi,

I have an existing daycare ticket, which is about missing authentication service.  With help from the forums, I managed to get pass that error by creating a blob in the datastore folder.  I kept the daycare ticket open because I wanted to know if daycare support has a better way to address the missing blob issue.

Now that the repository can be started, AEM is complaining about Lucene errors.  Disk space is not an issue.

Thank you.

Kunal_Gaba_
New Participant
October 16, 2015

You can do it by updating the reindex property to true of index definition nodes under /oak:index. Are you able to access /crx/explorer or /crx/de UIs after restart ?  

Employee
October 16, 2015

The blob will have contained data that the repository is expecting and recreating it is not ideal, were you able to get a copy of the blob file from a previous backup? You could also check another AEM instance, it may be the blob file is created by a system file, so can be copied from another instance.

Regards,

Opkar

New Participant
October 16, 2015

The pre-upgraded AEM 6.1 was based on a CQ 5.6.1 backup.  The blob does not exist in the backup used to upgrade the CQ instance.  The blob does not exist in the running CQ, from which the backup was taken.  

Thank You

New Participant
October 16, 2015

I read that you can do a reindex by adding a node to /oak:index ins crx/de, but unfortunately, I cannot get to crx/de, crx/explorer or any of the UIs...How about reindexing from the Mongo shell?  For eg, db.collection.reIndex()?

Kunal_Gaba_
New Participant
October 16, 2015

I think that will recreate the mongo collection index and not the OAK index. I am just guessing this but you can give it a try. Just rename the index folder under /crx-quickstart/repository folder and restart AEM.