Error "com.vmware.vcloud.common.network.NsxAlbApiException" while interacting with Edge Gateway in VMware Cloud Director
search cancel

Error "com.vmware.vcloud.common.network.NsxAlbApiException" while interacting with Edge Gateway in VMware Cloud Director

book

Article ID: 382691

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

  • Failed to activate load balancer on the edge gateway backed by NSX ALB (Formerly known as AVI)
  • Navigate to Tenant UI > Org VDC > Networking > Edges > Edge Gateway > Load Balancer > General Settings > Edit > Toggle the Active switch, it fails with an error: com.vmware.vcloud.common.network.NsxAlbApiException

  • Failed to delete Virtual Services on the edge gateway backed by NSX ALB with the same error: 'com.vmware.vcloud.common.network.NsxAlbApiException'
  • Under /opt/vmware/vcloud-director/logs/vcloud-container-debug.log, you see messages similar to:

    ERROR    | task-service-activity-pool-XX | FutureUtil | Task future is not complete. | requestId=XXXXXX-XXXX-XXXXX-XXXX,request=PUT https://<VCD_FQDN>/cloudapi/1.0.0/edgeGateways/urn:vcloud:gateway:XXXXX-XXXX-XXX-XX/load...,requestTime=XXXX,remoteAddress=XX.XX.XX.XX:<Port Number>,userAgent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/XXX ...,accept=application/json;version 39.0.0-alpha vcd=XXXXXX-XXXXX-XXX-XXXXX,task=XXXXX-XXXX-XXXX-XXXXXX activity=(com.vmware.vcloud.backendbase.management.system.TaskActivity,urn:uuid:XXXXXX-XXXX-XXXX-XXXXXXXX)
    com.vmware.vcloud.common.network.NsxAlbApiException at com.vmware.vcloud.fabric.net. nsxalb.NsxAlbRestTemplateErrorHandler.handleError(NsxAlbRestTemplateErrorHandler.java:45) at org.springframework.web.client.ResponseErrorHandler.handleError(ResponseErrorHandler.java:63)

Environment

  • VMware Cloud Director 10.X
  • VMware NSX Advanced Load Balancer (Formerly known as VMware Avi Load Balancer)

Cause

The issue is due to how the Avi Controller name is specified in VMware Cloud Director. The Avi Controller name is case-sensitive, and if it is entered in camel case (a mix of upper and lower case letters), this can cause the NsxAlbApiException. The AVI Controller URL must be entered in all lowercase letters for proper recognition.

Resolution

To resolve this issue, ensure that the Avi Controller URL is specified in lowercase in VMware Cloud Director by following these steps:

  1. Log in to the VCD Provider Portal as a System Administrator.
  2. From the top navigation bar, under Resources, click Infrastructure Resources.
  3. Click NSX-ALB and then select Controllers.
  4. Select the Avi Controller in question.
  5. Click Edit.
  6. In "URL" filed, ensure the Avi URL is set to lowercase (e.g., avi-controller.example.com).
  7. Click "Save".