Creating a logical switch fails in NSX
search cancel

Creating a logical switch fails in NSX

book

Article ID: 307669

calendar_today

Updated On:

Products

VMware NSX for vSphere

Issue/Introduction

Symptoms:

  • Creating a logical switch fails
  • You see the error:

    Internal Error
  • From the logs, you see entries similar to:

    2015-05-01 17:41:13.881 GMT INFO http-nio-127.0.0.1-7441-exec-3 ControllerServiceImpl:1090 - create VNI: 10010012 mcast=true
    2015-05-01 17:41:13.897 GMT WARN http-nio-127.0.0.1-7441-exec-3 RestTemplate:478 - POST request for "https://x.x.x.x:443/ws.v1/lswitch" resulted in 409 (Conflict); invoking error handler
    2015-05-01 17:41:13.898 GMT ERROR http-nio-127.0.0.1-7441-exec-3 NvpRestClientManagerImpl:602 - NVP API returns error: [409] Duplicate VNI 10010012 on lswitch


    Note: The preceding log excerpts are only examples. Date, time, and environmental variables may vary depending on your environment.

Environment

VMware NSX for vSphere 6.1.x
VMware NSX for vSphere 6.2.x

Cause

This issue occurs when the virtual wires were deleted, the corresponding logical switch on the controllers could not be deleted, resulting in mismatch between the NSX manager and controller.

Resolution

To resolve this issue:

Invoke an NSX Controller sync through an API call or through the vCenter Server User Interface (UI).

Note: Prior to doing the steps, ensure that:
  • You have basic authorization with the NSX Manager web credentials such as the admin user, or any vCenter user granted NSX privileges.
  • Headers Content-type: application/xml and Accept: application/xml are used.

    For more information on how to make API calls to the NSX Manager, see the Using the NSX REST API section of the VMware NSX for vSphere API Guide.

Through API:

  1. To invoke an NSX Controller sync:

    PUT http://NSXMGR_IP/api/2.0/vdn/controller/synchronize


  2. To check an NSX Controller sync status:

    GET http://NSXMGR_IP/api/2.0/vdn/controller/synchronize/status

Through the vCenter Server User Interface (UI):

  1. Using the vSphere Web Client, navigate to Networking & Security > Installation > Management tab.
  2. Under NSX Managers > Actions > select Update Controller State. This prompts a pop up to confirm user action. This starts the controller sync.

Additional Information