A regional Harbor installation in VCF Automation (VCFA) reports the error runtime error: invalid memory address or nil pointer dereference. This can surface in two related scenarios:
- While explicitly attempting to uninstall or remove a regional Harbor installation.
- During normal operation, as part of the ongoing reconciliation/desired-state enforcement process, causing the error to recur repeatedly even without any uninstall action being taken.
One or more of the following symptoms may be observed (not all symptoms need to be present):
- The uninstall/removal task fails with the error: runtime error: invalid memory address or nil pointer dereference.
- The same nil pointer dereference error recurs periodically in logs/tasks even when no uninstall was initiated, as the reconciler repeatedly attempts to enforce the desired state against the region.
- Service Manager reports communication errors related to the region.
- Notifications appear on the Harbor card in the UI indicating problems with the region or its associated resources.
This typically occurs when a region has been removed from VCFA directly while it was still part of an active Harbor installation, instead of first descoping the region from Harbor.
VCF Automation 9.1.x
Forcefully removing a region from VCFA while it remains scoped to a Harbor installation is not a supported operation. Regions must be descoped from Harbor before they are removed from VCFA.
When a region is removed prematurely, Harbor and Service Manager are left referencing resources and objects that no longer exist. This causes the nil pointer dereference error to occur not only during an explicit uninstall attempt, but also on an ongoing basis: Harbor's reconciliation/desired-state enforcement loop repeatedly attempts to evaluate or act on the now-missing region resources, hitting the same nil pointer dereference each cycle. This is accompanied by the associated Service Manager communication errors and Harbor card notifications.
These behaviors are expected and function as intended: they indicate that resources belonging to an active VCF Service (Supervisor Service) were removed out of order, rather than being a product defect.
The recurring reconciliation errors will continue until the region is properly descoped from Harbor:
1. Log in to VCFA / Service Manager.
2. Descope the Harbor service from the affected region. This automatically triggers cleanup of the associated resources/objects and allows reconciliation to complete without further errors.
3. Retry the Harbor uninstall/region removal operation, if applicable.
Prevention: Always descope a region from Harbor before removing it from VCFA to avoid this issue.