|
@@ -1900,11 +1900,7 @@ public abstract class Server {
|
|
|
* Address to which the socket is connected to.
|
|
|
*/
|
|
|
private final InetAddress addr;
|
|
|
- /**
|
|
|
- * Client Host address from where the socket connection is being established to the Server.
|
|
|
- */
|
|
|
- private final String hostName;
|
|
|
-
|
|
|
+
|
|
|
IpcConnectionContextProto connectionContext;
|
|
|
String protocolName;
|
|
|
SaslServer saslServer;
|
|
@@ -1947,12 +1943,9 @@ public abstract class Server {
|
|
|
this.isOnAuxiliaryPort = isOnAuxiliaryPort;
|
|
|
if (addr == null) {
|
|
|
this.hostAddress = "*Unknown*";
|
|
|
- this.hostName = this.hostAddress;
|
|
|
} else {
|
|
|
// host IP address
|
|
|
this.hostAddress = addr.getHostAddress();
|
|
|
- // host name for the IP address
|
|
|
- this.hostName = addr.getHostName();
|
|
|
}
|
|
|
this.remotePort = socket.getPort();
|
|
|
this.responseQueue = new LinkedList<RpcCall>();
|
|
@@ -1968,7 +1961,7 @@ public abstract class Server {
|
|
|
|
|
|
@Override
|
|
|
public String toString() {
|
|
|
- return hostName + ":" + remotePort + " / " + hostAddress + ":" + remotePort;
|
|
|
+ return hostAddress + ":" + remotePort;
|
|
|
}
|
|
|
|
|
|
boolean setShouldClose() {
|
|
@@ -2371,6 +2364,7 @@ public abstract class Server {
|
|
|
}
|
|
|
|
|
|
if (!RpcConstants.HEADER.equals(dataLengthBuffer)) {
|
|
|
+ final String hostName = addr == null ? this.hostAddress : addr.getHostName();
|
|
|
LOG.warn("Incorrect RPC Header length from {}:{} / {}:{}. Expected: {}. Actual: {}",
|
|
|
hostName, remotePort, hostAddress, remotePort, RpcConstants.HEADER,
|
|
|
dataLengthBuffer);
|
|
@@ -2378,6 +2372,7 @@ public abstract class Server {
|
|
|
return -1;
|
|
|
}
|
|
|
if (version != CURRENT_VERSION) {
|
|
|
+ final String hostName = addr == null ? this.hostAddress : addr.getHostName();
|
|
|
//Warning is ok since this is not supposed to happen.
|
|
|
LOG.warn("Version mismatch from {}:{} / {}:{}. "
|
|
|
+ "Expected version: {}. Actual version: {} ", hostName,
|