diff options
author | bratseth <bratseth@yahoo-inc.com> | 2016-08-26 14:43:50 +0200 |
---|---|---|
committer | bratseth <bratseth@yahoo-inc.com> | 2016-08-26 14:43:50 +0200 |
commit | ea7856a053bdc0ffbacd3e36d0a79dfafcdf216a (patch) | |
tree | c3fb42a61cc333373f9483455ae4c4d806a6908f /zkfacade | |
parent | b5632ed156e1b6e04d21216830fe8932093a91af (diff) |
Use host name
Diffstat (limited to 'zkfacade')
-rw-r--r-- | zkfacade/src/main/java/com/yahoo/vespa/zookeeper/RestrictedServerCnxnFactory.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/zkfacade/src/main/java/com/yahoo/vespa/zookeeper/RestrictedServerCnxnFactory.java b/zkfacade/src/main/java/com/yahoo/vespa/zookeeper/RestrictedServerCnxnFactory.java index 1b3e8d65eee..d8a1f0f28d9 100644 --- a/zkfacade/src/main/java/com/yahoo/vespa/zookeeper/RestrictedServerCnxnFactory.java +++ b/zkfacade/src/main/java/com/yahoo/vespa/zookeeper/RestrictedServerCnxnFactory.java @@ -36,11 +36,11 @@ public class RestrictedServerCnxnFactory extends NIOServerCnxnFactory { @Override public void registerConnection(ServerCnxn connection) { - String remoteHost = connection.getRemoteSocketAddress().getHostString(); + String remoteHost = connection.getRemoteSocketAddress().getHostName(); if ( ! zooKeeperServerHostnames.contains(remoteHost)) { String errorMessage = "Rejecting connection to ZooKeeper from " + remoteHost + - ": This cluster only allow intra-cluster connections. " + - "These hosts are part of this cluster: " + zooKeeperServerHostnames; + ": This cluster only allow connection from nodes in this cluster. " + + "Hosts in this cluster: " + zooKeeperServerHostnames; log.warning(errorMessage); throw new IllegalArgumentException(errorMessage); } |