diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java index cdc97bfd118..bd3342ba15b 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java @@ -2603,7 +2603,7 @@ public class RpcServer implements RpcServerInterface, ConfigurationObserver { */ public static InetAddress getRemoteIp() { Call call = CurCall.get(); - if (call != null && call.connection.socket != null) { + if (call != null && call.connection != null && call.connection.socket != null) { return call.connection.socket.getInetAddress(); } return null;