This is an automated email from the ASF dual-hosted git repository.
keith-turner pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/accumulo.git
The following commit(s) were added to refs/heads/main by this push:
new 23afa358e7 fixes bug with rpc bind address (#6330)
23afa358e7 is described below
commit 23afa358e770afd5a75c08b7332169f788171fc2
Author: Keith Turner <[email protected]>
AuthorDate: Thu Apr 23 10:12:44 2026 -0700
fixes bug with rpc bind address (#6330)
Fixes two problems. The scripts were using a deprecated rpc bind
address property. The server side code was ignoring the deprecated
property.
Co-authored-by: Daniel Roberts <[email protected]>
---
assemble/bin/accumulo-cluster | 4 ++--
core/src/main/java/org/apache/accumulo/core/cli/ServerOpts.java | 2 +-
.../src/main/java/org/apache/accumulo/server/AbstractServer.java | 7 ++++---
3 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/assemble/bin/accumulo-cluster b/assemble/bin/accumulo-cluster
index 0b3126ce01..7b065ecb01 100755
--- a/assemble/bin/accumulo-cluster
+++ b/assemble/bin/accumulo-cluster
@@ -408,9 +408,9 @@ function execute_command() {
servers_per_host="${!S:-1}"
if [[ $ARG_LOCAL == 1 ]]; then
- debugOrRunAsync bash -c "ACCUMULO_CLUSTER_ARG=$servers_per_host
\"$bin/accumulo-service\" $service $control_cmd -o
general.process.bind.addr=$host $*"
+ debugOrRunAsync bash -c "ACCUMULO_CLUSTER_ARG=$servers_per_host
\"$bin/accumulo-service\" $service $control_cmd -o rpc.bind.addr=$host $*"
else
- debugOrRunAsync "${SSH[@]}" "$host" "bash -c
'ACCUMULO_CLUSTER_ARG=$servers_per_host \"$bin/accumulo-service\" $service
$control_cmd -o general.process.bind.addr=$host $*'"
+ debugOrRunAsync "${SSH[@]}" "$host" "bash -c
'ACCUMULO_CLUSTER_ARG=$servers_per_host \"$bin/accumulo-service\" $service
$control_cmd -o rpc.bind.addr=$host $*'"
fi
}
diff --git a/core/src/main/java/org/apache/accumulo/core/cli/ServerOpts.java
b/core/src/main/java/org/apache/accumulo/core/cli/ServerOpts.java
index 0158fb4126..4d8b39e191 100644
--- a/core/src/main/java/org/apache/accumulo/core/cli/ServerOpts.java
+++ b/core/src/main/java/org/apache/accumulo/core/cli/ServerOpts.java
@@ -49,7 +49,7 @@ public class ServerOpts extends Help {
description = "Overrides configuration set in accumulo.properties (but
NOT system-wide config"
+ " set in Zookeeper). This is useful when you have process specific
configuration items"
+ " that are one-offs from a shared common configuration. Setting
the bind address,"
- + " for example, can be done with the arguments \"-o
general.process.bind.addr=127.0.0.1\"."
+ + " for example, can be done with the arguments \"-o
rpc.bind.addr=127.0.0.1\"."
+ " Expected format: -o <key>=<value> [-o <key>=<value>]")
private List<String> overrides = new ArrayList<>();
diff --git
a/server/base/src/main/java/org/apache/accumulo/server/AbstractServer.java
b/server/base/src/main/java/org/apache/accumulo/server/AbstractServer.java
index 7e34df0e80..a1a4bacfe0 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/AbstractServer.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/AbstractServer.java
@@ -99,6 +99,7 @@ public abstract class AbstractServer
private final AtomicBoolean closed = new AtomicBoolean(false);
private final Set<String> monitorMetricExclusions;
+ @SuppressWarnings("deprecation")
protected AbstractServer(ServerId.Type serverType, ServerOpts opts,
BiFunction<SiteConfiguration,ResourceGroupId,ServerContext>
serverContextFactory,
String[] args) {
@@ -106,10 +107,10 @@ public abstract class AbstractServer
this.applicationName = serverType.name();
opts.parseArgs(applicationName, args);
var siteConfig = opts.getSiteConfiguration();
- final String newBindParameter =
siteConfig.get(Property.RPC_PROCESS_BIND_ADDRESS);
+ final String newBindParameter = siteConfig.get(siteConfig
+ .resolve(Property.RPC_PROCESS_BIND_ADDRESS,
Property.GENERAL_PROCESS_BIND_ADDRESS));
// If new bind parameter passed on command line or in file, then use it.
- if (newBindParameter != null
- &&
!newBindParameter.equals(Property.RPC_PROCESS_BIND_ADDRESS.getDefaultValue())) {
+ if (newBindParameter != null && !newBindParameter.isBlank()) {
this.bindAddress = newBindParameter;
} else {
this.bindAddress = ServerOpts.BIND_ALL_ADDRESSES;