VCF Usage Meter 9.0 fails to generate VCD login session due to NSX Load Balancer configuration
search cancel

VCF Usage Meter 9.0 fails to generate VCD login session due to NSX Load Balancer configuration

book

Article ID: 443067

calendar_today

Updated On:

Products

VMware Cloud Director VMware Usage Meter

Issue/Introduction

VCF Usage Meter 9.0 fails to generate VCD login session due to NSX Load Balancer configuration

  • The Usage Meter web interface shows a Collection error for the VCD endpoint.
  • Basic network connectivity (ping/telnet) between the Usage Meter appliance and the VCD Load Balancer VIP is successful.
  • In /opt/vmware/cloudusagemetering/platform/log/collection-vcd-main.log, the following error is logged:
        ERROR --- [collector-main-thread] c.vmware.um.vcdcollector.apis.VCDClient : An error occurred while trying to get the X-VMWARE-VCLOUD-ACCESS-TOKEN token

Environment

VMware Cloud Director 10.6.x

VMware Usage Meter 9.x

Cause

This issue occurs when an NSX Load Balancer (ESG or NSX-T Native) sitting in front of the VCD cells is not configured to correctly handle or pass the specific HTTP headers required for VCD's OAuth authentication flow. 

The Load Balancer may be stripping the X-VMWARE-VCLOUD-ACCESS-TOKEN header or failing to persist the API session traffic, preventing the Usage Meter from completing the login handshake despite having valid credentials.

Resolution

To resolve this issue, the NSX Load Balancer configuration must be adjusted to ensure full support for VCD API session headers.

Validate the Issue
1. Log in to the Usage Meter appliance via SSH.
2. Attempt to bypass the Load Balancer by temporarily pointing the Usage Meter to the FQDN/IP of a single VCD cell.

Adjust NSX Load Balancer Settings
1. Ensure the Load Balancer is configured to maintain session persistence for API traffic.
2. Verify that SSL profiles are not interfering with the header exchange. If using SSL Termination, ensure the X-Forwarded-For and other VCD-specific headers are preserved.
3. Ensure the HTTP application profile on the Virtual Server does not have a restrictive header size limit that could truncate the access token (which is typically several lines long).

Verify the Fix
1. Revert the Usage Meter configuration to point back to the Load Balancer VIP.
2. In the Usage Meter web UI, click Synchronize Inventory or re-verify the VCD endpoint.
3. Confirm that the status changes to Green/Connected and that the collection-vcd-main.log no longer reports token retrieval errors.

Additional Information

How to establish an API connection VMware Cloud Director
NSX ESG Load Balancer fails to forward responses