NSX Edge install, curl_wrapper fails with error "ValueError: embedded null byte"
search cancel

NSX Edge install, curl_wrapper fails with error "ValueError: embedded null byte"

book

Article ID: 427598

calendar_today

Updated On:

Products

VMware NSX

Issue/Introduction

During NSX Edge install, curl_wrapper fails with error "ValueError: embedded null byte"

Environment

VMware NSX 4.2.3

Cause

curl_wrapper incorrectly zeroizes input parameters when the --retry option is used.

Resolution

The issue is fixed in NSX 4.2.4

Regarding the work-around, on the Manager in file /opt/vmware/nsx-common/python/nsx_utils/curl_wrapper, in function _curl_to_file comment out or remove the two lines near the bottom of the function:

        for args in cmd_args:
            nz.zeroize(args)

So the bottom part of the function looks like this:

        if not _ex or str(_ex) != EXCEPTION_TIMEDOUT_MSG:
            _log_closing_connection(options)
        # for args in cmd_args: <-- comment out or remove
        # nz.zeroize(args) <-- comment out or remove
        return errcode, stats.http_code

Make this change on all three Managers. There is no need to restart services. Start the upgrade again.