NSX Manager API Server Fails to Start With socket.gaierror Name or Service Not Known
search cancel

NSX Manager API Server Fails to Start With socket.gaierror Name or Service Not Known

book

Article ID: 450475

calendar_today

Updated On:

Products

VMware NSX

Issue/Introduction

During or after an upgrade of VMware NSX to version 4.2.4.1, the HTTP service on one or more NSX Manager nodes displays as DOWN. Running get services from the NSX Manager CLI returns the error message no services defined.

The nsx-mp-api-server fails to start and crashes during initialization. Reviewing /var/log/syslog or /var/log/nvpapi/api_server.log reveals the following error signature:

2026-07-22T05:32:00.375Z api_server ERROR traceback
Traceback (most recent call last):
  File "/opt/vmware/nsx-node-api/bin/python/management_api/webserver/nvpapi.py", line 498, in <module>
    main()
  File "/opt/vmware/nsx-node-api/bin/python/management_api/webserver/nvpapi.py", line 341, in main
    handler.initialize_pre_start(config)
  File "/opt/vmware/nsx-node-api/bin/python/management_api/napi/root/node/services/syslog/exporters.py", line 1994, in initialize_pre_start
    if not _update_firewall_rules_for_all_exporters():
  File "/opt/vmware/nsx-node-api/bin/python/management_api/napi/rest_routine_roothelper.py", line 192, in new_fn
    raise return_exception
socket.gaierror: [Errno -2] Name or service not known
2026-07-22T05:32:00.376Z webserver.exit_utils INFO Cleanup before exiting
2026-07-22T05:32:00.377Z webserver.exit_utils INFO Exiting with exit status: 1

Environment

  • VMware NSX 4.2.4.1

Cause

During nsx-mp-api-server startup (nvpapi.py), the process executes _update_firewall_rules_for_all_exporters() to configure local firewall rules for remote syslog exporters. If a configured remote syslog exporter FQDN cannot be resolved by DNS, an unhandled socket.gaierror exception is thrown, causing the API server process to exit with status code 1.

Resolution

Option 1: Restore DNS Resolution and Syslog Exporter Reachability

  1. Log in to the affected NSX Manager node via SSH as root.

  2. Verify DNS resolution and reachability to the remote log server:

    ping <syslog_server_fqdn>
    
  3. Resolve any underlying network or DNS issues preventing the FQDN from resolving.

  4. Restart the rsyslog service:

    systemctl restart rsyslog
    
  5. Restart the NSX Management API server:

    /etc/init.d/nsx-mp-api-server restart
    
  6. Verify that the HTTP service status transitions to UP across all cluster nodes.

 

Option 2: Remove Unreachable or Obsolete Syslog Exporters

If the configured log server is decommissioned or no longer in use:

  1. SSH into each NSX Manager node in the cluster as root.

  2. Open /etc/rsyslog.conf in a text editor:

    vi /etc/rsyslog.conf
    
  3. Remove the configuration lines tagged with # nsx exporter: (specifically the $ActionQueueType LinkedList line and the <FQDN>:514;RFC5424fmt export directive).

  4. Restart the rsyslog and API server services:

    systemctl restart rsyslog
    /etc/init.d/nsx-mp-api-server restart
    
  5. Confirm cluster service stabilization and verify that get services reports services correctly.