apache/hadoop · error · IllegalArgumentException
Invalid registration, no web address specified {}
Error message
Invalid registration, no web address specified {} What it means
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.
Source
Thrown at hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/store/records/MembershipState.java:250
* @return If the namenode is available.
*/
public boolean isAvailable() {
return getState() == ACTIVE;
}
/**
* Validates the entry. Throws an IllegalArgementException if the data record
* is missing required information.
*/
@Override
public void validate() {
super.validate();
if (getNameserviceId() == null || getNameserviceId().length() == 0) {
throw new IllegalArgumentException(
ERROR_MSG_NO_NS_SPECIFIED + this);
}
if (getWebAddress() == null || getWebAddress().length() == 0) {
throw new IllegalArgumentException(
ERROR_MSG_NO_WEB_ADDR_SPECIFIED + this);
}
if (getRpcAddress() == null || getRpcAddress().length() == 0) {
throw new IllegalArgumentException(
ERROR_MSG_NO_RPC_ADDR_SPECIFIED + this);
}
if (!isBadState() &&
(getBlockPoolId().isEmpty() || getBlockPoolId().length() == 0)) {
throw new IllegalArgumentException(
ERROR_MSG_NO_BP_SPECIFIED + this);
}
}
/**
* Overrides the cached getBlockPoolId() with an update. The state will be
* reset when the cache is flushed
*View on GitHub (pinned to 2add963021)
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.
Example fix
// before
m.setRpcAddress("nn1:8020");
store.put(m); // throws: no web address specified
// after: web address set alongside rpc
m.setRpcAddress("nn1:8020");
m.setWebAddress("nn1:9870");
store.put(m); Defensive patterns
Strategy: validation
Validate before calling
if (m.getWebAddress() == null || m.getWebAddress().isEmpty()) {
throw new IllegalArgumentException(
"web address required (configure dfs.namenode.http-address on the NN)");
} Type guard
boolean hasWebAddress(MembershipState m) {
return m.getWebAddress() != null && !m.getWebAddress().isEmpty();
} Try / catch
try {
store.put(membership);
} catch (IllegalArgumentException e) {
if (e.getMessage().contains("no web address specified")) {
// fix NN http-address config or the programmatic record, then re-register
throw new IllegalStateException("Registration missing web address", e);
}
throw e;
} Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- Invalid registration, no nameservice specified {}
- Invalid registration, no rpc address specified {}
- Invalid registration, no block pool specified {}
- The creation time for the record cannot be negative.
- The modification time for the record cannot be negative.
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/66634490f44e6796.
Report an issue: GitHub.