Error: Authorization Error: Unauthorized access for SDDC Manager in VMware Cloud Foundation Operations Administration
search cancel

Error: Authorization Error: Unauthorized access for SDDC Manager in VMware Cloud Foundation Operations Administration

book

Article ID: 449792

calendar_today

Updated On:

Products

VMware SDDC Manager / VCF Installer VMware Cloud Foundation

Issue/Introduction

  • On the VMware Cloud Foundation Operations console, navigating to Administration > SDDC Manager displays the error:
    Authorization Error: Unauthorized access. 
    
    There is a restriction with the page you are trying to reach and it cannot be displayed.


  • Direct login to the SDDC Manager UI is slow and eventually results in: 
    You are not authorized to view this page.


  • The /var/log/vmware/vcf/sddc-manager-ui-app/sddcManagerServer.log file in SDDC Manager contains errors indicating a 504 Gateway Time-out:
    ERROR [1c3..........................] [services/wrappers/requestPromiseWrapper.js, http-get-privileges, logAxiosError:56] axios.error.response.status {"status":504}
    ...
    ERROR [1c3..........................] [routes/security/pluginUiAuthentication.js, http-get-privileges, authenticateUsingOpsJwt:147] Failed to get access token for ops jwt {"error":{"body":"<html>\r\n<head><title>504 Gateway Time-out</title></head>\r\n<body>\r\n<center><h1>504 Gateway Time-out</h1></center>\r\n<hr><center>nginx</center>\r\n</body>\r\n</html>\r\n","code":"ERR_BAD_RESPONSE","statusCode":504}}

     

  • The /var/log/vmware/vcf/commonsvcs/commonsvcs.err file in SDDC Manager reports multiple Java heap exhaustion events:
    Exception in thread "http-nio-127.0.0.1-7100-Acceptor" java.lang.OutOfMemoryError: Java heap space
    ...
    Exception in thread "aggregation-timer" java.lang.OutOfMemoryError: Java heap space
    java.lang.OutOfMemoryError: Java heap space

Environment

  • VMware Cloud Foundation 9.0.x
  • VMware SDDC Manager 9.0.x

Cause

The vcf-commonsvcs service has exhausted its allocated Java heap space (Xmx). When the service reaches its default limit (typically 2048 MB), it can no longer handle authorization requests or inventory synchronization, leading to internal timeouts and the "Unauthorized access" error in the UI.

Resolution

To resolve this issue, increase the maximum heap size for the commonsvcs service to 4096 MB.

 

  1. Log in to the SDDC Manager VM as vcf via SSH and su to root.
  2. Verify the current heap allocation by running:
     cat /opt/vmware/vcf/commonsvcs/bin/commonsvcs | grep Xmx 


     Confirm it is currently set to -Xmx2048m

  3. Create a backup of the service configuration script:
    cp /opt/vmware/vcf/commonsvcs/bin/commonsvcs /home/vcf/commonsvcs_bak
  4. Modify the heap allocation to 4096 MB:
    1. Open the file:
      vi /opt/vmware/vcf/commonsvcs/bin/commonsvcs
    2. Update the value from -Xmx2048m to -Xmx4096m.
  5. Restart all SDDC Manager services to apply the changes and ensure synchronization:
     /opt/vmware/vcf/operationsmanager/scripts/cli/sddcmanager_restart_services.sh
  6. Verify the fix by logging back into the SDDC Manager UI and navigating to the SDDC Manager tab in VCF Operations.