SDDC Manager UI Fails to Load Inventory - NullPointerException Due to Stale Domain Entries
search cancel

SDDC Manager UI Fails to Load Inventory - NullPointerException Due to Stale Domain Entries

book

Article ID: 441512

calendar_today

Updated On:

Products

VMware SDDC Manager / VCF Installer

Issue/Introduction

Symptoms

Users may encounter the following issues in VCF 9.0.2 SDDC Manager:

  • SDDC Manager UI fails to load Management or Workload Domain details.
  • Errors such as "failed to load cluster details" appear in the UI.
  • Cluster deployment or deletion tasks fail midway, leaving the inventory in an inconsistent state.

Environment

  • Product: VMware Cloud Foundation (VCF) 9.0.2
  • Component: SDDC Manager

Cause

The issue is typically caused by a stale or orphaned domain entry in the SDDC Manager database that is not properly associated with a cluster. This leads to a java.lang.NullPointerException when the Resource Aggregator attempts to map elements to a null key.

Log Evidence: In /var/log/vmware/vcf/domainmanager/domainmanager.logERROR [vcf_dm] Servlet.service() for servlet [dispatcherServlet] threw exception [Request processing failed: java.lang.NullPointerException: element cannot be mapped to a null key]

Resolution

  • To resolve this issue, the stale database entries must be manually removed.

    Prerequisites

    • Take a snapshot of the SDDC Manager VM before proceeding with any database modifications.

    Steps

    1. Identify Stale Entries: Log in to the SDDC Manager database and identify orphaned domains or clusters that no longer exist in vCenter but remain in the domain or cluster tables.
      • Run the below command to connect the SDDC platform database
        psql --host=localhost -U postgres -d platform -c "SELECT id, name domain_id FROM cluster;"

        Example output:
    2. Database Cleanup: Manually delete the identified stale entries. 
      • Run the following command 
        psql --host=localhost -U postgres -d platform -c "DELETE FROM cluster WHERE id = '< id listed from the above command>';"
    3. Restart Services: Restart the SDDC Manager services to refresh the inventory
      • systemctl restart domainmanager
      • systemctl restart sddc-manager-ui-app
    4. Verify Inventory: Log back into the SDDC Manager UI and verify that the Workload Domains and Clusters are now loading correctly.
  1.