{"record":{"id":"b5e3c6790b92bb4f","repo":"eclipse-vertx/vert.x","slug":"clusterpublicport-p-must-be-in-range-0-p-655","errorCode":null,"errorMessage":"clusterPublicPort p must be in range 0 <= p <= 65535","messagePattern":"clusterPublicPort p must be in range 0 <= p <= 65535","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"vertx-core/src/main/java/io/vertx/core/eventbus/EventBusOptions.java","lineNumber":622,"sourceCode":"\n  /**\n   * Gets the public facing port to be used when clustering.\n   *\n   * @return the public facing port\n   */\n  public int getClusterPublicPort() {\n    return clusterPublicPort;\n  }\n\n  /**\n   * See {@link #setClusterPublicHost(String)} for an explanation.\n   *\n   * @param clusterPublicPort  the public port to use\n   * @return a reference to this, so the API can be used fluently\n   */\n  public EventBusOptions setClusterPublicPort(int clusterPublicPort) {\n    if (clusterPublicPort < 0 || clusterPublicPort > 65535) {\n      throw new IllegalArgumentException(\"clusterPublicPort p must be in range 0 <= p <= 65535\");\n    }\n    this.clusterPublicPort = clusterPublicPort;\n    return this;\n  }\n\n  /**\n   * User-supplied information about this node when Vert.x is clustered.\n   * <p>\n   * The data may be to select a node for a given message.\n   * For example, it could be used to implement a partioning strategy.\n   * <p>\n   * Not used by default.\n   *\n   * @return user-supplied information about this node when Vert.x is clustered\n   */\n  public JsonObject getClusterNodeMetadata() {\n    return clusterNodeMetadata;\n  }","sourceCodeStart":604,"sourceCodeEnd":640,"githubUrl":"https://github.com/eclipse-vertx/vert.x/blob/fb308bd8c3f12c79f4ae89bef67fadf6c80d036e/vertx-core/src/main/java/io/vertx/core/eventbus/EventBusOptions.java#L604-L640","documentation":"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.","triggerScenarios":"Thrown at vertx-core/src/main/java/io/vertx/core/eventbus/EventBusOptions.java:622 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a port in 0..65535 matching the publicly reachable port","Validate cluster public configuration before applying"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fb308bd8c3f12c79f4ae89bef67fadf6c80d036e","analyzedAt":"2026-09-06T11:37:12.241Z","contentChangedAt":"2026-09-06T11:37:12.241Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}