If you are installing a service pack (SP) on top of CQ5.5 you will see a dialog recommending to restart the instance after you have run the SP installation:
Do not restart the instance at this point, as the contents of the service pack are still being extracted and installed in the background. Restarting at this point could result in unknown problems, and you may have to repeat the SP installation.
You can monitor the log output in error.log and wait until the log no longer has new “BundleEvent STARTED” entries, before restarting the instance. This usually takes 2 – 5 minutes depending on server specifications.
Monitoring log output may not be a good solution for large enterprise organisations which may have many CQ instances to update, and may need to use some kind of automated install script or process documentation. In this case, you can either add a pause to the installation documentation (e.g. 15 or 30 minutes), or use a script to check for installation completion as described under 2 below.
1. Monitor the log output to figure out when to restart
The release notes for SP2.1 do contain instructions relating to this process (http://dev.day.com/docs/en/cq/current/release_notes_service_pack_2.html):
Quickstart Install Process
- Login to Package Share and download SP2 package: cq-service-pack-5.5.2.zip
- Back in Package Manager – Install package
- After the package install is done – the PackageManager tells you to restart. DO NOT RESTART. The actual install of the package only starts now in background, given that the packages have been placed in /install folders. The best way to follow the process of the install is to tail the error.log
The background install starts with “com.day.jcr.vault.packaging.impl.ZipVaultPackage Extracting day/cq550/update:cq-update-pkg:5.5.8” and stops with bundles been restarted – best seen by “BundleEvent STARTED” log entries.
- After the error.log goes quiet with “BundleEvent STARTED” messages
- Restart the instance
- The Welcome Screen should now show the updated Version String: Adobe CQ, Version 220.127.116.1120220 Service Pack 2
2. Use a script to automatically check for installation completion
You can use the script below which polls the server to check when the SP contents have been extracted, and then waits another few minutes for the relevant bundles to be started. You can use the script on its’ own, or you could integrate it into existing scripts which you use to automatically install the CQ servicepack.
1. use a script similar to the following (designer for CQ5.5 SP2.1, you may need to adjust the cq-update-pkg version for other service packs)
until [ $res -eq 0 ]
curl -u admin:admin -D- http://<cq_server_hostname>/etc/packages/day/cq550/update/cq-update-pkg-5.5.10.zip/jcr:content/vlt:definition/lastUnpacked.json 2>/dev/null | head -1 | grep -q “HTTP/1.1 200”
if [ $((count++ % 10)) -eq 0 ]
echo “Waiting for service pack installation to finish…”
echo “Service pack installation complete. You can restart the instance now.”
2. start the script in a terminal
3. install SP2.1
4. check the script output and await the completion message
5. restart the instance