Error: "class java.lang.NullPointerException" when viewing or trying to delete a virtual service on a tenant edge gateway in VMware Cloud Director
search cancel

Error: "class java.lang.NullPointerException" when viewing or trying to delete a virtual service on a tenant edge gateway in VMware Cloud Director

book

Article ID: 422880

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

  • From the VMware Cloud Director(VCD) tenant portal, viewing or trying to delete the gateway loadbalancer virtual services show the following error: 

    [########-####-####-####-############]class java.lang.NullPointerException.

  • From the list of all virtual services on that edge, the health of the affected virtual service is in an 'Unknown' or 'Critical' state.
  • The status on the affected virtual service shows 'Busy'
  • There are no actively running tasks seen from the UI.
  • Deleting the virtual service via API also fails with reference to the object being busy.

Environment

VMware Cloud Director 10.6.x.x

Cause

  • This issue is caused when the backing virtual service was directly deleted from NSX.
  • The object being busy with another operation also left a hung task preventing further operations.

Resolution

To resolve the issue you can use the below steps :

  1. Cancel the task as per the steps in Running Tasks cannot be stopped from the Cloud Director Portal 
    For this specific customer, the jobs table showed the task as failed. The task table had it as 'Pending' and last_jobs as '0'(0 means queued status)
  2. Delete the virtual service via API : Delete Virtual Service 
    To establish an API connection, refer How to establish an API connection VMware Cloud Director