Invalid IP error on NSX managers when login via cli
search cancel

Invalid IP error on NSX managers when login via cli

book

Article ID: 424972

calendar_today

Updated On:

Products

VMware NSX

Issue/Introduction

Seeing a weird error on NSX managers when login via cli:
  • login as: admin
    admin@10.#.#.1's password:
    Last login: Tue Jan  6 15:51:58 2026 from 10.#.#.2
    NSX CLI (Manager, Policy, Controller 9.0.1.0.24952114). Press ? for command list or enter: help
    #####-mngr01> Exception in thread Thread-1:                                     
    Traceback (most recent call last):                                                
    File "/opt/vmware/nsx-cli/bin/python/cli/utils/ipaddr_utils.py",
    line 135, in get_ip_address_typesocket.inet_aton(ip_address)                                                
    OSError: illegal IP address string passed to inet_aton During handling of the above exception, another exception occurred:
    Traceback (most recent call last):                                                
    File  "/opt/vmware/nsx-cli/bin/python/cli/utils/ipaddr_utils.py", line 142, in get_ip_address_type
     
    socket.inet_pton(socket.AF_INET6, ip_address) OSError: illegal IP address string passed to inet_pton During handling of the above exception, another exception occurred:
     
    Traceback (most recent call last): 
    File "/usr/lib/python3.10/threading.py", 
    line 1016, in _bootstrap_inner           self.run()                           File "/opt/vmware/nsx-cli/bin/python/cli/utils/cache_utils.py", line 70, in run
        self.descriptor_factory.node_cache = get_nodes()                              File "/opt/vmware/nsx-cli/bin/python/cli/utils/cache_utils.py", line 28, in get_nodes
        return get_nsx_nodes()                                                        File "/opt/vmware/nsx-cli/bin/python/cli/utils/node_utils.py", line 691, in get_nsx_nodes
        host_addresses = get_host_ip_addresses() if transport_nodes_contains_hosts else {}  File "/opt/vmware/nsx-cli/bin/python/cli/utils/node_utils.py", line 512, in get_host_ip_addresses
        ip_addrs, ip6_addrs = get_ip_address(addr_list)                               File "/opt/vmware/nsx-cli/bin/python/cli/utils/node_utils.py", line 479, in get_ip_address
        addr_type = get_ip_address_type(addr)                                         File "/opt/vmware/nsx-cli/bin/python/cli/utils/ipaddr_utils.py", line 145, in get_ip_address_type
        raise ValueError("Invalid IP address: %s" % ip_address)                       ValueError: Invalid IP address:                                 

Environment

VCF 9.0.1

Cause

  • This is a known issue caused by a host PSOD where the address parameter is returned blank.
  • This is not an NSX cli issue.

Resolution

  • This issue is resolved in 9.1+
  • Workaround.
    • NSXCLI issues will resolve automatically once the PSOD connectivity issue is fixed on the offending host.

Additional Information

To clarify:

  • The root cause was not within the NSX CLI Framework itself.
  • When a user starts an NSX CLI session, it collects information for all cluster nodes and Transport Nodes (TNs).
  • The data for TN is retrieved via an API.
  • However, because this API was returning an empty IP addresses, the CLI framework was throwing a ValueError.