Error when trying to enable or disable VM Discovery with Global load balancer set - URI is not absolute
search cancel

Error when trying to enable or disable VM Discovery with Global load balancer set - URI is not absolute

book

Article ID: 314066

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

Symptoms:
  • Disabling or enabling VM Discovery (provider portal -> Administration -> General -> Other) when there is a Global load balancer set fails with 
URI is not absolute.
  • Any changes made to the public address also results in the error 
URI is not absolute.
  • The following can be seen in the log file vcloud-container-debug.log under  /opt/vmware/vcloud-director/logs/

java.lang.IllegalArgumentException: URI is not absolute
        at java.base/java.net.URL.fromURI(URL.java:692)
        at java.base/java.net.URI.toURL(URI.java:1116)
        at com.vmware.ssdc.util.UriUtil.toUrlWithoutTrailingSlash(UriUtil.java:84)
        at com.vmware.ssdc.util.UriUtil.conflicts(UriUtil.java:68)
        at com.vmware.ssdc.backend.CAkimbiSystems.lambda$checkEndpointsForMultisiteUrlConflicts$0(CAkimbiSystems.java:799)
        at com.vmware.ssdc.backend.CAkimbiSystems.checkEndpointsForMultisiteUrlConflicts(CAkimbiSystems.java:804)
        at com.vmware.ssdc.backend.CAkimbiSystems.updatePublicEndpointSettings(CAkimbiSystems.java:765)
        at com.vmware.ssdc.backend.CAkimbiSystems.updateSystemSettings(CAkimbiSystems.java:632)
        at com.vmware.vcloud.management.system.SystemServiceImpl.updateSystemSettings(SystemServiceImpl.java:572)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)


Environment

VMware Cloud Director for Service Provider 10.x

Cause

This is a known issue in VMware Cloud Director 10.3.x where the API call created from changing the above settings sends a null payload for the below:

systemExternalAddress: null
systemExternalAddressPublicCertChain: null
systemExternalHttpAddress: null


The above needs to be populated for the Global load balancer to work.

Resolution

This issue is due to be fixed in future version of VMware Cloud Director.

Workaround:
There are two current workarounds available:

Workaround 1 (recommended) :

Manually input the values for the system.external.http.link and system.external.link so that when the API payload is sent the values are not null.
  • Note down the public address of Cloud director (Provider portal -> Administration -> Settings -> Public Addresses)
  • SSH to the primary cell
  • Run the following
/opt/vmware/vcloud-director/bin/cell-management-tool manage-config -n system.external.http.link -v '<Public address>'

/opt/vmware/vcloud-director/bin/cell-management-tool manage-config -n system.external.link -v '<Public address>'
  • The shh session will indicate that a new property has been stored
  • This can be checked on the database by running the following 
select * from config where name like '%system.external%';

Example: 

[ /opt/vmware/vcloud-director ]# /opt/vmware/vcloud-director/bin/cell-management-tool manage-config -n system.external.http.link -v 'http://vcdlab.vcloud.local'

New property being stored: Property "system.external.http.link" has value "http://vcdlab.vcloud.local"

 [ /opt/vmware/vcloud-director ]# /opt/vmware/vcloud-director/bin/cell-management-tool manage-config -n system.external.link -v 'https://vcdlab.vcloud.local'

New property being stored: Property "system.external.link" has value "https://vcdlab.vcloud.local"

 

vcloud=# select * from config where name like '%system.external%';

 config_id | cat  |      name      |    value    | sortorder |     timestamp     | is_hidden

-----------+--------+---------------------------+--------------------+-----------+----------------------------+-----------

  225661 | vcloud | system.external.http.link | http://vcdlab.vcloud.local |     0 | 2022-09-15 10:33:06.328+00 | f

  225681 | vcloud | system.external.link   | https://vcdlab.vcloud.local |     0 | 2022-09-15 10:33:29.238+00 | f

(2 rows)
 


Workaround 2 (Not recommended) :
  • Remove the Global load balancer namespace and make the change required (once this setting is removed, logging into VMware Cloud Director portal will not be possible).