{"record":{"id":"2e5ea13d61c5dbc9","repo":"eclipse-vertx/vert.x","slug":"clusterport-p-must-be-in-range-0-p-65535","errorCode":null,"errorMessage":"clusterPort p must be in range 0 <= p <= 65535","messagePattern":"clusterPort 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":268,"sourceCode":"  /**\n   * @return the port, which can be configured from the {@link #setPort(int)}, or\n   * using the {@code --cluster-port} command line option.\n   * @see NetServerOptions#getPort()\n   */\n  public int getPort() {\n    return port;\n  }\n\n  /**\n   * Sets the port.\n   *\n   * @param port the port\n   * @return a reference to this, so the API can be used fluently\n   * @see NetServerOptions#setPort(int)\n   */\n  public EventBusOptions setPort(int port) {\n    if (port < 0 || port > 65535) {\n      throw new IllegalArgumentException(\"clusterPort p must be in range 0 <= p <= 65535\");\n    }\n    this.port = port;\n    return this;\n  }\n\n\n  /**\n   * @return the value of reconnect attempts\n   * @see NetClientOptions#getReconnectAttempts()\n   */\n  public int getReconnectAttempts() {\n    return reconnectAttempts;\n  }\n\n\n  /**\n   * Sets the value of reconnect attempts.\n   *","sourceCodeStart":250,"sourceCodeEnd":286,"githubUrl":"https://github.com/eclipse-vertx/vert.x/blob/fb308bd8c3f12c79f4ae89bef67fadf6c80d036e/vertx-core/src/main/java/io/vertx/core/eventbus/EventBusOptions.java#L250-L286","documentation":"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).","triggerScenarios":"Thrown at vertx-core/src/main/java/io/vertx/core/eventbus/EventBusOptions.java:268 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Choose a port in 0..65535 (0 lets the system pick an ephemeral port)","Validate externally supplied cluster port configuration before applying it"],"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-14T05:17:10.506Z"}