Editing Tier-0 Gateway fails with Error: Invalid IP address format. IP string provided.
search cancel

Editing Tier-0 Gateway fails with Error: Invalid IP address format. IP string provided.

book

Article ID: 406115

calendar_today

Updated On:

Products

VMware NSX

Issue/Introduction

  • Editing Tier-0 Gateway fails. For example:
    • Updating fields in Tier-0 Gateway such as description.
    • Changing HA VIP configuration.
    • Changing Interface configuration.
  • NSX UI shows Error: Invalid IP address format. IP string provided "169.254.0.0/28". (Error code: 500157)
    • 169.254.0.0/28 is internal_transit_subnets for active/standby by default. 169.254.0.0/24 is for active/active by default.
  • GET policy/api/v1/infra/tier-0s/<T0_GW_ID> shows internal_transit_subnets field has escaped double quotation inside.
    For example:
    {
      "internal_transit_subnets" : [ "\"169.254.0.0/28\"" ]
    }
  • /var/log/proton/nsxapi.log shows:
    <TIMESTAMP> ERROR providerTaskExecutor-# IPv4Address 13866 - [nsx@6876 comp="nsx-manager" errorCode="MP260" level="ERROR" subcomp="manager"] Invalid ip string '"169.254.0.0/28"'. Error parsing '28"'.
    <TIMESTAMP> ERROR providerTaskExecutor-# PolicyProviderUtil 13866 POLICY [nsx@6876 comp="nsx-manager" errorCode="PM500015" level="ERROR" subcomp="manager"] Unexpected exception received during provider invocation.
    com.vmware.nsx.management.common.ip.utils.InvalidIPFormatException: null
            at com.vmware.nsx.management.common.ip.utils.IPv4Address.<init>(IPv4Address.java:241) ~[?:?]
            at com.vmware.nsx.management.common.ip.utils.IPObjectFactory.createIPAddress(IPObjectFactory.java:102) ~[?:?]
            at com.vmware.nsx.management.edge.common.model.IpSubnetAddressConfig.create(IpSubnetAddressConfig.java:149) ~[?:?]
            at com.vmware.nsx.management.policy.providers.routing.nsxt.PrvProviderNsxT.getLogicalRouterModel(PrvProviderNsxT.java:870) ~[?:?]
            at com.vmware.nsx.management.policy.providers.routing.nsxt.PrvProviderNsxT.handleProviderRealizationInternal_aroundBody2(PrvProviderNsxT.java:346) ~[?:?]
            at com.vmware.nsx.management.policy.providers.routing.nsxt.PrvProviderNsxT$AjcClosure3.run(PrvProviderNsxT.java:1) ~[?:?]
            at org.aspectj.runtime.reflect.JoinPointImpl.proceed(JoinPointImpl.java:149) ~[?:?]
            at io.micrometer.core.aop.TimedAspect.processWithTimer(TimedAspect.java:119) ~[?:?]
            at io.micrometer.core.aop.TimedAspect.ajc$inlineAccessMethod$io_micrometer_core_aop_TimedAspect$io_micrometer_core_aop_TimedAspect$processWithTimer(TimedAspect.java:1) ~[?:?]
            at io.micrometer.core.aop.TimedAspect.timedMethod(TimedAspect.java:97) ~[?:?]
            at com.vmware.nsx.management.policy.providers.routing.nsxt.PrvProviderNsxT.handleProviderRealizationInternal(PrvProviderNsxT.java:273) ~[?:?]
            at com.vmware.nsx.management.policy.providers.routing.nsxt.PrvProviderNsxT.handleProviderRealization(PrvProviderNsxT.java:266) ~[?:?]
            at com.vmware.nsx.management.policy.providers.routing.nsxt.PrvProviderNsxT.pushPolicyIntent_aroundBody10(PrvProviderNsxT.java:1412) ~[?:?]
            at com.vmware.nsx.management.policy.providers.routing.nsxt.PrvProviderNsxT$AjcClosure11.run(PrvProviderNsxT.java:1) ~[?:?]
            at org.aspectj.runtime.reflect.JoinPointImpl.proceed(JoinPointImpl.java:149) ~[?:?]
            at io.micrometer.core.aop.TimedAspect.processWithTimer(TimedAspect.java:119) ~[?:?]
            at io.micrometer.core.aop.TimedAspect.ajc$inlineAccessMethod$io_micrometer_core_aop_TimedAspect$io_micrometer_core_aop_TimedAspect$processWithTimer(TimedAspect.java:1) ~[?:?]
            at io.micrometer.core.aop.TimedAspect.timedMethod(TimedAspect.java:97) ~[?:?]
            at com.vmware.nsx.management.policy.providers.routing.nsxt.PrvProviderNsxT.pushPolicyIntent(PrvProviderNsxT.java:1411) ~[?:?]
            at com.vmware.nsx.management.policy.policyframework.engine.ProviderInvocationTask.run(ProviderInvocationTask.java:242) ~[?:?]
            at com.vmware.nsx.management.common.executor.TaskExecutorImpl$TaskWrapper$1.run(TaskExecutorImpl.java:238) ~[?:?]
            at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_342]
            at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_342]
            at com.vmware.nsx.management.common.executor.TaskExecutorImpl$TaskWrapper.run(TaskExecutorImpl.java:271) ~[?:?]
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_342]
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_342]
            at java.lang.Thread.run(Thread.java:750) ~[?:1.8.0_342]

Environment

NSX-T Data Center 3.2

Cause

internal_transit_subnets with double quotation, for example: "\"169.254.0.0/28\"" causes InvalidIPFormatException. '\"169.254.0.0/28\"' should be '169.254.0.0/28'.

Resolution

Remove double quotation from internal_transit_subnets through PUT policy/api/v1/infra/tier-0s/<T0_GW_ID>

Example with curl:

  1. GET policy/api/v1/infra/tier-0s/<T0_GW_ID>
    curl -k -u admin 'https://<NSX_MANAGER_HOST>/policy/api/v1/infra/tier-0s/T0_GW_ID > T0_GW_ID.json 
    Where T0_GW_ID is your Tier-0 Gateway ID.
  2. Edit internal_transit_subnets in T0_GW_ID.json
    Before: 
    "internal_transit_subnets" : [ "\"169.254.0.0/28\"" ],
    After:
    "internal_transit_subnets" : [ "169.254.0.0/28" ],
  3. PUT policy/api/v1/infra/tier-0s/<T0_GW_ID> with  T0_GW_ID.json 
    curl -k -u'admin' https://<NSX_MANAGER_HOST>/policy/api/v1/infra/tier-0s/<T0_GW_ID> -d@T0_GW_ID.json -XPUT -H"Content-type: application/json"