Stop AEM.
Issue
After upgrading an instance from 5.6.x to 6.x, AEM does not pick up the Filedatastore location properly and therefore does not start successfully. AEM reports not being able to find blobs and would not start up successfully. However, starting the instance through command line and the quickstart file starts successfully.
Environment
AEM 6.x
Cause
The RegisteredResourceList.ser file is in corrupt state, and is not allowing windows service to operate properly. On opening the RegisteredResourceList.ser, you see multiple instances of "file install". However, ideally only one instance is expected. It shows multiple configurations persistent on the repository, and hence the conflict on startup.
Resolution
-
-
Download com.adobe.granite.tools.fileinstallertool-1.0.2.jar from [1], and place it in the same folder as the AEM jar file.
-
To clear all the duplicate entries and to fix any corrupt entries, run the following command.
java -jar com.adobe.granite.tools.fileinstallertool-1.0.2.jar
-
At this point, either of the following two scenarios happen:
-
You get the following output, which confirms the successful removal of duplicate configurations. You can proceed further to Step 5.
Reading installer state from crx-quickstart/launchpad/installer/RegisteredResourceList.ser Processing installer state... - removing state for fileinstallad09f60708c0fb5aee04cdf46857bff9:/opt/AEM/6.2/Vanilla6.2/crx-quickstart/install/org.apache.jackrabbit.oak.plugins.segment.SegmentNodeStoreService.config - removing state for fileinstallad09f60708c0fb5aee04cdf46857bff9:/opt/AEM/6.2/Vanilla6.2/crx-quickstart/install/org.apache.jackrabbit.oak.plugins.blob.datastore.FileDataStore.cfg Writing installer state Done
-
The output below, which shows there was an issue reading the RegisteredResourceList.ser and therefore the tool could not open it and run against it.
Reading installer state from crx-quickstart/launchpad/installer/RegisteredResourceList.ser 124 [main] WARN org.apache.sling.installer.core.impl.PersistentResourceList - Unable to restore data, starting with empty list (org.apache.sling.installer.core.impl.RegisteredResourceImpl) java.lang.ClassNotFoundException: org.apache.sling.installer.core.impl.RegisteredResourceImpl at org.apache.sling.installer.core.impl.RegisteredResourceImpl.readObject(RegisteredResourceImpl.java:124) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1058) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1909) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1808) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1353) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:373) at org.apache.sling.installer.core.impl.EntityResourceList.readObject(EntityResourceList.java:104) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1058) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1909) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1808) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1353) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:373) at java.util.HashMap.readObject(HashMap.java:1396) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1058) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1909) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1808) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1353) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:373) at org.apache.sling.installer.core.impl.PersistentResourceList.<init>(PersistentResourceList.java:90) at com.adobe.granite.tools.FICleanup.main(FICleanup.java:196) Processing installer state... No fileinstall configuration found Done
In such a case, follow these steps:
-
Stop the AEM instance.
-
Unregister/Delete the windows service.
-
Ensure that the file on path /opt/AEM/6.2/Vanilla6.2/crx-quickstart/launchpad/config/org/apache/jackrabbit/oak/plugins/blob/datastore/Filedatastore.cfg has the appropriate content, that is the Absolute Paths. If not, delete this file.
-
Ensure that the file on path /opt/AEM/6.2/Vanilla6.2/crx-quickstart/launchpad/config/org/apache/jackrabbit/oak/plugins/segment/SegmentNodeStoreService.cfg has the appropriate content, that is the Absolute Paths. If not, delete this file.
-
Go to the /crx-quickstart/launchpad/installer directory and rename the RegisteredResourceList.ser to RegisteredResourceList.ser_old.
-
Clear out the AEM server logs.
-
Register the windows service.
-
-
-
Start AEM through the windows service.
-
It is expected that AEM now starts successfully with the appropriate configurations. To verify, check the output of [2] and see if multiple "fileinstall" paths exist.
- [1] See fileinstaller tool jar: https://files.acrobat.com/a/preview/021e8221-f546-4b0b-962f-a87a68185f11.
- [2] http://aem-host:port/system/console/osgi-installer