Heroku War部署SSL错误

时间:2017-09-11 16:44:07

标签: java ssl heroku

我正在尝试将war文件上传到Heroku。但是我收到了SSL错误。

我的申请是在域名“* .herukoapp.com”。

如何解决此SSL错误?

  

- - - - >上传构建...线程“main”中的异常javax.net.ssl.SSLHandshakeException:   sun.security.validator.ValidatorException:PKIX路径构建失败:   sun.security.provider.certpath.SunCertPathBuilderException:无法   找到所请求目标的有效证书路径           在sun.security.ssl.Alerts.getSSLException(未知来源)           at sun.security.ssl.SSLSocketImpl.fatal(Unknown Source)           在sun.security.ssl.Handshaker.fatalSE(未知来源)           在sun.security.ssl.Handshaker.fatalSE(未知来源)           at sun.security.ssl.ClientHandshaker.serverCertificate(Unknown Source)           在sun.security.ssl.ClientHandshaker.processMessage(未知来源)           在sun.security.ssl.Handshaker.processLoop(未知来源)           在sun.security.ssl.Handshaker.process_record(未知来源)           at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)           at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)           在sun.security.ssl.SSLSocketImpl.startHandshake(未知来源)           在sun.security.ssl.SSLSocketImpl.startHandshake(未知来源)           at org.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:394)           at org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:353)           at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:141)           at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353)           at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380)           在org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)           在org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)           在org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)           在org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)           在org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)           在org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)           在org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107)           在com.heroku.sdk.deploy.utils.RestClient.put(RestClient.java:154)           在com.heroku.sdk.deploy.endpoints.ApiEndpoint.upload(ApiEndpoint.java:47)           在com.heroku.sdk.deploy.BuildsDeployer.deploySlug(BuildsDeployer.java:101)           在com.heroku.sdk.deploy.Deployer.createAndReleaseSlug(Deployer.java:121)           在com.heroku.sdk.deploy.Deployer.deploy(Deployer.java:80)           在com.heroku.sdk.deploy.App.deploy(App.java:60)           在com.heroku.sdk.deploy.App.deploy(App.java:64)           在com.heroku.sdk.deploy.WarApp.deploy(WarApp.java:30)           在com.heroku.sdk.deploy.DeployWar.main(DeployWar.java:109)引起:sun.security.validator.ValidatorException:PKIX路径   建筑失败:   sun.security.provider.certpath.SunCertPathBuilderException:无法   找到所请求目标的有效证书路径

1 个答案:

答案 0 :(得分:1)

这是由在本地运行旧版本的Java 7引起的。 Heroku禁用了TLS v1.0,并且您的Java不支持任何新功能。你可以: