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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Patch Available
    • Major
    • Resolution: Unresolved
    • 2.0.0-alpha
    • None
    • auto-failover

    Description

      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..

      LOG.info(
                  "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;          
              }
      
      

      Attachments

        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

          Activity

            People

              vinayakumarb Vinayakumar B
              brahmareddy Brahma Reddy Battula
              Votes:
              1 Vote for this issue
              Watchers:
              14 Start watching this issue

              Dates

                Created:
                Updated: