带有Java8的ClosableHttpClient导致处理异常:javax.net.ssl.SSLException:不支持的记录版本未知

时间:2018-08-24 18:41:38

标签: java weblogic12c apache-httpcomponents

我关注了this线程,试图解决我的问题,但我做不到。

我从提供商处请求API。该提供商向所有客户端通知我们必须更新SSL协议。最低应为TLSv1.2。该请求是通过WebLogic 12.1.3和调用ClosableHttpClient的EJB发出的。

幸运的是,最近我们从Java 7迁移到了8,这使SSL协议TLSv1.2成为默认协议,并通过提供商的重新定名来实现。

但是,我看到类似间歇性失败的行为,大概每5次尝试(请求)就有1次。

我启用了SSL调试,试图找到更多信息进行研究,这是:

]
  Algorithm: [SHA1withRSA]
  Signature:
0000: CB 9C 37 AA 48 13 12 0A   FA DD 44 9C 4F 52 B0 F4  ..7.H.....D.OR..
0010: DF AE 04 F5 79 79 08 A3   24 18 FC 4B 2B 84 C0 2D  ....yy..$..K+..-
0020: B9 D5 C7 FE F4 C1 1F 58   CB B8 6D 9C 7A 74 E7 98  .......X..m.zt..
0030: 29 AB 11 B5 E3 70 A0 A1   CD 4C 88 99 93 8C 91 70  )....p...L.....p
0040: E2 AB 0F 1C BE 93 A9 FF   63 D5 E4 07 60 D3 A3 BF  ........c...`...
0050: 9D 5B 09 F1 D5 8E E3 53   F4 8E 63 FA 3F A7 DB B4  .[.....S..c.?...
0060: 66 DF 62 66 D6 D1 6E 41   8D F2 2D B5 EA 77 4A 9F  f.bf..nA..-..wJ.
0070: 9D 58 E2 2B 59 C0 40 23   ED 2D 28 82 45 3E 79 54  .X.+Y.@#.-(.E>yT
0080: 92 26 98 E0 80 48 A8 37   EF F0 D6 79 60 16 DE AC  .&...H.7...y`...
0090: E8 0E CD 6E AC 44 17 38   2F 49 DA E1 45 3E 2A B9  ...n.D.8/I..E>*.
00A0: 36 53 CF 3A 50 06 F7 2E   E8 C4 57 49 6C 61 21 18  6S.:P.....WIla!.
00B0: D5 04 AD 78 3C 2C 3A 80   6B A7 EB AF 15 14 E9 D8  ...x<,:.k.......
00C0: 89 C1 B9 38 6C E2 91 6C   8A FF 64 B9 77 25 57 30  ...8l..l..d.w%W0
00D0: C0 1B 24 A3 E1 DC E9 DF   47 7C B5 B4 24 08 05 30  ..$.....G...$..0
00E0: EC 2D BD 0B BF 45 BF 50   B9 A9 F3 EB 98 01 12 AD  .-...E.P........
00F0: C8 88 C6 98 34 5F 8D 0A   3C C6 E9 D5 95 95 6D DE  ....4_..<.....m.

]
[ACTIVE] ExecuteThread: '6' for queue: 'weblogic.kernel.Default (self-tuning)', READ: TLSv1.2 contentType = 0, length = 41
[ACTIVE] ExecuteThread: '6' for queue: 'weblogic.kernel.Default (self-tuning)', Received record type: 0
[ACTIVE] ExecuteThread: '6' for queue: 'weblogic.kernel.Default (self-tuning)', handling exception: javax.net.ssl.SSLException: Unsupported record version Unknown-178.235
%% Invalidated:  [Session-79, TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256]
[ACTIVE] ExecuteThread: '6' for queue: 'weblogic.kernel.Default (self-tuning)', SEND TLSv1.2 ALERT:  fatal, description = unexpected_message
[ACTIVE] ExecuteThread: '6' for queue: 'weblogic.kernel.Default (self-tuning)', WRITE: TLSv1.2 Alert, length = 2
[ACTIVE] ExecuteThread: '6' for queue: 'weblogic.kernel.Default (self-tuning)', called closeSocket()
[ACTIVE] ExecuteThread: '6' for queue: 'weblogic.kernel.Default (self-tuning)', called close()
[ACTIVE] ExecuteThread: '6' for queue: 'weblogic.kernel.Default (self-tuning)', called closeInternal(true)
gt.com.lyric.excepciones.FailedCommunicationHandler: Failed request test [Unsupported record version Unknown-178.235]
    at gt.com.lyric.provider.ProviderSmsApiBean.sendRequestClient(ProviderSmsApiBean.java:302) ~[ClienteWebServiceProvider-ejb-2.1.0.jar:?]
    at gt.com.lyric.provider.ProviderSmsApiBean.obtenerPrecioSms(ProviderSmsApiBean.java:174) [ClienteWebServiceProvider-ejb-2.1.0.jar:?]
    at gt.com.lyric.provider.ProviderSmsApiBean_a3jmv4_ProviderSmsApiBeanRemotoImpl.__WL_invoke(Unknown Source) [ProviderSmsApiBean_a3jmv4_ProviderSmsApiBeanRemotoImpl.class:?]
    at weblogic.ejb.container.internal.SessionRemoteMethodInvoker.invoke(SessionRemoteMethodInvoker.java:34) [weblogic.server.merged.jar:12.1.3.0.0]
    at gt.com.lyric.provider.ProviderSmsApiBean_a3jmv4_ProviderSmsApiBeanRemotoImpl.obtenerPrecioSms(Unknown Source) [ProviderSmsApiBean_a3jmv4_ProviderSmsApiBeanRemotoImpl.class:?]
    at gt.com.lyric.provider.ProviderSmsApiBean_a3jmv4_ProviderSmsApiBeanRemotoImpl_WLSkel.invoke(Unknown Source) [weblogic.server.merged.jar:?]
    at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:226) [weblogic.server.merged.jar:12.1.3.0.0]
    at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:474) [weblogic.server.merged.jar:12.1.3.0.0]
    at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:285) [weblogic.server.merged.jar:12.1.3.0.0]
    at gt.com.lyric.provider.ProviderSmsApiBean_a3jmv4_ProviderSmsApiBeanRemotoImpl_12130_WLStub.obtenerPrecioSms(Unknown Source) [weblogic.server.merged.jar:?]
    at sun.reflect.GeneratedMethodAccessor500.invoke(Unknown Source) ~[?:?]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_144]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_144]
    at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.invoke(RemoteBusinessIntfProxy.java:84) [weblogic.server.merged.jar:12.1.3.0.0]
    at com.sun.proxy.$Proxy171.getPriceSms(Unknown Source) [?:?]
    at gt.com.mgdbean.PromotionsSMS.init(PromotionsSMS.java:111) [_wl_cls_gen.jar:?]
    at sun.reflect.GeneratedMethodAccessor413.invoke(Unknown Source) ~[?:?]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_144]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_144]
    at com.oracle.pitchfork.inject.Jsr250Metadata.invokeLifecycleMethod(Jsr250Metadata.java:377) [weblogic.server.merged.jar:12.1.3.0.0]
    at com.oracle.pitchfork.inject.Jsr250Metadata.invokeLifecycleMethods(Jsr250Metadata.java:352) [weblogic.server.merged.jar:12.1.3.0.0]
    at weblogic.servlet.internal.WebComponentContributor.invokeLifecycleMethods(WebComponentContributor.java:328) [weblogic.server.merged.jar:12.1.3.0.0]
    at weblogic.servlet.internal.WebComponentContributor.notifyPostConstruct(WebComponentContributor.java:311) [weblogic.server.merged.jar:12.1.3.0.0]
    at com.bea.faces.WeblogicInjectionProvider.invokePostConstruct(WeblogicInjectionProvider.java:38) [glassfish.jsf_2.0.0.0_2-1-20.jar:2.0.0.0_2-1-20]
    at com.sun.faces.mgbean.BeanBuilder.invokePostConstruct(BeanBuilder.java:223) [glassfish.jsf_2.0.0.0_2-1-20.jar:2.0.0.0_2-1-20]
    at com.sun.faces.mgbean.BeanBuilder.build(BeanBuilder.java:105) [glassfish.jsf_2.0.0.0_2-1-20.jar:2.0.0.0_2-1-20]
    at com.sun.faces.mgbean.BeanManager.createAndPush(BeanManager.java:408) [glassfish.jsf_2.0.0.0_2-1-20.jar:2.0.0.0_2-1-20]
    at com.sun.faces.mgbean.BeanManager.create(BeanManager.java:268) [glassfish.jsf_2.0.0.0_2-1-20.jar:2.0.0.0_2-1-20]
    at com.sun.faces.el.ManagedBeanELResolver.resolveBean(ManagedBeanELResolver.java:244) [glassfish.jsf_2.0.0.0_2-1-20.jar:2.0.0.0_2-1-20]
    at com.sun.faces.el.ManagedBeanELResolver.getValue(ManagedBeanELResolver.java:116) [glassfish.jsf_2.0.0.0_2-1-20.jar:2.0.0.0_2-1-20]
    at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176) [glassfish.jsf_2.0.0.0_2-1-20.jar:2.0.0.0_2-1-20]
    at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203) [glassfish.jsf_2.0.0.0_2-1-20.jar:2.0.0.0_2-1-20]
    at com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:103) [weblogic.server.merged.jar:12.1.3.0.0]
    at com.sun.el.parser.AstValue.getValue(AstValue.java:179) [weblogic.server.merged.jar:12.1.3.0.0]
    at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:224) [weblogic.server.merged.jar:12.1.3.0.0]
    at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:109) [glassfish.jsf_2.0.0.0_2-1-20.jar:2.0.0.0_2-1-20]
    at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:194) [glassfish.jsf_2.0.0.0_2-1-20.jar:2.0.0.0_2-1-20]
    at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:182) [glassfish.jsf_2.0.0.0_2-1-20.jar:2.0.0.0_2-1-20]
    at javax.faces.component.UIOutput.getValue(UIOutput.java:170) [glassfish.jsf_2.0.0.0_2-1-20.jar:2.0.0.0_2-1-20]
    at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getValue(HtmlBasicInputRenderer.java:205) [glassfish.jsf_2.0.0.0_2-1-20.jar:2.0.0.0_2-1-20]
    at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getCurrentValue(HtmlBasicRenderer.java:355) [glassfish.jsf_2.0.0.0_2-1-20.jar:2.0.0.0_2-1-20]
    at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeEnd(HtmlBasicRenderer.java:164) [glassfish.jsf_2.0.0.0_2-1-20.jar:2.0.0.0_2-1-20]
    at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:881) [glassfish.jsf_2.0.0.0_2-1-20.jar:2.0.0.0_2-1-20]
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1786) [glassfish.jsf_2.0.0.0_2-1-20.jar:2.0.0.0_2-1-20]
    at javax.faces.render.Renderer.encodeChildren(Renderer.java:168) [glassfish.jsf_2.0.0.0_2-1-20.jar:2.0.0.0_2-1-20]
    at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:851) [glassfish.jsf_2.0.0.0_2-1-20.jar:2.0.0.0_2-1-20]
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1779) [glassfish.jsf_2.0.0.0_2-1-20.jar:2.0.0.0_2-1-20]
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1782) [glassfish.jsf_2.0.0.0_2-1-20.jar:2.0.0.0_2-1-20]
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1782) [glassfish.jsf_2.0.0.0_2-1-20.jar:2.0.0.0_2-1-20]
    at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:448) [glassfish.jsf_2.0.0.0_2-1-20.jar:2.0.0.0_2-1-20]
    at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:124) [glassfish.jsf_2.0.0.0_2-1-20.jar:2.0.0.0_2-1-20]
    at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120) [glassfish.jsf_2.0.0.0_2-1-20.jar:2.0.0.0_2-1-20]
    at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) [glassfish.jsf_2.0.0.0_2-1-20.jar:2.0.0.0_2-1-20]
    at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139) [glassfish.jsf_2.0.0.0_2-1-20.jar:2.0.0.0_2-1-20]
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594) [glassfish.jsf_2.0.0.0_2-1-20.jar:2.0.0.0_2-1-20]
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:280) [weblogic.server.merged.jar:12.1.3.0.0]
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:254) [weblogic.server.merged.jar:12.1.3.0.0]
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:136) [weblogic.server.merged.jar:12.1.3.0.0]
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:346) [weblogic.server.merged.jar:12.1.3.0.0]
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:25) [weblogic.server.merged.jar:12.1.3.0.0]
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79) [weblogic.server.merged.jar:12.1.3.0.0]
    at org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:100) [primefaces-6.0.jar:6.0]
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79) [weblogic.server.merged.jar:12.1.3.0.0]
    at gt.com.lyric.segcurity.util.FiltreApp.doFilter(FiltroAplicaciones.java:53) [Seguridad-1.5.0.jar:?]
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79) [weblogic.server.merged.jar:12.1.3.0.0]
    at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27) [weblogic.server.merged.jar:12.1.3.0.0]
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79) [weblogic.server.merged.jar:12.1.3.0.0]
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3436) [weblogic.server.merged.jar:12.1.3.0.0]
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3402) [weblogic.server.merged.jar:12.1.3.0.0]
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) [weblogic.server.merged.jar:12.1.3.0.0]
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120) [com.oracle.css.weblogic.security.wls_7.1.0.0.jar:CSS 7.1 0.0]
    at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57) [weblogic.server.merged.jar:12.1.3.0.0]
    at weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2285) [weblogic.server.merged.jar:12.1.3.0.0]
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2201) [weblogic.server.merged.jar:12.1.3.0.0]
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179) [weblogic.server.merged.jar:12.1.3.0.0]
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1572) [weblogic.server.merged.jar:12.1.3.0.0]
    at weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSupportProviderImpl.java:255) [weblogic.server.merged.jar:12.1.3.0.0]
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311) [weblogic.server.merged.jar:12.1.3.0.0]
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:263) [weblogic.server.merged.jar:12.1.3.0.0]

任何帮助,都会很好。

0 个答案:

没有答案