private static boolean isReachable(String addr,int openPort,int timeOutMillis){
  try {
    try (Socket soc=new Socket()){
      soc.connect(new InetSocketAddress(addr,openPort),timeOutMillis);
    }
     return true;
  }
 catch (  IOException ex) {
    LOGGER.warn("socket connection failed:  ",ex);
    return false;
  }
}

private static boolean isReachable ( String addr , int openPort , int timeOutMillis ) { try { try ( Socket soc = new Socket ( ) ) { soc . connect ( new InetSocketAddress ( addr , openPort ) , timeOutMillis ) ; } return true ; } catch ( IOException ex ) { LOGGER . warn ( "socket connection failed:  " , ex ) ; return false ; } }
check if remote master is reachable
