joshelser closed pull request #649: TServerUtilsTest fails on master and OSX URL: https://github.com/apache/accumulo/pull/649
This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/server/base/src/main/java/org/apache/accumulo/server/rpc/TServerUtils.java b/server/base/src/main/java/org/apache/accumulo/server/rpc/TServerUtils.java index 6a6de4e1a2..af2871e163 100644 --- a/server/base/src/main/java/org/apache/accumulo/server/rpc/TServerUtils.java +++ b/server/base/src/main/java/org/apache/accumulo/server/rpc/TServerUtils.java @@ -276,7 +276,9 @@ public static ServerAddress createBlockingServer(HostAndPort address, TProcessor TProtocolFactory protocolFactory, long maxMessageSize, String serverName, int numThreads, int numSimpleTimerThreads, long timeBetweenThreadChecks) throws TTransportException { - TServerSocket transport = new TServerSocket(address.getPort()); + InetSocketAddress isa = new InetSocketAddress(address.getHost(), address.getPort()); + // Must use an ISA, providing only a port would ignore the hostname given + TServerSocket transport = new TServerSocket(isa); ThreadPoolExecutor pool = createSelfResizingThreadPool(serverName, numThreads, numSimpleTimerThreads, timeBetweenThreadChecks); TThreadPoolServer server = createTThreadPoolServer(transport, processor, @@ -433,7 +435,9 @@ public static ServerAddress createSaslThreadPoolServer(HostAndPort address, TPro // when the server does an accept() to (presumably) wake up the eventing system. log.info("Creating SASL thread pool thrift server on listening on {}:{}", address.getHost(), address.getPort()); - TServerSocket transport = new TServerSocket(address.getPort(), (int) socketTimeout); + InetSocketAddress isa = new InetSocketAddress(address.getHost(), address.getPort()); + // Must use an ISA, providing only a port would ignore the hostname given + TServerSocket transport = new TServerSocket(isa, (int) socketTimeout); String hostname, fqdn; try { ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services