gradlew build出现Exception in thread "main" javax.net.ssl.SSLException: 怎么办?

来源:3-4 -配置Wrapper,运行程序

网上冲浪777

2019-05-10

D:\Blogstudy\hello-world>gradlew build
Downloading https://services.gradle.org/distributions/gradle-3.5.1-bin.zip

Exception in thread “main” javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLException: java.net.SocketException: Connection reset
at sun.security.ssl.SSLSocketImpl.checkEOF(SSLSocketImpl.java:1533)
at sun.security.ssl.AppInputStream.available(AppInputStream.java:60)
at java.io.BufferedInputStream.available(BufferedInputStream.java:410)
at sun.net.www.MeteredStream.available(MeteredStream.java:170)
at sun.net.www.http.KeepAliveStream.close(KeepAliveStream.java:85)
at java.io.FilterInputStream.close(FilterInputStream.java:181)
at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.close(HttpURLConnection.java:3517)
at org.gradle.wrapper.Download.downloadInternal(Download.java:91)
at org.gradle.wrapper.Download.download(Download.java:51)
at org.gradle.wrapper.Install$1.call(Install.java:62)
at org.gradle.wrapper.Install1.call(Install.java:48)atorg.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:69)atorg.gradle.wrapper.Install.createDist(Install.java:48)atorg.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:107)atorg.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)Causedby:javax.net.ssl.SSLException:java.net.SocketException:Connectionresetatsun.security.ssl.Alerts.getSSLException(Alerts.java:208)atsun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1946)atsun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1903)atsun.security.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1867)atsun.security.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1812)atsun.security.ssl.AppInputStream.read(AppInputStream.java:116)atjava.io.BufferedInputStream.read1(BufferedInputStream.java:284)atjava.io.BufferedInputStream.read(BufferedInputStream.java:345)atsun.net.www.MeteredStream.read(MeteredStream.java:134)atjava.io.FilterInputStream.read(FilterInputStream.java:133)atsun.net.www.protocol.http.HttpURLConnection1.call(Install.java:48) at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:69) at org.gradle.wrapper.Install.createDist(Install.java:48) at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:107) at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61) Caused by: javax.net.ssl.SSLException: java.net.SocketException: Connection reset at sun.security.ssl.Alerts.getSSLException(Alerts.java:208) at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1946) at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1903) at sun.security.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1867) at sun.security.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1812) at sun.security.ssl.AppInputStream.read(AppInputStream.java:116) at java.io.BufferedInputStream.read1(BufferedInputStream.java:284) at java.io.BufferedInputStream.read(BufferedInputStream.java:345) at sun.net.www.MeteredStream.read(MeteredStream.java:134) at java.io.FilterInputStream.read(FilterInputStream.java:133) at sun.net.www.protocol.http.HttpURLConnection1.call(Install.java:48)atorg.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:69)atorg.gradle.wrapper.Install.createDist(Install.java:48)atorg.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:107)atorg.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)Causedby:javax.net.ssl.SSLException:java.net.SocketException:Connectionresetatsun.security.ssl.Alerts.getSSLException(Alerts.java:208)atsun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1946)atsun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1903)atsun.security.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1867)atsun.security.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1812)atsun.security.ssl.AppInputStream.read(AppInputStream.java:116)atjava.io.BufferedInputStream.read1(BufferedInputStream.java:284)atjava.io.BufferedInputStream.read(BufferedInputStream.java:345)atsun.net.www.MeteredStream.read(MeteredStream.java:134)atjava.io.FilterInputStream.read(FilterInputStream.java:133)atsun.net.www.protocol.http.HttpURLConnectionHttpInputStream.read(HttpURLConnection.java:3444)
at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:3437)
at org.gradle.wrapper.Download.downloadInternal(Download.java:72)
… 7 more
Caused by: java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:210)
at java.net.SocketInputStream.read(SocketInputStream.java:141)
at sun.security.ssl.InputRecord.readFully(InputRecord.java:465)
at sun.security.ssl.InputRecord.readV3Record(InputRecord.java:593)
at sun.security.ssl.InputRecord.read(InputRecord.java:532)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:975)
at sun.security.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:933)
at sun.security.ssl.AppInputStream.read(AppInputStream.java:105)
… 14 more

写回答

1回答

老卫

2019-05-13

重试几次。或者将 gradle 的地址指定为本地文件。
见我的手记

0
0

基于Spring Boot技术栈博客系统企业级前后端实战

毕设 Elasticsearch搜索+Thymeleaf模板+JPA+Security+BootStrap

1296 学习 · 738 问题

查看课程