0
votes

I am trying to upload war file to Heroku. But I am getting SSL error.

My application is in domain "*.herukoapp.com".

How can this SSL error can be solved?

-----> Uploading build... Exception in thread "main" javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at sun.security.ssl.Alerts.getSSLException(Unknown Source) at sun.security.ssl.SSLSocketImpl.fatal(Unknown Source) at sun.security.ssl.Handshaker.fatalSE(Unknown Source) at sun.security.ssl.Handshaker.fatalSE(Unknown Source) at sun.security.ssl.ClientHandshaker.serverCertificate(Unknown Source) at sun.security.ssl.ClientHandshaker.processMessage(Unknown Source) at sun.security.ssl.Handshaker.processLoop(Unknown Source) at sun.security.ssl.Handshaker.process_record(Unknown Source) at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source) at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source) at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source) at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source) 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) at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236) at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184) at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88) at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107) at com.heroku.sdk.deploy.utils.RestClient.put(RestClient.java:154) at com.heroku.sdk.deploy.endpoints.ApiEndpoint.upload(ApiEndpoint.java:47) at com.heroku.sdk.deploy.BuildsDeployer.deploySlug(BuildsDeployer.java:101) at com.heroku.sdk.deploy.Deployer.createAndReleaseSlug(Deployer.java:121) at com.heroku.sdk.deploy.Deployer.deploy(Deployer.java:80) at com.heroku.sdk.deploy.App.deploy(App.java:60) at com.heroku.sdk.deploy.App.deploy(App.java:64) at com.heroku.sdk.deploy.WarApp.deploy(WarApp.java:30) at com.heroku.sdk.deploy.DeployWar.main(DeployWar.java:109) Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

1
sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification! I guess the certificate is not valid hence the handshake failure.Minh Kieu
Yes correct. But how to make heroku to configure SSL certificate. It is specific to heroku.AJJ
Are you running Java 7 locally? That's most likely the problem as it doesn't support TLS v1.1 and higher. Upgrade to Java 8.codefinger

1 Answers

1
votes

This is caused by running an old version of Java 7 locally. Heroku disabled TLS v1.0, and your Java doesn't support anything new. You can either: