Index: src/main/java/org/apache/hadoop/hbase/catalog/CatalogTracker.java =================================================================== --- src/main/java/org/apache/hadoop/hbase/catalog/CatalogTracker.java (revision 1142139) +++ src/main/java/org/apache/hadoop/hbase/catalog/CatalogTracker.java (working copy) @@ -22,8 +22,10 @@ import java.io.EOFException; import java.io.IOException; import java.net.ConnectException; +import java.net.NoRouteToHostException; +import java.net.SocketException; import java.net.SocketTimeoutException; -import java.net.SocketException; +import java.util.Collection; import java.util.concurrent.atomic.AtomicBoolean; import org.apache.commons.logging.Log; @@ -37,6 +39,7 @@ import org.apache.hadoop.hbase.client.HConnection; import org.apache.hadoop.hbase.client.HConnectionManager; import org.apache.hadoop.hbase.client.RetriesExhaustedException; +import org.apache.hadoop.hbase.ipc.HMasterInterface; import org.apache.hadoop.hbase.ipc.HRegionInterface; import org.apache.hadoop.hbase.ipc.ServerNotRunningYetException; import org.apache.hadoop.hbase.util.Bytes; @@ -311,7 +314,19 @@ if (newLocation == null) { return null; } - HRegionInterface newConnection = getCachedConnection(newLocation); + + HRegionInterface newConnection = null; + try { + newConnection = getCachedConnection(newLocation); + } catch (IOException e) { + Collection servers = connection.getMaster().getClusterStatus().getServers(); + for (ServerName info : servers) { + newConnection = connection.getHRegionConnection( + info.getServerName(), info.getPort()); + break; + } + } + // HRegionInterface newConnection = getCachedConnection(newLocation); if (verifyRegionLocation(newConnection, this.metaLocation, META_REGION)) { setMetaLocation(newLocation); return newConnection; @@ -420,10 +435,10 @@ throw e; } } catch (SocketTimeoutException e) { - // Return 'protocol' == null. LOG.debug("Timed out connecting to " + sn); + } catch (NoRouteToHostException e) { + LOG.debug("no route connecting to " + sn); } catch (SocketException e) { - // Return 'protocol' == null. LOG.debug("Exception connecting to " + sn); } catch (IOException ioe) { Throwable cause = ioe.getCause();