HADOOP-12653. Use SO_REUSEADDR to avoid getting "Address already in use" when using kerberos and attempting to bind to any port on the local IP address (cmccabe)
This commit is contained in:
parent
25051c3bd0
commit
30c7dfd8ba
@ -659,6 +659,10 @@ Release 2.9.0 - UNRELEASED
|
||||
HADOOP-12663. Remove Hard-Coded Values From FileSystem.java.
|
||||
(BELUGA BEHR via stevel)
|
||||
|
||||
HADOOP-12653. Use SO_REUSEADDR to avoid getting "Address already in use"
|
||||
when using kerberos and attempting to bind to any port on the local IP
|
||||
address (cmccabe)
|
||||
|
||||
BUG FIXES
|
||||
|
||||
HADOOP-12655. TestHttpServer.testBindAddress bind port range is wider
|
||||
|
@ -625,6 +625,7 @@ private synchronized void setupConnection() throws IOException {
|
||||
// If host name is a valid local address then bind socket to it
|
||||
InetAddress localAddr = NetUtils.getLocalInetAddress(host);
|
||||
if (localAddr != null) {
|
||||
this.socket.setReuseAddress(true);
|
||||
this.socket.bind(new InetSocketAddress(localAddr, 0));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user