赞
踩
java调用hutool工具类中的createPost方法,出错:
cn.hutool.core.io.IORuntimeException: SSLException: Received fatal alert: internal_error
jdk版本:1.8.0.131
报错如下
- cn.hutool.core.io.IORuntimeException: SSLException: Received fatal alert: internal_error
- at cn.hutool.http.HttpRequest.send(HttpRequest.java:1231)
- at cn.hutool.http.HttpRequest.doExecute(HttpRequest.java:1113)
- at cn.hutool.http.HttpRequest.execute(HttpRequest.java:1004)
- at cn.hutool.http.HttpRequest.execute(HttpRequest.java:980)
- at com.nft.web.controller.nft.NftTestController.testbycode(NftTestController.java:255)
- at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
- at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
- at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
- at java.lang.reflect.Method.invoke(Method.java:498)
- at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)
- at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)
- at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)
- at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:898)
- at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:809)
- at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
- at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1072)
- at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:965)
- at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
- at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898)
- at javax.servlet.http.HttpServlet.service(HttpServlet.java:645)
- at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
- at javax.servlet.http.HttpServlet.service(HttpServlet.java:750)
- at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)
- at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
- at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
- at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
- at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
- at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)
- at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
- at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
- at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)
- at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
- at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
- at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:114)
- at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
- at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
- at com.nft.common.filter.RepeatableFilter.doFilter(RepeatableFilter.java:39)
- at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
- at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
- at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327)
- at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)
- at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81)
- at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
- at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:121)
- at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:115)
- at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
- at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)
- at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)
- at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
- at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:105)
- at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
- at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)
- at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
- at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)
- at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
- at com.nft.framework.security.filter.JwtAuthenticationTokenFilter.doFilterInternal(JwtAuthenticationTokenFilter.java:50)
- at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
- at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
- at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)
- at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
- at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)
- at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)
- at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
- at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91)
- at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
- at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
- at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)
- at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)
- at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
- at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
- at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:110)
- at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)
- at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
- at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)
- at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
- at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
- at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211)
- at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183)
- at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)
- at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)
- at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
- at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
- at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
- at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
- at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
- at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
- at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
- at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
- at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
- at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
- at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
- at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
- at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
- at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
- at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)
- at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
- at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
- at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)
- at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
- at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
- at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:360)
- at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)
- at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
- at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:890)
- at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1743)
- at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
- at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
- at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
- at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
- at java.lang.Thread.run(Thread.java:748)
- Caused by: javax.net.ssl.SSLException: Received fatal alert: internal_error
- at sun.security.ssl.Alerts.getSSLException(Alerts.java:208)
- at sun.security.ssl.Alerts.getSSLException(Alerts.java:154)
- at sun.security.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:2023)
- at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1125)
- at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375)
- at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403)
- at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387)
- at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559)
- at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
- at sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(HttpURLConnection.java:1316)
- at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1291)
- at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:250)
- at cn.hutool.http.HttpConnection.getOutputStream(HttpConnection.java:449)
- at cn.hutool.http.HttpRequest.sendFormUrlEncoded(HttpRequest.java:1254)
- at cn.hutool.http.HttpRequest.send(HttpRequest.java:1223)
- ... 109 common frames omitted
找了一圈资料都没用,找的资料也贴出来
原文链接:https://blog.csdn.net/xiao__jia__jia/article/details/123752327
终极解决方案: 升级jdk版本, 由1.8.0.131 升级至 1.8.0.412 完美解决
linux在线升级步骤:
第一步:yum查看可用jdk版本
yum list | grep jdk
第二步:安装升级
yum install java-1.8.0-openjdk.x86_64
等jdk更新完,重启java服务,再试试接口调用
补充一句: 如果用xsehll 链接linux窗口,需要关闭窗口重新打开,java -version 才会生效
Over~~ ,完美解决。回见了您内
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。