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

Prevent DataNode log spam if a client connects on the data transfer port but sends no data.

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.8.0, 3.0.0-alpha1
    • Component/s: datanode
    • Labels:
      None
    • Target Version/s:
    • Hadoop Flags:
      Reviewed

      Description

      Monitoring tools may choose to check liveness of the DataNode's data transfer port by connecting to it. The monitoring tool will close the connection immediately after establishment without sending any data. When this happens, the DataNode encounters an unexpected EOF and logs a full stack trace. This creates unneeded noise in the logs.

        Issue Links

          Activity

          Hide
          cnauroth Chris Nauroth added a comment -

          I'm attaching a patch. We already skipped logging the EOFException after at least one operation was sent on the connection. This patch just proposes that we lift the restriction that at least one operation must be sent. My experience is that the current logging of the EOFException is useless and distracting to operators.

          Since this patch is covering a side effect (logging), I didn't include an automated test. I did manual testing by running telnet localhost 50010 and then disconnecting immediately. Before this patch, I saw the EOFException logged. After this patch, the exception was not logged, but I still saw the debug message if I had debug logging enabled.

          Cc Arpit Agarwal, Jitendra Nath Pandey.

          Show
          cnauroth Chris Nauroth added a comment - I'm attaching a patch. We already skipped logging the EOFException after at least one operation was sent on the connection. This patch just proposes that we lift the restriction that at least one operation must be sent. My experience is that the current logging of the EOFException is useless and distracting to operators. Since this patch is covering a side effect (logging), I didn't include an automated test. I did manual testing by running telnet localhost 50010 and then disconnecting immediately. Before this patch, I saw the EOFException logged. After this patch, the exception was not logged, but I still saw the debug message if I had debug logging enabled. Cc Arpit Agarwal , Jitendra Nath Pandey .
          Hide
          arpitagarwal Arpit Agarwal added a comment -

          +1 for the patch, pending Jenkins.

          I also verified this manually with telnet. Nothing is logged at the default INFO level when the DN gets an unexpected EOFException.

          Show
          arpitagarwal Arpit Agarwal added a comment - +1 for the patch, pending Jenkins. I also verified this manually with telnet. Nothing is logged at the default INFO level when the DN gets an unexpected EOFException.
          Hide
          hadoopqa Hadoop QA added a comment -
          -1 overall



          Vote Subsystem Runtime Comment
          0 reexec 0m 0s Docker mode activated.
          +1 @author 0m 0s The patch does not contain any @author tags.
          -1 test4tests 0m 0s The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
          +1 mvninstall 7m 27s trunk passed
          +1 compile 0m 47s trunk passed with JDK v1.8.0_66
          +1 compile 0m 46s trunk passed with JDK v1.7.0_91
          +1 checkstyle 0m 18s trunk passed
          +1 mvnsite 0m 56s trunk passed
          +1 mvneclipse 0m 14s trunk passed
          +1 findbugs 2m 1s trunk passed
          +1 javadoc 1m 14s trunk passed with JDK v1.8.0_66
          +1 javadoc 1m 55s trunk passed with JDK v1.7.0_91
          +1 mvninstall 0m 54s the patch passed
          +1 compile 0m 49s the patch passed with JDK v1.8.0_66
          +1 javac 0m 49s the patch passed
          +1 compile 0m 46s the patch passed with JDK v1.7.0_91
          +1 javac 0m 46s the patch passed
          +1 checkstyle 0m 17s the patch passed
          +1 mvnsite 0m 58s the patch passed
          +1 mvneclipse 0m 14s the patch passed
          +1 whitespace 0m 0s Patch has no whitespace issues.
          +1 findbugs 2m 13s the patch passed
          +1 javadoc 1m 12s the patch passed with JDK v1.8.0_66
          +1 javadoc 1m 53s the patch passed with JDK v1.7.0_91
          -1 unit 60m 10s hadoop-hdfs in the patch failed with JDK v1.8.0_66.
          -1 unit 50m 11s hadoop-hdfs in the patch failed with JDK v1.7.0_91.
          -1 asflicense 0m 25s Patch generated 58 ASF License warnings.
          138m 28s



          Reason Tests
          JDK v1.8.0_66 Failed junit tests hadoop.hdfs.server.namenode.ha.TestSeveralNameNodes
            hadoop.hdfs.server.namenode.TestNNThroughputBenchmark
            hadoop.hdfs.server.namenode.snapshot.TestSnapshotBlocksMap
            hadoop.hdfs.TestDFSUpgradeFromImage
            hadoop.hdfs.TestParallelShortCircuitReadUnCached
            hadoop.hdfs.server.datanode.TestBlockScanner
          JDK v1.7.0_91 Failed junit tests hadoop.hdfs.TestDFSUpgradeFromImage
            hadoop.hdfs.TestRenameWhileOpen



          Subsystem Report/Notes
          Docker Image:yetus/hadoop:0ca8df7
          JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12778281/HDFS-9572.001.patch
          JIRA Issue HDFS-9572
          Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
          uname Linux e838bb8096b3 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
          Build tool maven
          Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
          git revision trunk / 8d278d8
          findbugs v3.0.0
          unit https://builds.apache.org/job/PreCommit-HDFS-Build/13919/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.8.0_66.txt
          unit https://builds.apache.org/job/PreCommit-HDFS-Build/13919/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.7.0_91.txt
          unit test logs https://builds.apache.org/job/PreCommit-HDFS-Build/13919/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.8.0_66.txt https://builds.apache.org/job/PreCommit-HDFS-Build/13919/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.7.0_91.txt
          JDK v1.7.0_91 Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/13919/testReport/
          asflicense https://builds.apache.org/job/PreCommit-HDFS-Build/13919/artifact/patchprocess/patch-asflicense-problems.txt
          modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs
          Max memory used 76MB
          Powered by Apache Yetus 0.2.0-SNAPSHOT http://yetus.apache.org
          Console output https://builds.apache.org/job/PreCommit-HDFS-Build/13919/console

          This message was automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 reexec 0m 0s Docker mode activated. +1 @author 0m 0s The patch does not contain any @author tags. -1 test4tests 0m 0s The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. +1 mvninstall 7m 27s trunk passed +1 compile 0m 47s trunk passed with JDK v1.8.0_66 +1 compile 0m 46s trunk passed with JDK v1.7.0_91 +1 checkstyle 0m 18s trunk passed +1 mvnsite 0m 56s trunk passed +1 mvneclipse 0m 14s trunk passed +1 findbugs 2m 1s trunk passed +1 javadoc 1m 14s trunk passed with JDK v1.8.0_66 +1 javadoc 1m 55s trunk passed with JDK v1.7.0_91 +1 mvninstall 0m 54s the patch passed +1 compile 0m 49s the patch passed with JDK v1.8.0_66 +1 javac 0m 49s the patch passed +1 compile 0m 46s the patch passed with JDK v1.7.0_91 +1 javac 0m 46s the patch passed +1 checkstyle 0m 17s the patch passed +1 mvnsite 0m 58s the patch passed +1 mvneclipse 0m 14s the patch passed +1 whitespace 0m 0s Patch has no whitespace issues. +1 findbugs 2m 13s the patch passed +1 javadoc 1m 12s the patch passed with JDK v1.8.0_66 +1 javadoc 1m 53s the patch passed with JDK v1.7.0_91 -1 unit 60m 10s hadoop-hdfs in the patch failed with JDK v1.8.0_66. -1 unit 50m 11s hadoop-hdfs in the patch failed with JDK v1.7.0_91. -1 asflicense 0m 25s Patch generated 58 ASF License warnings. 138m 28s Reason Tests JDK v1.8.0_66 Failed junit tests hadoop.hdfs.server.namenode.ha.TestSeveralNameNodes   hadoop.hdfs.server.namenode.TestNNThroughputBenchmark   hadoop.hdfs.server.namenode.snapshot.TestSnapshotBlocksMap   hadoop.hdfs.TestDFSUpgradeFromImage   hadoop.hdfs.TestParallelShortCircuitReadUnCached   hadoop.hdfs.server.datanode.TestBlockScanner JDK v1.7.0_91 Failed junit tests hadoop.hdfs.TestDFSUpgradeFromImage   hadoop.hdfs.TestRenameWhileOpen Subsystem Report/Notes Docker Image:yetus/hadoop:0ca8df7 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12778281/HDFS-9572.001.patch JIRA Issue HDFS-9572 Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux e838bb8096b3 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / 8d278d8 findbugs v3.0.0 unit https://builds.apache.org/job/PreCommit-HDFS-Build/13919/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.8.0_66.txt unit https://builds.apache.org/job/PreCommit-HDFS-Build/13919/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.7.0_91.txt unit test logs https://builds.apache.org/job/PreCommit-HDFS-Build/13919/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.8.0_66.txt https://builds.apache.org/job/PreCommit-HDFS-Build/13919/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.7.0_91.txt JDK v1.7.0_91 Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/13919/testReport/ asflicense https://builds.apache.org/job/PreCommit-HDFS-Build/13919/artifact/patchprocess/patch-asflicense-problems.txt modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs Max memory used 76MB Powered by Apache Yetus 0.2.0-SNAPSHOT http://yetus.apache.org Console output https://builds.apache.org/job/PreCommit-HDFS-Build/13919/console This message was automatically generated.
          Hide
          cnauroth Chris Nauroth added a comment -

          The license warnings are a known issue tracked in HDFS-9571. There are no new license warnings introduced by this patch.

          The failure in TestDFSUpgradeFromImage was just introduced by HDFS-9569. I have reverted that patch and reopened the issue.

          I cannot get a repro of the remaining failures. I've been seeing a lot of pre-commit errors lately that look like permission errors trying to access standard shared libraries from shell utilities.

          Tests run: 7, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 29.453 sec <<< FAILURE! - in org.apache.hadoop.hdfs.server.namenode.snapshot.TestSnapshotBlocksMap
          testDeletionWithZeroSizeBlock3(org.apache.hadoop.hdfs.server.namenode.snapshot.TestSnapshotBlocksMap)  Time elapsed: 0.89 sec  <<< ERROR!
          java.lang.RuntimeException: Error while running command to get file permissions : ExitCodeException exitCode=127: /bin/ls: error while loading shared libraries: libacl.so.1: failed to map segment from shared object: Permission denied
          

          This is going to need further investigation.

          I'm going to commit this patch.

          Show
          cnauroth Chris Nauroth added a comment - The license warnings are a known issue tracked in HDFS-9571 . There are no new license warnings introduced by this patch. The failure in TestDFSUpgradeFromImage was just introduced by HDFS-9569 . I have reverted that patch and reopened the issue. I cannot get a repro of the remaining failures. I've been seeing a lot of pre-commit errors lately that look like permission errors trying to access standard shared libraries from shell utilities. Tests run: 7, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 29.453 sec <<< FAILURE! - in org.apache.hadoop.hdfs.server.namenode.snapshot.TestSnapshotBlocksMap testDeletionWithZeroSizeBlock3(org.apache.hadoop.hdfs.server.namenode.snapshot.TestSnapshotBlocksMap) Time elapsed: 0.89 sec <<< ERROR! java.lang.RuntimeException: Error while running command to get file permissions : ExitCodeException exitCode=127: /bin/ls: error while loading shared libraries: libacl.so.1: failed to map segment from shared object: Permission denied This is going to need further investigation. I'm going to commit this patch.
          Hide
          cnauroth Chris Nauroth added a comment -

          I have committed this to trunk, branch-2 and branch-2.8. Arpit, thank you for the code review.

          Show
          cnauroth Chris Nauroth added a comment - I have committed this to trunk, branch-2 and branch-2.8. Arpit, thank you for the code review.
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-trunk-Commit #8990 (See https://builds.apache.org/job/Hadoop-trunk-Commit/8990/)
          HDFS-9572. Prevent DataNode log spam if a client connects on the data (cnauroth: rev 03bab8dea163a9ee45d09d2a0483d45cf6fe57c9)

          • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataXceiver.java
          • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-trunk-Commit #8990 (See https://builds.apache.org/job/Hadoop-trunk-Commit/8990/ ) HDFS-9572 . Prevent DataNode log spam if a client connects on the data (cnauroth: rev 03bab8dea163a9ee45d09d2a0483d45cf6fe57c9) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataXceiver.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt

            People

            • Assignee:
              cnauroth Chris Nauroth
              Reporter:
              cnauroth Chris Nauroth
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development