HCX network extension fails with error "Failed while bridging networks. Error: JSONObject["id"] not found"
search cancel

HCX network extension fails with error "Failed while bridging networks. Error: JSONObject["id"] not found"

book

Article ID: 393816

calendar_today

Updated On:

Products

VMware HCX VMware NSX

Issue/Introduction

Extending a L2 network via HCX NE appliance fails with the error  "Failed while bridging networks. Error: JSONObject["id"] not found"

This issue occurs when NSX-T is registered with the source or connector HCX manager and the network being extended is an NSX-T segment. 

The /common/logs/admin/app.log reports following errors :

2025-03-26 09:15:10.430 UTC [NetworkStretchService_SvcThread-106, j: 15b07dd8, , TxId: ########-####-####-####-############] WARN  c.v.v.h.n.i.AbstractJobInt- Invalid vnic backing type NetworkBackingInfo. Expected DistributedVirtualPortBackingInfo. Failed to configure MacLearning on vnic vNic_1 of appliance ########-####-####-####-############.
2025-03-26 09:15:10.529 UTC [NetworkStretchService_SvcThread-106, j: 15b07dd8, , TxId: bfbd6f31-daa9-4afe-####-6626e45a####] ERROR c.v.v.h.n.i.ApplianceConfigCallbackJob- Error fetching MacFlapping for stretch ########-####-####-####-############, Failed to resolve its backing dvpg. networkId: /infra/segments/<segment-name> networkType: NsxtSegment networkBacking: /infra/segments/<segment-name>
2025-03-26 09:15:24.773 UTC [NetworkStretchService_SvcThread-99, j: 482f18de, s: ec928099, , TxId: ####-####-####-####-######] WARN  c.v.v.h.n.i.AbstractJobInt- Exception in NetworkStretchJobs:BridgeNetworksJobInt. Reason : Failed while bridging networks. Error: JSONObject["id] not found.

&

2025-05-30 01:50:10.223 UTC [NetworkStretchService_SvcThread-6358, j: f4b80b1d, , TxId: cb8e4659-3b46-49e4-9655-4552e79b26fc] ERROR c.v.v.h.n.i.ApplianceConfigCallbackJob- Error fetching MacFlapping for stretch c76e670a-08cd-4b7e-ad7d-############, Failed to resolve its backing dvpg. networkId: /infra/segments/############ networkType: NsxtSegment networkBacking: /infra/segments/############
2025-05-30 01:50:24.478 UTC [NetworkStretchService_SvcThread-6358, j: adace0ad, s: c76e670a, , TxId: cb8e4659-3b46-49e4-9655-4552e79b26fc] WARN  c.v.v.h.n.i.AbstractJobInt- Exception in NetworkStretchJobs:BridgeNetworksJobInt. Reason : Failed while bridging networks. Error: JSONObject["id"] not found.
2025-05-30 01:50:24.478 UTC [NetworkStretchService_SvcThread-6358, j: adace0ad, s: c76e670a, , TxId: cb8e4659-3b46-49e4-9655-4552e79b26fc] WARN  c.v.v.h.n.i.AbstractJobInt- BridgeNetworksJobInt failed in state CONFIGURE_SINK_PORT_OR_MAC_LEARNING. Error: Failed while bridging networks. Error: JSONObject["id"] not found.. Retry attempt: 0
java.lang.RuntimeException: Failed while bridging networks. Error: JSONObject["id"] not found.
2025-05-30 01:50:34.786 UTC [NetworkStretchService_SvcThread-6353, j: adace0ad, s: c76e670a, , TxId: cb8e4659-3b46-49e4-9655-4552e79b26fc] WARN  c.v.v.h.n.i.AbstractJobInt- Exception in NetworkStretchJobs:BridgeNetworksJobInt. Reason : Failed while bridging networks. Error: JSONObject["id"] not found.
2025-05-30 01:50:34.786 UTC [NetworkStretchService_SvcThread-6353, j: adace0ad, s: c76e670a, , TxId: cb8e4659-3b46-49e4-9655-4552e79b26fc] WARN  c.v.v.h.n.i.AbstractJobInt- BridgeNetworksJobInt failed in state CONFIGURE_SINK_PORT_OR_MAC_LEARNING. Error: Failed while bridging networks. Error: JSONObject["id"] not found.. Retry attempt: 1
java.lang.RuntimeException: Failed while bridging networks. Error: JSONObject["id"] not found.

In the NSX-T manager log /var/log/search/search-manager.log you see the following log entries:

36804:20##-##-##T##:##:##.591Z INFO TopologyEventHandler TopologyIndexer 6090 - [nsx@6876 comp="nsx-manager" level="INFO" subcomp="manager"] No VIF found for attachment id:<Logical Port UUID>

 

Environment

VMware HCX
VMware NSX

Cause

This issue occurs if the network backing for the NSX-T segment is not resolved. This can occur if a stale logical port is left in the NSX-T manager and can occur post VIF detachment of any given port. 

 

Resolution

To further investigate the issue please gather the HCX logs along with DB and engage Broadcom Support via Contact Broadcom support

Workaround:

To work around this issue,  the segment can be deleted, recreated, and reextended using the HCX NE appliance. 

Upon validation, this KB can be leveraged to remove stale ports in the NSX-T manager:  Scripted cleanup of stale logical ports on NSX segments

API calls can be used to clean up individual ports/VIFs that are stale. The following relevant calls are listed below:

In the NSX-T manager UI, under Policy view, find the port (Networking > Segments > click on blue number of Ports for Segment), click the ellipsis (3 vertical dots) of the port, and select the Delete option.

If this operation fails, you can use the below API call the with the HEADER x-allow-overwrite = true to remove the logical port:

  • DELETE /api/v1/logical-ports/<Logical Port UUID>?detach=true

  • Steps:

    • Login to the NSX-T manager as user admin.

    • Switch to root account using the command  "st  en"

    • Run the following command to delete the  logical-port(s)

      curl -X  DELETE  -k -u   admin:'Password'  "https://<nsx-manager-ip>/api/v1/logical-ports/<Logical Port UUID>?detach=true" 

      Where Logical Port UUID is the port id to be deleted.

      For example the below highlighted is the port id for VM <VM-name>. 

The port uuid  we can be obtained from the Manager view in NSX ie Networking ---> Logical Switches ---> Click on the Logical Switch


 

  • To delete the VIF from policy an example API is posted below:

curl -X  DELETE -k -u admin:'Password'  "https://<nsx-manager-ip>/infra/segments/<Segment_Name>/ports/default:fac96843-7235-4a8e-8ec7-############?detach=true"

Upon removal of the stale port(s) that reside within the NSX-T segment HCX will be able to extend the network properly.