Segments created in NSX are note being added to the vCenter(s)
search cancel

Segments created in NSX are note being added to the vCenter(s)

book

Article ID: 442178

calendar_today

Updated On:

Products

VMware NSX

Issue/Introduction

  • You observe that newly created NSX segments are not appearing in your computer manager(s) (vCenter).
  • When you review the NSX Manager logs, specifically /var/log/proton/nsxapi.log, you see continuous activity from the LogicalSwitchStateAutoRectifier component registering segments as "out-of-sync."
  • However, you notice a complete absence of activity from the LogicalSwitchHostSyncer component, which is responsible for pushing configurations to vCenter.
  • As root user, checking all 3 NSX manager logs /var/log/proton/nsxapi.log
    • Manager 1:

zgrep  "LogicalSwitchStateOperationScheduler1" /var/log/proton/nsxapi.* | grep -E 'LogicalSwitchStateCoordinator|LogicalSwitchStateAutoRectifier' | wc -l

0

zgrep "LogicalSwitchStateOperationScheduler2" /var/log/proton/nsxapi.* | grep -E 'LogicalSwitchStateCoordinator|LogicalSwitchStateAutoRectifier' | wc -l

961164

    • Manager 2:

zgrep  "LogicalSwitchStateOperationScheduler1" /var/log/proton/nsxapi.* | grep -E 'LogicalSwitchStateCoordinator|LogicalSwitchStateAutoRectifier' | wc -l

189498

zgrep "LogicalSwitchStateOperationScheduler2" /var/log/proton/nsxapi.* | grep -E 'LogicalSwitchStateCoordinator|LogicalSwitchStateAutoRectifier' | wc -l
0

    • Manager 3:

zgrep  "LogicalSwitchStateOperationScheduler1" /var/log/proton/nsxapi.* | grep -E 'LogicalSwitchStateCoordinator|LogicalSwitchStateAutoRectifier' | wc -l

0

zgrep "LogicalSwitchStateOperationScheduler2" /var/log/proton/nsxapi.* | grep -E 'LogicalSwitchStateCoordinator|LogicalSwitchStateAutoRectifier' | wc -l
127956

  • These commands show that only one  LogicalSwitchStateOperationScheduler is active for LogicalSwitchStateAutoRectifier on each NSX Manager. Ideally, LogicalSwitchStateAutoRectifier should be present for both schedulers.
  • The below command shows if there is any activity logged for LogicalSwitchHostSyncer with any LogicalSwitchStateOperationScheduler

zgrep "LogicalSwitchStateOperationScheduler1" nsxapi.* | grep -E 'LogicalSwitchHostSyncer' | wc -l

zgrep "LogicalSwitchStateOperationScheduler2" nsxapi.* | grep -E 'LogicalSwitchHostSyncer' | wc -l

Environment

VMware NSX 4.x

Cause

This issue is caused by thread starvation within the NSX Manager Java process. NSX uses a shared thread pool (LogicalSwitchStateOperationScheduler) with only two threads to handle both identifying out-of-sync segments and syncing them to vCenter.

If a downstream vCenter becomes unresponsive during an active API call, the synchronization thread can hang indefinitely while waiting for a network response.

This "blackholed" connection permanently blocks the thread, and if both threads become stuck or one is tied up, the system cannot schedule further synchronization tasks.

Resolution

Workaround

If you encounter this state, you can immediately release the hung threads and allow segment realization to resume by following these steps:

  1. ssh as admin user to all 3 managers.
  2. Check the cluster status, ensure all service are up and cluster is good using: get cluster status
  3. Then restart the proton (manager) service on the first manager using: restart service manager
  4. Wait for the cluster to be healthy again using: get cluster status
  5. Once healthy, on the second manager, restart the proton (manager) service using: restart service manager
  6. Wait for the cluster to be healthy again using: get cluster status
  7. Once healthy, on the third manager, restart the proton (manager) service using: restart service manager
  8. Wait for the cluster to be healthy again using: get cluster status

Note: To avoid VIP failing over multiple times, leave the manager which holds the VIP to last, thus having only one VIP failover.