NSX - HTTPS service is DOWN and cannot be started.
search cancel

NSX - HTTPS service is DOWN and cannot be started.

book

Article ID: 380787

calendar_today

Updated On:

Products

VMware NSX

Issue/Introduction

- HTTPS service is Down.

- The following error is observed in /var/log/nvpapi/api_server.log:

2024-10-20T09:47:14.888Z 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 333, in main
    handler = descriptor.provider.resolve_handler(descriptor)
  File "/opt/vmware/nsx-node-api/bin/python/management_api/descriptors/rest_routine_descriptor.py", line 188, in resolve_handler
    self.module_obj = __import__(self.module, globals(), locals(),
  File "/opt/vmware/nsx-node-api/bin/python/management_api/napi/root/node/core_dumps.py", line 18, in <module>
    from management_api.napi.root.node.file_store.appliance_utils import \
  File "/opt/vmware/nsx-node-api/bin/python/management_api/napi/root/node/file_store/appliance_utils.py", line 15, in <module>
    from management_api.napi.root.node.file_store import utils
  File "/opt/vmware/nsx-node-api/bin/python/management_api/napi/root/node/file_store/utils.py", line 745
        lg.debug("output %s", output)
TabError: inconsistent use of tabs and spaces in indentation

Environment

NSX

Cause

In this case the file utils.py had been modified and had the wrong number of spaces at the beginning of line 745.

Resolution

Line 745 of utils.py should have 20 spaces at the beginning.

1. Take a backup of file utils.py:

# cp /opt/vmware/nsx-node-api/bin/python/management_api/napi/root/node/file_store/utils.py /opt/vmware/nsx-node-api/bin/python/management_api/napi/root/node/file_store/utils.py.backup

2. Enter an editor and move to line 745:

# vi /opt/vmware/nsx-node-api/bin/python/management_api/napi/root/node/file_store/utils.py

:set number

:745

3. Modify the line to have 20 spaces at the beginning:

                    lg.debug("output %s", output

4. Save file

:wq

5. Restart the services:

systemctl restart nsx-mp-api-server