diff --git a/hbase-zookeeper/src/main/java/org/apache/hadoop/hbase/zookeeper/MiniZooKeeperCluster.java b/hbase-zookeeper/src/main/java/org/apache/hadoop/hbase/zookeeper/MiniZooKeeperCluster.java index 6d21fb57588c..c9a9e1f5fca5 100644 --- a/hbase-zookeeper/src/main/java/org/apache/hadoop/hbase/zookeeper/MiniZooKeeperCluster.java +++ b/hbase-zookeeper/src/main/java/org/apache/hadoop/hbase/zookeeper/MiniZooKeeperCluster.java @@ -237,7 +237,9 @@ public int startup(File baseDir, int numZooKeeperServers) while (true) { try { standaloneServerFactory = new NIOServerCnxnFactory(); - standaloneServerFactory.configure(new InetSocketAddress(LOOPBACK_HOST, currentClientPort), + String bindAddr = + configuration.get("hbase.zookeeper.property.clientPortAddress", LOOPBACK_HOST); + standaloneServerFactory.configure(new InetSocketAddress(bindAddr, currentClientPort), configuration.getInt(HConstants.ZOOKEEPER_MAX_CLIENT_CNXNS, HConstants.DEFAULT_ZOOKEEPER_MAX_CLIENT_CNXNS)); } catch (BindException e) {