Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-3618

SSH fencing option may incorrectly succeed if nc (netcat) command not present


    • Type: Bug
    • Status: Patch Available
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.0.0-alpha
    • Fix Version/s: None
    • Component/s: auto-failover
    • Labels:
    • Target Version/s:


      Started NN's and zkfc's in Suse11.
      Suse11 will have netcat installation and netcat -z will work(but nc -z wn't work)..
      While executing following command, got command not found hence rc will be other than zero and assuming that server was down..Here we are ending up without checking whether service is down or not..

                  "Indeterminate response from trying to kill service. " +
                  "Verifying whether it is running using nc...");
              rc = execCommand(session, "nc -z " + serviceAddr.getHostName() +
                  " " + serviceAddr.getPort());
              if (rc == 0) {
                // the service is still listening - we are unable to fence
                LOG.warn("Unable to fence - it is running but we cannot kill it");
                return false;
              } else {
                LOG.info("Verified that the service is down.");
                return true;          


        1. HDFS-3618.patch
          8 kB
          Vinayakumar B
        2. HDFS-3618.patch
          9 kB
          Vinayakumar B
        3. HDFS-3618.patch
          6 kB
          Vinayakumar B
        4. HDFS-3618-04.patch
          9 kB
          Vinayakumar B
        5. zkfc_threaddump.out
          93 kB
          Brahma Reddy Battula
        6. zkfc.txt
          184 kB
          Brahma Reddy Battula

          Issue Links



              • Assignee:
                vinayakumarb Vinayakumar B
                brahmareddy Brahma Reddy Battula
              • Votes:
                1 Vote for this issue
                16 Start watching this issue


                • Created: