Resolving HTTP 500 errors on a single AEM publish instance due to OSGi bundle inconsistency

This article explains how to resolve HTTP 500 errors that occur on a single Adobe Experience Manager (AEM) publish instance when OSGi bundles fail to resolve and activate correctly following an abnormal or unclean restart.

Description description

Environment

Adobe Experience Manager (AEM) Managed Services multi-instance Publish deployment (all supported versions)

Issue/Symptoms

  • One Publish instance returns a high number of HTTP 500 errors across multiple application URLs.
  • Other Publish instances continue to serve traffic normally.
  • Application logs show repeated HTL/Sightly compilation failures because Java classes can’t be resolved.
  • OSGi framework logs report bundle-resolution errors and unresolved dependencies for required application bundles.

Cause

An abnormal or unclean restart leaves the OSGi framework on the affected Publish instance in an inconsistent state. Required application bundles fail to resolve and activate. As a result, classes needed for HTL compilation are unavailable, and requests to affected application URLs return HTTP 500 errors.

Resolution resolution

Follow the steps below to resolve the issue.

  1. Remove the affected publish instance from the load balancer rotation to prevent further customer impact.

  2. Restart or replace the affected publish instance using a clean, controlled process.

  3. After the instance is restarted or replaced, verify that all required OSGi bundles are resolved and active:

    • Access the AEM System Console (usually at /system/console/bundles) and check that all bundles are in the Active state.

    • Confirm that application pages render successfully without compilation errors.

    • Monitor the error logs for any further bundle resolution or HTL compilation errors.

  4. As a preventive measure, implement a readiness check after every planned or unplanned restart to ensure all bundles are active before returning the instance to service.

recommendation-more-help
experience-cloud-kcs-help-kbarticles