Error: "Unable to parse Uniform Resource Name (URN) ID: '<nsx_segment_name>'." when adding an Edge Gateway to Data Center Group
search cancel

Error: "Unable to parse Uniform Resource Name (URN) ID: '<nsx_segment_name>'." when adding an Edge Gateway to Data Center Group

book

Article ID: 438000

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

  • Adding an Edge Gateway to a Data Center Group in VMware Cloud Director (VCD) fails.
  • In the VCD Tenant Portal the Networking > Data Center Groups > open the Data Center Group > Edge Gateway > Add Edge action fails with an error of the form:

    [ #########-####-####-####-############ ] Unable to parse Uniform Resource Name (URN) ID: '<nsx_segment_name>'.

  • The /opt/vmware/vcloud-director/logs/vcloud-container-debug.log on the VCD Cells shows errors of the form:

    | DEBUG    | pool-jetty-#             | NsxTOrgVdcEdge                 | Validation error occurred when increasing the scope of Edge Gateway <edge_gateway_name> to VDC Group (com.vmware.vcloud.entity.vdcGroup:#########-####-####-####-############). | requestId=#########-####-####-####-############,request=PUT https://<vcd_address>/cloudapi/1.0.0/edgeGateways/urn:vcloud:gateway:#########-####-####-####-############,requestTime=#############,remoteAddress=#.#.#.#:#####,userAgent=Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:145.0) Gecko/20100...,accept=application/json;version 40.0.0-alpha
    com.vmware.vcloud.api.presentation.service.BadRequestException: Unable to parse Uniform Resource Name (URN) ID: '<nsx_segment_name>'.
            at com.vmware.ssdc.backendbase.util.EntityRefUtil.validateIdIsUrn(EntityRefUtil.java:317)
            at com.vmware.ssdc.backendbase.util.EntityRefUtil.createEntityRefFromUrn(EntityRefUtil.java:301)
            at com.vmware.vcloud.networking.model.edge.nsxt.NsxTEdge.lambda$validateNextHopsInExternalNetworkScope$3(NsxTEdge.java:841)

  • The NSX Segment in the error was created in the NSX UI directly and is not a Routed Organization VDC Network created in VCD.
  • There is a Static Route on the Edge Gateway that was created in the NSX UI directly and is scoped to the NSX Segment from the error.
  • The Static Route cannot be edited in the VCD Tenant Portal under Networking > Edge Gateways > open the Edge Gateway > Routing > Static Routes, instead showing a message:

    This Static Route is maintained by your System Administrator and therefore it is read-only.

Environment

VMware Cloud Director 10.6.x

Cause

When attempting to add an Edge Gateway to Data Center Group VCD will attempt to validate the Static Routes.
This includes validating that the Next Hop IP Address and Scope (network) are valid.
If the Scope (network) in a Static Route is an NSX Segment added to the Edge Gateway via the NSX UI directly then VCD does not recognise it and cannot validate it.

Resolution

To resolve the issue delete the Static Route created in the NSX UI from the Tier-1 Gateway in the NSX UI that backs the VCD Edge Gateway.
Tier-1 Gateways in NSX that were created by VCD should not be edited manually in the NSX UI, adding Static Routes and Segments directly in the NSX UI is not a supported action.

WARNING: Deleting a Static Route could impact network traffic, ensure the impact is understood before removing any Static Routes.

For more information on managing Static Routes in NSX, see the documentation on Tier-1 Gateway.

Additional Information

Add an NSX Edge Gateway to a Data Center Group in the VMware Cloud Director Tenant Portal