eclipse-vertx/vert.x · error · IllegalArgumentException

clusterPublicPort p must be in range 0 <= p <= 65535

Error message

clusterPublicPort p must be in range 0 <= p <= 65535

What it means

Configuration validation in setClusterPublicPort: the public-facing port advertised to other cluster members must be within 0-65535. An out-of-range port would be published as an invalid address to the cluster, so the setter rejects it.

Source

Thrown at vertx-core/src/main/java/io/vertx/core/eventbus/EventBusOptions.java:622

  /**
   * Gets the public facing port to be used when clustering.
   *
   * @return the public facing port
   */
  public int getClusterPublicPort() {
    return clusterPublicPort;
  }

  /**
   * See {@link #setClusterPublicHost(String)} for an explanation.
   *
   * @param clusterPublicPort  the public port to use
   * @return a reference to this, so the API can be used fluently
   */
  public EventBusOptions setClusterPublicPort(int clusterPublicPort) {
    if (clusterPublicPort < 0 || clusterPublicPort > 65535) {
      throw new IllegalArgumentException("clusterPublicPort p must be in range 0 <= p <= 65535");
    }
    this.clusterPublicPort = clusterPublicPort;
    return this;
  }

  /**
   * User-supplied information about this node when Vert.x is clustered.
   * <p>
   * The data may be to select a node for a given message.
   * For example, it could be used to implement a partioning strategy.
   * <p>
   * Not used by default.
   *
   * @return user-supplied information about this node when Vert.x is clustered
   */
  public JsonObject getClusterNodeMetadata() {
    return clusterNodeMetadata;
  }

View on GitHub (pinned to fb308bd8c3)

Solutions

  1. Use a port in 0..65535 matching the publicly reachable port
  2. Validate cluster public configuration before applying
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at vertx-core/src/main/java/io/vertx/core/eventbus/EventBusOptions.java:622 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/b5e3c6790b92bb4f. Report an issue: GitHub.