Deleting port mirroring sessions fails in NSX
search cancel

Deleting port mirroring sessions fails in NSX

book

Article ID: 322483

calendar_today

Updated On:

Products

VMware NSX

Issue/Introduction

  • Removal of a port mirroring profile through NSX UI fails.
  • Attempting to delete the port mirroring sessions via API returns status 500 Internal Server Error
DELETE /policy/api/v1/infra/port-mirroring-profiles/<port-mirroring-profile-id> 

Output:
{
    "module_name": "common-services",
    "error_message": "General error has occurred.",
    "details": "java.lang.NullPointerException",
    "error_code": 100
}
  • After running the above API the port mirroring session is stuck with Delete in progress in the NSX UI
  • Creating additional port mirroring profiles fail.
  • The following errors may be seen in the NSX-T Manager log file /var/log/nsxapi.log 
INFO http-nio-127.0.0.1-7440-exec-16 PortMirroringProfileServiceImpl 79136 POLICY [nsx@6876 comp="nsx-manager" level="INFO" reqId="4aefdb4e-d4d8-11ec-9b82-0200ab650843" subcomp="manager" username="admin"] Validating Delete on Port mirroring profile /infra/port-mirroring-profiles/<port-mirroring-profile-id> 
ERROR http-nio-127.0.0.1-7440-exec-16 NsxBaseRestController 79136 SYSTEM [nsx@6876 comp="nsx-manager" errorCode="MP100" level="ERROR" subcomp="manager"]
java.lang.NullPointerException: null
        at com.vmware.nsx.management.policy.operations.monitoring.service.PortMirroringProfileServiceImpl.validateOnDelete(PortMirroringProfileServiceImpl.java:414) ~[?:?]
        at com.vmware.nsx.management.policy.policyframework.service.PolicyServiceImpl.isDeleteNeeded(PolicyServiceImpl.java:1078) ~[?:?]
        at com.vmware.nsx.management.policy.policyframework.service.PolicyServiceImpl.delete_aroundBody18(PolicyServiceImpl.java:667) ~[?:?]

Environment

VMware NSX
VMware NSX-T Data Center

Cause

When deleting a port mirroring profile, under certain conditions, it may lead to a stale entry in the NSX manager database.

Resolution

This is a known issue impacting VMware NSX.

Workaround:

  • If you believe you have encountered this issue, please open a support request with Broadcom Support and refer to this KB article.