NSX 9.1 Upgrade Precheck Fails with "java.lang.NumberFormatException: Zero length BigInteger" in IpAddressBlockLogicalMigrationTask
search cancel

NSX 9.1 Upgrade Precheck Fails with "java.lang.NumberFormatException: Zero length BigInteger" in IpAddressBlockLogicalMigrationTask

book

Article ID: 449277

calendar_today

Updated On:

Products

VMware NSX

Issue/Introduction

During a VMware Cloud Foundation (VCF) or NSX upgrade to version 9.1, the DataMigrationDryRun phase fails. The following error is observed in the Upgrade Coordinator or logical-migration.log on the NSX Manager:

  • MP: mcgmgmtansx####: NSX Manager upgrade dry run failed. Do not proceed with the upgrade.
  • Migrations that failed: Migrating IpAddressBlockLogicalMigrationTask.
  • IpAddressBlockLogicalMigrationTask: java.lang.NumberFormatException: Zero length BigInteger Exception during Data migration.

Environment

VMware NSX

Cause

The error is caused by a malformed or corrupted IP Address Block object in the CorfuDB.

  • Technical Root Cause: Legacy IP Address Blocks (typically created in NSX versions prior to 3.2.1) may be missing the max_block_size field or have it set to null/0.
  • Trigger: The migration script IpAddressBlockLogicalMigrationTask attempts to perform capacity calculations using the BigInteger Java class. When it encounters a completely empty or null field for an IP Block, the mathematical conversion fails, resulting in the "Zero length BigInteger" exception.

Resolution

To resolve this issue, the corrupted IP Address Block entry must be refreshed in the database to recompute the missing metadata.

  1. Identify the Affected Object: Check the NSX logs or run the following command on the NSX Manager to identify objects with missing maxBlockSize:

    bash
     
    corfu_tool_runner.py -o showTable -n nsx -t IpAddressBlock

    Search for entries where the value for maxBlockSize is missing or malformed. Note the UUID or Name (e.g. 111.3).

  2. Trigger a Database Rewrite via UI:

    • Log in to the NSX Manager UI.
    • Navigate to Networking > IP Address Management > IP Address Blocks.
    • Locate the affected IP Address Block identified in Step 1.
    • Click Edit.
    • Modify the Description field (e.g., add a space or a brief text value).
    • Click Save.
    • Note: Saving the object via the UI or Policy API forces the backend to recompute the block's metadata and re-write the record into CorfuDB with the correct parameters.
  3. Verify the Fix: Run the corfu_tool_runner.py command again to ensure maxBlockSize now contains a populated value.

  4. Retry Upgrade: Restart the upgrade precheck or dry run. The migration task should now complete successfully.


Fix Information

  • Workaround: Manually update the IP Address Block via UI/API to trigger a backend rewrite.