Uploaded image for project: 'Flume'
  1. Flume
  2. FLUME-2441

Unit test TestHTTPSource.java failed with IBM JDK 1.7

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.5.0.1, 1.6.0
    • Fix Version/s: 1.5.1
    • Component/s: Sinks+Sources, Test
    • Labels:
    • Environment:

      RHEL server 6.3
      IBM JDK 1.7.0

      Description

      TestHTTPSource.java (under flume-ng-core/src/test/java/org/apache/flume/source/http) failed with IBM JDK 1.7. Oracle JDK 1.7 does not have this failure.

      -------------------------------------------------------------------------------
      Test set: org.apache.flume.source.http.TestHTTPSource
      -------------------------------------------------------------------------------
      Tests run: 14, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 12.535 sec <<< FAILURE!
      testHttps(org.apache.flume.source.http.TestHTTPSource) Time elapsed: 168 sec <<< FAILURE!
      junit.framework.AssertionFailedError: Exception not expected
      at junit.framework.Assert.fail(Assert.java:50)
      at org.apache.flume.source.http.TestHTTPSource.testHttps(TestHTTPSource.java:388)

      The root exception is:

      javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
      at com.ibm.jsse2.j.a(j.java:4)
      at com.ibm.jsse2.j.a(j.java:31)
      at com.ibm.jsse2.qc.b(qc.java:624)
      at com.ibm.jsse2.qc.a(qc.java:850)
      at com.ibm.jsse2.qc.h(qc.java:194)
      at com.ibm.jsse2.qc.a(qc.java:477)
      at com.ibm.jsse2.qc.startHandshake(qc.java:672)
      at com.ibm.net.ssl.www2.protocol.https.c.afterConnect(c.java:87)
      at com.ibm.net.ssl.www2.protocol.https.d.connect(d.java:21)
      at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1103)
      at com.ibm.net.ssl.www2.protocol.https.b.getOutputStream(b.java:75)
      at org.apache.flume.source.http.TestHTTPSource.testHttps(TestHTTPSource.java:372)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)2014-08-04 01:56:40,263 (1175282339@qtp-597224782-0) [WARN - org.mortbay.log.Slf4jLog.warn(Slf4jLog.java:89)] EXCEPTION
      javax.net.ssl.SSLHandshakeException: Client requested protocol SSLv3 not enabled or not supported
      at com.ibm.jsse2.j.a(j.java:4)
      at com.ibm.jsse2.qc.a(qc.java:513)
      at com.ibm.jsse2.ab.a(ab.java:385)
      at com.ibm.jsse2.ab.a(ab.java:96)
      at com.ibm.jsse2.cb.a(cb.java:501)
      at com.ibm.jsse2.cb.a(cb.java:409)
      at com.ibm.jsse2.ab.r(ab.java:489)
      at com.ibm.jsse2.ab.a(ab.java:65)
      at com.ibm.jsse2.qc.a(qc.java:359)
      at com.ibm.jsse2.qc.h(qc.java:194)
      at com.ibm.jsse2.qc.a(qc.java:477)
      at com.ibm.jsse2.qc.startHandshake(qc.java:672)
      at org.mortbay.jetty.security.SslSocketConnector$SslConnection.run(SslSocketConnector.java:708)
      at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)

      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:94)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
      at java.lang.reflect.Method.invoke(Method.java:619)
      at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
      at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
      at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
      at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
      at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
      at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
      at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
      at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
      at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
      at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
      at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
      at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
      at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30)
      at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
      at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:242)
      at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:137)
      at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:94)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
      at java.lang.reflect.Method.invoke(Method.java:619)
      at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
      at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
      at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
      at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
      at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)

        Issue Links

          Activity

          Hide
          water Xiang Li added a comment -

          The problem is that IBM JDK acts differently from Oracle JDK. For IBM JDK, we need to specify SSLContext.getInstance("SSL_TLS") to ensure the same behavior, rather than "SSL" for Oracle JDK.

          However, SSL_TLS does not apply to Oracle JDK. So the fix needs different specifications for SSLContext.getInstance() according to different JDK

          Show
          water Xiang Li added a comment - The problem is that IBM JDK acts differently from Oracle JDK. For IBM JDK, we need to specify SSLContext.getInstance("SSL_TLS") to ensure the same behavior, rather than "SSL" for Oracle JDK. However, SSL_TLS does not apply to Oracle JDK. So the fix needs different specifications for SSLContext.getInstance() according to different JDK
          Hide
          water Xiang Li added a comment -

          This patch is for 3 branches : trunk, flume-1.6 and flume-1.5

          Show
          water Xiang Li added a comment - This patch is for 3 branches : trunk, flume-1.6 and flume-1.5
          Hide
          hshreedharan Hari Shreedharan added a comment -

          +1. This will go into trunk and flume-1.6, not flume-1.5 since we are not planning any further releases off that branch (even if we did, we will do that only for specific commits)

          Show
          hshreedharan Hari Shreedharan added a comment - +1. This will go into trunk and flume-1.6, not flume-1.5 since we are not planning any further releases off that branch (even if we did, we will do that only for specific commits)
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 2ef2055d44986c4249bcf1e64aa39fbfc0c356df in flume's branch refs/heads/trunk from Hari Shreedharan
          [ https://git-wip-us.apache.org/repos/asf?p=flume.git;h=2ef2055 ]

          FLUME-2441. HTTP Source Unit tests fail on IBM JDK 7

          (Li Xiang via Hari)

          Show
          jira-bot ASF subversion and git services added a comment - Commit 2ef2055d44986c4249bcf1e64aa39fbfc0c356df in flume's branch refs/heads/trunk from Hari Shreedharan [ https://git-wip-us.apache.org/repos/asf?p=flume.git;h=2ef2055 ] FLUME-2441 . HTTP Source Unit tests fail on IBM JDK 7 (Li Xiang via Hari)
          Hide
          hshreedharan Hari Shreedharan added a comment -

          Committed!Thanks Li!

          Show
          hshreedharan Hari Shreedharan added a comment - Committed!Thanks Li!
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 24962ef3b04f4f2496349d901721622cc9d01bdd in flume's branch refs/heads/flume-1.6 from Hari Shreedharan
          [ https://git-wip-us.apache.org/repos/asf?p=flume.git;h=24962ef ]

          FLUME-2441. HTTP Source Unit tests fail on IBM JDK 7

          (Li Xiang via Hari)

          Show
          jira-bot ASF subversion and git services added a comment - Commit 24962ef3b04f4f2496349d901721622cc9d01bdd in flume's branch refs/heads/flume-1.6 from Hari Shreedharan [ https://git-wip-us.apache.org/repos/asf?p=flume.git;h=24962ef ] FLUME-2441 . HTTP Source Unit tests fail on IBM JDK 7 (Li Xiang via Hari)
          Hide
          hudson Hudson added a comment -

          UNSTABLE: Integrated in Flume-trunk-hbase-98 #9 (See https://builds.apache.org/job/Flume-trunk-hbase-98/9/)
          FLUME-2441. HTTP Source Unit tests fail on IBM JDK 7 (harishreedharan: http://git-wip-us.apache.org/repos/asf/flume/repo?p=flume.git&a=commit&h=2ef2055d44986c4249bcf1e64aa39fbfc0c356df)

          • flume-ng-core/src/test/java/org/apache/flume/source/http/TestHTTPSource.java
          Show
          hudson Hudson added a comment - UNSTABLE: Integrated in Flume-trunk-hbase-98 #9 (See https://builds.apache.org/job/Flume-trunk-hbase-98/9/ ) FLUME-2441 . HTTP Source Unit tests fail on IBM JDK 7 (harishreedharan: http://git-wip-us.apache.org/repos/asf/flume/repo?p=flume.git&a=commit&h=2ef2055d44986c4249bcf1e64aa39fbfc0c356df ) flume-ng-core/src/test/java/org/apache/flume/source/http/TestHTTPSource.java
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in flume-trunk #649 (See https://builds.apache.org/job/flume-trunk/649/)
          FLUME-2441. HTTP Source Unit tests fail on IBM JDK 7 (harishreedharan: http://git-wip-us.apache.org/repos/asf/flume/repo?p=flume.git&a=commit&h=2ef2055d44986c4249bcf1e64aa39fbfc0c356df)

          • flume-ng-core/src/test/java/org/apache/flume/source/http/TestHTTPSource.java
          Show
          hudson Hudson added a comment - FAILURE: Integrated in flume-trunk #649 (See https://builds.apache.org/job/flume-trunk/649/ ) FLUME-2441 . HTTP Source Unit tests fail on IBM JDK 7 (harishreedharan: http://git-wip-us.apache.org/repos/asf/flume/repo?p=flume.git&a=commit&h=2ef2055d44986c4249bcf1e64aa39fbfc0c356df ) flume-ng-core/src/test/java/org/apache/flume/source/http/TestHTTPSource.java
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 8229cc38a56a024859625dc1011b0333370c0617 in flume's branch refs/heads/flume-1.5 from Hari Shreedharan
          [ https://git-wip-us.apache.org/repos/asf?p=flume.git;h=8229cc3 ]

          FLUME-2441. HTTP Source Unit tests fail on IBM JDK 7

          (Li Xiang via Hari)

          Show
          jira-bot ASF subversion and git services added a comment - Commit 8229cc38a56a024859625dc1011b0333370c0617 in flume's branch refs/heads/flume-1.5 from Hari Shreedharan [ https://git-wip-us.apache.org/repos/asf?p=flume.git;h=8229cc3 ] FLUME-2441 . HTTP Source Unit tests fail on IBM JDK 7 (Li Xiang via Hari)
          Hide
          water Xiang Li added a comment -

          Hi Hari, this fix also goes into flume-1.5 ?

          Show
          water Xiang Li added a comment - Hi Hari, this fix also goes into flume-1.5 ?
          Hide
          hshreedharan Hari Shreedharan added a comment -

          It went into 1.5.1

          Show
          hshreedharan Hari Shreedharan added a comment - It went into 1.5.1

            People

            • Assignee:
              water Xiang Li
              Reporter:
              water Xiang Li
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 12h
                12h
                Remaining:
                Remaining Estimate - 12h
                12h
                Logged:
                Time Spent - Not Specified
                Not Specified

                  Development