"class java.lang.NullPointerException" error returned when trying to view NSX ALB Pools
search cancel

"class java.lang.NullPointerException" error returned when trying to view NSX ALB Pools

book

Article ID: 320427

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

Symptoms:
  • In the UI when viewing the Load Balancer Pools of an Edge, you see the error message
[ UUID ] "class java.lang.NullPointerException"
  • In the browser console or /opt/vmware/vcloud-director/logs/vcloud-container-debug.log at the time of the issue, you will see the following code run before the NullPointerException
com.vmware.vcloud.networking.utils.openapi.converter.EdgeGatewayLoadBalancerConverterUtil.getFailedMonitorNames(EdgeGatewayLoadBalancerConverterUtil.java:516)

 


Environment

VMware Cloud Director 10.x

Cause

This issue occurs when AVI pools were deleted outside of Cloud Director.
Cloud Director is unaware of the changes and is querying for information on objects that no longer exist.

Resolution

This is not an issue with VMware Cloud Director, but a result of configuration changes (deletions) made outside of the scope of Cloud Director.
Please review the Workaround section for an applicable solution.



    Workaround:

    There are two methods:

    1. Cloud Director API Explorer
    2. Third Party REST API Client


    Cloud Director API Explorer

    1. Login to the Cloud Director Portal as a user with valid rights to delete load balancer pools.
    2. In the top right of the page, click on the Help dropdown.
    3. Click API Explorer.
    4. Locate the edgeGatewayLoadBalancerPool section.
    5. Click the DELETE function and select Try it out.
    6. Input the poolId and select execute.
    poolId is in URN format i.e. urn:vcloud:loadBalancerPool:xxxxx.
    1. Repeat for any additional pools which were deleted outside of Cloud Director.

    Third Party REST API Client

    1. Should you wish to cleanup via Rest, you will be running against the following API
    curl -X DELETE https://vcloud.example.com/cloudapi/1.0.0/loadBalancer/pools/{poolId} -H "accept: */*;version=<api version>" -H "Authorization: Bearer xxxxx
    1. The poolId is in URN format i.e. urn:vcloud:loadBalancerPool:xxxxx.
    2. The Authorization Header needs to be obtained via a valid login, either directly via cURL or via the Browser Console.
    3. To verify the version, you can check what ones are supported by running the /api/versions API call.
    4. Repeat for any further pool instance
    5. After a refresh of the Pools page, you should now be able to see current Pools and the error should no longer be there.


    Additional Information

    Impact/Risks:
    Due to the changes made outside of Cloud Director, any tenant who is leveraging those AVI resources will be unable to manage their load balancing service as a result.