"General error has occurred" error when trying to add an HA VIP to an existing VRF T0 gateway after upgrading to NSX-T 3.1.0
search cancel

"General error has occurred" error when trying to add an HA VIP to an existing VRF T0 gateway after upgrading to NSX-T 3.1.0

book

Article ID: 336807

calendar_today

Updated On:

Products

VMware NSX

Issue/Introduction

Symptoms:

  • The NSX-T environment was upgraded to version 3.1.0.
  • The T0 gateway on which the VRF T0 gateway depends was created before the upgrade.
  • When adding an HA VIP to an existing VRF T0 gateway and clicking on the "Save" button, a "General error has occurred" error is displayed in the UI and the VRF T0 gateway configuration change can not be saved:
 
  • In the NSX Manager policy logs (/var/log/policy/policy.log), the following errors are seen at the time of the attempt to save the configuration:
2021-04-07T09:57:17.925Z ERROR http-nio-127.0.0.1-6440-exec-443 NsxBaseRestController - SYSTEM [nsx@6876 comp="nsx-manager" errorCode="MP100" level="ERROR" subcomp="policy"] java.lang.NullPointerException: null

2021-04-07T09:57:17.929Z INFO http-nio-127.0.0.1-6440-exec-443 NsxBaseRestController - SYSTEM [nsx@6876 audit="true" comp="nsx-manager" level="INFO" subcomp="policy"] UserName:'<username>' ModuleName:'common-services' Operation:'PATCH@/api/v1/infra' Operation status: 'failure' Error: General error has occurred.


Note: The preceding log excerpts are only examples. Date, time, and environmental variables may vary depending on your environment.

Environment

VMware NSX-T Data Center 

Cause

A new "advanced_config" property was added to the T0 gateway object in NSX-T 3.1.0.

This is an optional property and if the user does not configure it, the backend will automatically populate it with default values.

When upgrading from an NSX-T release older than 3.1.0, the new property is not initialized for the migrated T0 gateways, causing a java.lang.NullPointerException when trying to save the edited VRF T0 gateway configuration.

Resolution

This issue is resolved in VMware NSX-T Data Center 3.1.1

Workaround:
1. Get the configuration of the T0 gateway used by the VRF T0 gateway with the following REST API call: 

GET https://{{policy-ip}}/policy/api/v1/infra/tier-0s/{{T0 gateway name as displayed in UI}}


2. Use the output from the previous REST API call and populate the missing "advanced_config" property with default values for the existing T0 gateway: 

PATCH https://{{policy-ip}}/policy/api/v1/infra/tier-0s/pepsi
     {
      "transit_subnets": [
                                   "10.#.#.#/24"
                                   ],
      "internal_transit_subnets": [
                                                 "169.#.#.#/24"
                                                ],
      "ha_mode": "ACTIVE_STANDBY",
      "failover_mode": "PREEMPTIVE",
      "ipv6_profile_paths": [
                                        "/infra/ipv6-ndra-profiles/default",
                                        "/infra/ipv6-dad-profiles/default"
                                        ],
       "force_whitelisting": false,
       "default_rule_logging": false,
       "disable_firewall": false,
       "advanced_config": {
                                        "forwarding_up_timer": 0,
                                        "connectivity": "ON"
                                       }
     }


3. Repeat step 1 for the VRF T0 gateway.

4. If the "advanced_config" section is missing from the output of step 3, repeat step 2 for the VRF gateway.

5. Add the HA VIP to the VRF T0 gateway and click on save.