Hadoop Common
  1. Hadoop Common
  2. HADOOP-8786

HttpServer continues to start even if AuthenticationFilter fails to init

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.2.0, 3.0.0, 2.0.1-alpha
    • Fix Version/s: 1.2.0, 3.0.0, 2.0.3-alpha
    • Component/s: None
    • Labels:
      None
    • Target Version/s:
    • Hadoop Flags:
      Reviewed

      Description

      As seen in HDFS-3904, if the AuthenticationFilter fails to initialize, the web server will continue to start up. We need to check for context initialization errors after starting the server.

      1. hadoop-8786.txt
        3 kB
        Todd Lipcon
      2. HADOOP-8786-branch-2.patch
        2 kB
        Uma Maheswara Rao G
      3. HADOOP-8786-branch-1.patch
        2 kB
        Uma Maheswara Rao G

        Issue Links

          Activity

          Hide
          Todd Lipcon added a comment -

          Tested this patch with a new unit test, and also verified that it solved the symptoms seen in HDFS-3904.

          Show
          Todd Lipcon added a comment - Tested this patch with a new unit test, and also verified that it solved the symptoms seen in HDFS-3904 .
          Hide
          Alejandro Abdelnur added a comment -

          +1 pending jenkins and assuming that that the jetty server start() method is synchronous/blocking regarding the contexts initialization (this is, until all contexts are initialized, start() does not complete).

          Show
          Alejandro Abdelnur added a comment - +1 pending jenkins and assuming that that the jetty server start() method is synchronous/blocking regarding the contexts initialization (this is, until all contexts are initialized, start() does not complete).
          Hide
          Hadoop QA added a comment -

          +1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12544566/hadoop-8786.txt
          against trunk revision .

          +1 @author. The patch does not contain any @author tags.

          +1 tests included. The patch appears to include 1 new or modified test files.

          +1 javac. The applied patch does not increase the total number of javac compiler warnings.

          +1 javadoc. The javadoc tool did not generate any warning messages.

          +1 eclipse:eclipse. The patch built with eclipse:eclipse.

          +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.

          +1 release audit. The applied patch does not increase the total number of release audit warnings.

          +1 core tests. The patch passed unit tests in hadoop-common-project/hadoop-common.

          +1 contrib tests. The patch passed contrib unit tests.

          Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/1434//testReport/
          Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/1434//console

          This message is automatically generated.

          Show
          Hadoop QA added a comment - +1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12544566/hadoop-8786.txt against trunk revision . +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 1 new or modified test files. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 javadoc. The javadoc tool did not generate any warning messages. +1 eclipse:eclipse. The patch built with eclipse:eclipse. +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed unit tests in hadoop-common-project/hadoop-common. +1 contrib tests. The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/1434//testReport/ Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/1434//console This message is automatically generated.
          Hide
          Uma Maheswara Rao G added a comment -

          is this Dupe of HADOOP-7688?

          Show
          Uma Maheswara Rao G added a comment - is this Dupe of HADOOP-7688 ?
          Hide
          Todd Lipcon added a comment -

          It's very similar to HADOOP-7688, but depends on the way in which the filter is initialized. I'm not super familiar with the Jetty internals, but it looks like this API call is using FilterHolders instead of FilterInitializers, which perhaps is what causes the difference.

          As for whether the start call is synchronous/blocking, it does appear to be. The stack trace shown in the exception shows the "HttpServer.start()" call on its backtrace, implying that it's on the same thread.

          Show
          Todd Lipcon added a comment - It's very similar to HADOOP-7688 , but depends on the way in which the filter is initialized. I'm not super familiar with the Jetty internals, but it looks like this API call is using FilterHolders instead of FilterInitializers, which perhaps is what causes the difference. As for whether the start call is synchronous/blocking, it does appear to be. The stack trace shown in the exception shows the "HttpServer.start()" call on its backtrace, implying that it's on the same thread.
          Hide
          Todd Lipcon added a comment -

          Committed to trunk.

          Should we backport both this and HADOOP-7688 to branch-2 and branch-1? What do you think, Uma/Alejandro?

          Show
          Todd Lipcon added a comment - Committed to trunk. Should we backport both this and HADOOP-7688 to branch-2 and branch-1? What do you think, Uma/Alejandro?
          Hide
          Uma Maheswara Rao G added a comment -

          Yes, IMO, we should backport this to branch-2 also. I have put the same question for backport in HADOOP-7688. It should be fine to port it to branch-1 as well.

          Show
          Uma Maheswara Rao G added a comment - Yes, IMO, we should backport this to branch-2 also. I have put the same question for backport in HADOOP-7688 . It should be fine to port it to branch-1 as well.
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Hdfs-trunk-Commit #2778 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/2778/)
          HADOOP-8786. HttpServer continues to start even if AuthenticationFilter fails to init. Contributed by Todd Lipcon. (Revision 1383254)

          Result = SUCCESS
          todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1383254
          Files :

          • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
          • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer.java
          • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/http/TestServletFilter.java
          Show
          Hudson added a comment - Integrated in Hadoop-Hdfs-trunk-Commit #2778 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/2778/ ) HADOOP-8786 . HttpServer continues to start even if AuthenticationFilter fails to init. Contributed by Todd Lipcon. (Revision 1383254) Result = SUCCESS todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1383254 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer.java /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/http/TestServletFilter.java
          Hide
          Todd Lipcon added a comment -

          k, reopening for backport. Do you have time to do them?

          Show
          Todd Lipcon added a comment - k, reopening for backport. Do you have time to do them?
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Common-trunk-Commit #2715 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/2715/)
          HADOOP-8786. HttpServer continues to start even if AuthenticationFilter fails to init. Contributed by Todd Lipcon. (Revision 1383254)

          Result = SUCCESS
          todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1383254
          Files :

          • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
          • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer.java
          • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/http/TestServletFilter.java
          Show
          Hudson added a comment - Integrated in Hadoop-Common-trunk-Commit #2715 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/2715/ ) HADOOP-8786 . HttpServer continues to start even if AuthenticationFilter fails to init. Contributed by Todd Lipcon. (Revision 1383254) Result = SUCCESS todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1383254 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer.java /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/http/TestServletFilter.java
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Mapreduce-trunk-Commit #2739 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/2739/)
          HADOOP-8786. HttpServer continues to start even if AuthenticationFilter fails to init. Contributed by Todd Lipcon. (Revision 1383254)

          Result = FAILURE
          todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1383254
          Files :

          • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
          • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer.java
          • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/http/TestServletFilter.java
          Show
          Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk-Commit #2739 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/2739/ ) HADOOP-8786 . HttpServer continues to start even if AuthenticationFilter fails to init. Contributed by Todd Lipcon. (Revision 1383254) Result = FAILURE todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1383254 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer.java /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/http/TestServletFilter.java
          Hide
          Uma Maheswara Rao G added a comment -

          Sure, I will take a look.

          Show
          Uma Maheswara Rao G added a comment - Sure, I will take a look.
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Hdfs-trunk #1162 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1162/)
          HADOOP-8786. HttpServer continues to start even if AuthenticationFilter fails to init. Contributed by Todd Lipcon. (Revision 1383254)

          Result = FAILURE
          todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1383254
          Files :

          • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
          • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer.java
          • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/http/TestServletFilter.java
          Show
          Hudson added a comment - Integrated in Hadoop-Hdfs-trunk #1162 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1162/ ) HADOOP-8786 . HttpServer continues to start even if AuthenticationFilter fails to init. Contributed by Todd Lipcon. (Revision 1383254) Result = FAILURE todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1383254 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer.java /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/http/TestServletFilter.java
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Mapreduce-trunk #1193 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1193/)
          HADOOP-8786. HttpServer continues to start even if AuthenticationFilter fails to init. Contributed by Todd Lipcon. (Revision 1383254)

          Result = SUCCESS
          todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1383254
          Files :

          • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
          • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer.java
          • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/http/TestServletFilter.java
          Show
          Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk #1193 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1193/ ) HADOOP-8786 . HttpServer continues to start even if AuthenticationFilter fails to init. Contributed by Todd Lipcon. (Revision 1383254) Result = SUCCESS todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1383254 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer.java /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/http/TestServletFilter.java
          Hide
          Uma Maheswara Rao G added a comment -

          Back-ported to branch-2 Committed revision 1384456. Attached ported patch.

          Show
          Uma Maheswara Rao G added a comment - Back-ported to branch-2 Committed revision 1384456. Attached ported patch.
          Hide
          Uma Maheswara Rao G added a comment -

          I will port this to branch-1 in some time later.

          Show
          Uma Maheswara Rao G added a comment - I will port this to branch-1 in some time later.
          Hide
          Todd Lipcon added a comment -

          Adding 2.0.3 to fixversions for Uma, who was having some JIRA troubles. Leaving open for commit to branch-1

          Show
          Todd Lipcon added a comment - Adding 2.0.3 to fixversions for Uma, who was having some JIRA troubles. Leaving open for commit to branch-1
          Hide
          Uma Maheswara Rao G added a comment -

          I have just committed to branch-1

          Show
          Uma Maheswara Rao G added a comment - I have just committed to branch-1

            People

            • Assignee:
              Todd Lipcon
              Reporter:
              Todd Lipcon
            • Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development