CQ5.5: When to restart CQ after installing a service pack


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

  1. Login to Package Share and download SP2 package: cq-service-pack-5.5.2.zip
  2. Back in Package Manager – Install package
  3. 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.
  4. After the error.log goes quiet with “BundleEvent STARTED” messages
  5. Restart the instance
  6. The Welcome Screen should now show the updated Version String: Adobe CQ, Version 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…”
    sleep 1
sleep 300
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

reference: (39810/CQ5-22648)

VN:F [1.9.22_1171]
Was this helpful? Please rate the content.
Rating: 8.4/10 (9 votes cast)
CQ5.5: When to restart CQ after installing a service pack, 8.4 out of 10 based on 9 ratings

One Response to CQ5.5: When to restart CQ after installing a service pack

  1. Pingback: Install Script