{"record":{"id":"669d488a93fae467","repo":"apache/hadoop","slug":"virtual-ip-for-failover-not-found-misconfigured","errorCode":null,"errorMessage":"Virtual IP for failover not found,misconfigured {}?","messagePattern":"Virtual IP for failover not found,misconfigured (.+?)\\?","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/server/namenode/ha/ObserverReadProxyProviderWithIPFailover.java","lineNumber":137,"sourceCode":"   * @param haURI the ha uri, a name service id in this case.\n   */\n  private void cloneDelegationTokenForVirtualIP(\n      Configuration conf, URI haURI) {\n    URI virtualIPURI = getFailoverVirtualIP(conf, haURI.getHost());\n    InetSocketAddress vipAddress = new InetSocketAddress(\n        virtualIPURI.getHost(), virtualIPURI.getPort());\n    HAUtilClient.cloneDelegationTokenForLogicalUri(\n        ugi, haURI, Collections.singleton(vipAddress));\n  }\n\n  private static URI getFailoverVirtualIP(\n      Configuration conf, String nameServiceID) {\n    String configKey = IPFAILOVER_CONFIG_PREFIX + \".\" + nameServiceID;\n    String virtualIP = conf.get(configKey);\n    LOG.info(\"Name service ID {} will use virtual IP {} for failover\",\n        nameServiceID, virtualIP);\n    if (virtualIP == null) {\n      throw new IllegalArgumentException(\"Virtual IP for failover not found,\"\n          + \"misconfigured \" + configKey + \"?\");\n    }\n    return URI.create(virtualIP);\n  }\n}\n","sourceCodeStart":119,"sourceCodeEnd":143,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/server/namenode/ha/ObserverReadProxyProviderWithIPFailover.java#L119-L143","documentation":"ObserverReadProxyProviderWithIPFailover delegates failover to an IPFailoverProxyProvider bound to a virtual address that must be configured per nameservice at dfs.client.failover.ipfailover.virtual-address.<nameservice>. Its constructor calls conf.get(configKey); a null value throws IllegalArgumentException immediately, so the proxy provider cannot be built.","triggerScenarios":"Configuring dfs.client.failover.proxy.provider.<ns>=...ObserverReadProxyProviderWithIPFailover without the matching dfs.client.failover.ipfailover.virtual-address.<ns> entry, or with a nameservice id that differs (case/spelling) from the URI authority.","commonSituations":"Adopting Observer NameNode reads with VIP failover and forgetting the VIP key; config templates where the nameservice id casing differs between keys.","solutions":["Set dfs.client.failover.ipfailover.virtual-address.<ns-id>=hdfs://<virtualIP>:<port> using exactly the same ns-id as the URI authority and dfs.nameservices entry","Double-check the nameservice id spelling and case across all keys","If VIP failover is not actually deployed, use ObserverReadProxyProvider (or ConfiguredFailoverProxyProvider) instead"],"exampleFix":"<!-- before: provider set, VIP missing -->\n<property>\n  <name>dfs.client.failover.proxy.provider.ns1</name>\n  <value>org.apache.hadoop.hdfs.server.namenode.ha.ObserverReadProxyProviderWithIPFailover</value>\n</property>\n\n<!-- after: add the virtual address for the nameservice -->\n<property>\n  <name>dfs.client.failover.ipfailover.virtual-address.ns1</name>\n  <value>hdfs://10.0.0.5:8020</value>\n</property>","handlingStrategy":"validation","validationCode":"String ns = uri.getHost();\nString key = \"dfs.client.failover.ipfailover.virtual-address.\" + ns;\nif (conf.get(key) == null) {\n  throw new IllegalArgumentException(\"Missing required config \" + key);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always deploy the ipfailover virtual-address key together with the provider key","Use one nameservice id constant across all config keys to avoid casing mismatches"],"tags":["hdfs","observer-name-node","ip-failover","configuration"],"backgroundTag":"missing-required-config","analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}