eclipse-vertx/vert.x · error · IllegalArgumentException
clusterPort p must be in range 0 <= p <= 65535
Error message
clusterPort p must be in range 0 <= p <= 65535
What it means
Configuration validation in EventBusOptions.setPort: the clustered event bus port must lie in the valid TCP port range 0-65535. Ports outside this range cannot be bound and are rejected by the setter (note the message says 'clusterPort' because this value backs the --cluster-port option).
Source
Thrown at vertx-core/src/main/java/io/vertx/core/eventbus/EventBusOptions.java:268
/**
* @return the port, which can be configured from the {@link #setPort(int)}, or
* using the {@code --cluster-port} command line option.
* @see NetServerOptions#getPort()
*/
public int getPort() {
return port;
}
/**
* Sets the port.
*
* @param port the port
* @return a reference to this, so the API can be used fluently
* @see NetServerOptions#setPort(int)
*/
public EventBusOptions setPort(int port) {
if (port < 0 || port > 65535) {
throw new IllegalArgumentException("clusterPort p must be in range 0 <= p <= 65535");
}
this.port = port;
return this;
}
/**
* @return the value of reconnect attempts
* @see NetClientOptions#getReconnectAttempts()
*/
public int getReconnectAttempts() {
return reconnectAttempts;
}
/**
* Sets the value of reconnect attempts.
*View on GitHub (pinned to fb308bd8c3)
Solutions
- Choose a port in 0..65535 (0 lets the system pick an ephemeral port)
- Validate externally supplied cluster port configuration before applying it
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at vertx-core/src/main/java/io/vertx/core/eventbus/EventBusOptions.java:268 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of eclipse-vertx/vert.x@fb308bd8c3 (2026-09-06).
Data as JSON: /api/errors/2e5ea13d61c5dbc9.
Report an issue: GitHub.