"could not initialize proxy - no Session" error when adding an Edge Gateway to a Data Center Group
search cancel

"could not initialize proxy - no Session" error when adding an Edge Gateway to a Data Center Group

book

Article ID: 321461

calendar_today

Updated On: 01-26-2025

Products

VMware Cloud Director

Issue/Introduction

Symptoms:
  • Attempting to add an Edge Gateway to a Data Center Group in the Cloud Director Tenant UI fails with an error:
could not initialize proxy - no Session
  • The /opt/vmware/vcloud-director/logs/vcloud-container-debug.log on the Cloud Director Cells shows errors of the form:
| ERROR    | pool-jetty-56             | LazyInitializationException    | could not initialize proxy - no Session | requestId=<REQUEST_UUID>,request=PUT https://vcloud.example.com/cloudapi/1.0.0/edgeGateways/urn:vcloud:gateway:<GATEWAY_UUID>,requestTime=1661940488690,remoteAddress=xx.xx.xx.xx:xxxx,userAgent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 ...,accept=application/json;version 38.0.0-alpha
org.hibernate.LazyInitializationException: could not initialize proxy - no Session
        at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:86)
        at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:140)
        at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:190)
        at com.vmware.vcloud.common.model.net.LogicalNetworkModel_$$_jvst457_8f.setScopeType(LogicalNetworkModel_$$_jvst457_8f.java)
        at com.vmware.vcloud.networking.dao.VdcGroupNetworkDao.lambda$updateOwnerOfRoutedNetworksForEdge$0(VdcGroupNetworkDao.java:473)
        at com.vmware.vcloud.networking.dao.VdcGroupNetworkDao.updateOwnerOfRoutedNetworksInBatch(VdcGroupNetworkDao.java:504)
        at com.vmware.vcloud.networking.dao.VdcGroupNetworkDao.updateOwnerOfRoutedNetworksForEdge(VdcGroupNetworkDao.java:470)
        at com.vmware.vcloud.networking.dao.VdcGroupNetworkDao$$FastClassBySpringCGLIB$$6009dc42.invoke(<generated>)
  • The Edge Gateway that cannot be added has 31 or more Organization VDC Networks attached to it.
  • Edge Gateways with 30 or less Organization VDC Networks attached can be added without issue.


Environment

VMware Cloud Director 10.x

Cause

This issue occurs when the Edge Gateway has 31 or more Organization VDC Networks attached.

Resolution

This issue is a known limitation affecting VMware Cloud Director.

Workaround:

To address the issue, limit the number of Organization VDC Networks attached to the Edge Gateway to 30 or fewer when adding it to a Data Center Group.

Since this involves modifications to the VMware Cloud Director database, ensure that a backup of the database is taken beforehand. Refer to the guide on  Backup and Restore of VMware Cloud Director Appliance

For assistance with modifying the VMware Cloud Director database, please open a support case with Broadcom. For more details, refer to Creating and managing Broadcom support cases

 



Additional Information

If the Edge Gateway requires 31 or more networks when being added to a Data Center Group, a configuration value in the VMware Cloud Director database can be temporarily increased. Follow the steps outlined below for this process.