{"record":{"id":"66634490f44e6796","repo":"apache/hadoop","slug":"invalid-registration-no-web-address-specified","errorCode":null,"errorMessage":"Invalid registration, no web address specified {}","messagePattern":"Invalid registration, no web address specified (.+?)","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/store/records/MembershipState.java","lineNumber":250,"sourceCode":"   * @return If the namenode is available.\n   */\n  public boolean isAvailable() {\n    return getState() == ACTIVE;\n  }\n\n  /**\n   * Validates the entry. Throws an IllegalArgementException if the data record\n   * is missing required information.\n   */\n  @Override\n  public void validate() {\n    super.validate();\n    if (getNameserviceId() == null || getNameserviceId().length() == 0) {\n      throw new IllegalArgumentException(\n          ERROR_MSG_NO_NS_SPECIFIED + this);\n    }\n    if (getWebAddress() == null || getWebAddress().length() == 0) {\n      throw new IllegalArgumentException(\n          ERROR_MSG_NO_WEB_ADDR_SPECIFIED + this);\n    }\n    if (getRpcAddress() == null || getRpcAddress().length() == 0) {\n      throw new IllegalArgumentException(\n          ERROR_MSG_NO_RPC_ADDR_SPECIFIED + this);\n    }\n    if (!isBadState() &&\n        (getBlockPoolId().isEmpty() || getBlockPoolId().length() == 0)) {\n      throw new IllegalArgumentException(\n          ERROR_MSG_NO_BP_SPECIFIED + this);\n    }\n  }\n\n\n  /**\n   * Overrides the cached getBlockPoolId() with an update. The state will be\n   * reset when the cache is flushed\n   *","sourceCodeStart":232,"sourceCodeEnd":268,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/store/records/MembershipState.java#L232-L268","documentation":"MembershipState.validate() requires a non-empty web address (getWebAddress()); null or empty throws IllegalArgumentException(ERROR_MSG_NO_WEB_ADDR_SPECIFIED + this). The Router needs each member's HTTP/WEB address to proxy web UI and webhdfs-style operations, so registrations without it are rejected even when the RPC address is present.","triggerScenarios":"A registration/heartbeat where the Namenode's web (HTTP) address is unknown or unset — dfs.namenode.http-address / service RPC config missing on the NN so the heartbeat carries no web address; programmatic MembershipState construction that skips setWebAddress.","commonSituations":"Namenode configured with RPC only (http-address defaulted to 0.0.0.0:0 or not bound); older NN setups or custom resolvers that do not populate the web address field; tests/tools writing membership records directly.","solutions":["On the Namenode, configure dfs.namenode.http-address (and https-address when TLS) so heartbeats include a usable web address.","If writing records programmatically, call setWebAddress(host:port) before put.","Check the record dump in the message to see which address fields were blank.","Fix and let heartbeats overwrite the rejected registration, or remove the bad record."],"exampleFix":"// before\nm.setRpcAddress(\"nn1:8020\");\nstore.put(m); // throws: no web address specified\n\n// after: web address set alongside rpc\nm.setRpcAddress(\"nn1:8020\");\nm.setWebAddress(\"nn1:9870\");\nstore.put(m);","handlingStrategy":"validation","validationCode":"if (m.getWebAddress() == null || m.getWebAddress().isEmpty()) {\n  throw new IllegalArgumentException(\n      \"web address required (configure dfs.namenode.http-address on the NN)\");\n}","typeGuard":"boolean hasWebAddress(MembershipState m) {\n  return m.getWebAddress() != null && !m.getWebAddress().isEmpty();\n}","tryCatchPattern":"try {\n  store.put(membership);\n} catch (IllegalArgumentException e) {\n  if (e.getMessage().contains(\"no web address specified\")) {\n    // fix NN http-address config or the programmatic record, then re-register\n    throw new IllegalStateException(\"Registration missing web address\", e);\n  }\n  throw e;\n}","preventionTips":["Configure a concrete dfs.namenode.http-address (host:port, not 0.0.0.0) on every federated Namenode.","In custom registration code, populate all address fields from the NNInfo the resolver returns.","Test registrations against validate() in integration tests."],"tags":["hdfs","router-based-federation","state-store","membership","record-validation"],"backgroundTag":"invalid-service-registration","analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}