Index: src/main/java/org/apache/hadoop/hbase/ipc/HBaseRPC.java =================================================================== --- src/main/java/org/apache/hadoop/hbase/ipc/HBaseRPC.java (revision 1334872) +++ src/main/java/org/apache/hadoop/hbase/ipc/HBaseRPC.java (working copy) @@ -243,22 +243,12 @@ if (ioex instanceof ConnectException) { ce = (ConnectException) ioex; ioe = ce; - } else if (ioex.getCause() != null - && ioex.getCause() instanceof ConnectException) { - ce = (ConnectException) ioex.getCause(); - ioe = ce; - } else if (ioex.getMessage().toLowerCase() - .contains("connection refused")) { - ce = new ConnectException(ioex.getMessage()); - ioe = ce; } else { // This is the exception we can't handle. - ioe = ioex; + throw ioex; } - if (ce != null) { - handleConnectionException(++reconnectAttempts, maxAttempts, protocol, - addr, ce); - } + handleConnectionException(++reconnectAttempts, maxAttempts, protocol, + addr, ce); } // check if timed out if (System.currentTimeMillis()-timeout >= startTime) {