Skip to content
This repository has been archived by the owner on May 21, 2018. It is now read-only.

Unable to build: Exception in thread "main" javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty #141

Closed
F21 opened this issue Jun 24, 2015 · 8 comments
Assignees

Comments

@F21
Copy link

F21 commented Jun 24, 2015

After cloning and running ./bin/build-hdfs, I get this error message:

Downloading https://services.gradle.org/distributions/gradle-2.4-bin.zip

Exception in thread "main" javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
        at sun.security.ssl.Alerts.getSSLException(Alerts.java:208)
        at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1904)
        at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1862)
        at sun.security.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1845)
        at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1366)
        at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1343)
        at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:563)
        at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1301)
        at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
        at org.gradle.wrapper.Download.downloadInternal(Download.java:58)
        at org.gradle.wrapper.Download.download(Download.java:44)
        at org.gradle.wrapper.Install$1.call(Install.java:59)
        at org.gradle.wrapper.Install$1.call(Install.java:46)
        at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:65)
        at org.gradle.wrapper.Install.createDist(Install.java:46)
        at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:126)
        at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
Caused by: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
        at sun.security.validator.PKIXValidator.<init>(PKIXValidator.java:90)
        at sun.security.validator.Validator.getInstance(Validator.java:179)
        at sun.security.ssl.X509TrustManagerImpl.getValidator(X509TrustManagerImpl.java:314)
        at sun.security.ssl.X509TrustManagerImpl.checkTrustedInit(X509TrustManagerImpl.java:173)
        at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:186)
        at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:126)
        at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1428)
        at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:209)
        at sun.security.ssl.Handshaker.processLoop(Handshaker.java:901)
        at sun.security.ssl.Handshaker.process_record(Handshaker.java:837)
        at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1023)
        at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1332)
        at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1359)
        ... 13 more
Caused by: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
        at java.security.cert.PKIXParameters.setTrustAnchors(PKIXParameters.java:200)
        at java.security.cert.PKIXParameters.<init>(PKIXParameters.java:120)
        at java.security.cert.PKIXBuilderParameters.<init>(PKIXBuilderParameters.java:104)
        at sun.security.validator.PKIXValidator.<init>(PKIXValidator.java:88)
        ... 25 more

OS is Ubuntu 14.10 64-bit running on vagrant.

@elingg
Copy link

elingg commented Jun 24, 2015

Hi @kensipe, could you provide some guidance here? Thanks!

@kensipe
Copy link

kensipe commented Jun 25, 2015

@F21 do you have internet connectivity when you attempt this? obviously there is a download need. This is a one time download. Need internet connectivity extends to the VM you are running the build from.

This issue really isn't an HDFS issue. The issue is getting gradle wrapper to work. It requires internet connectivity to the vm and it may require a proxy configuration. details for that are: http://stackoverflow.com/questions/5991194/gradle-proxy-configuration

that said I would be happy to help you debug this issue if you are not able to get past it with the information provided.

@F21
Copy link
Author

F21 commented Jun 25, 2015

@kensipe Yes, the VM has internet access. I was able to install things through apt-get and use wget fine.

@F21
Copy link
Author

F21 commented Jun 26, 2015

Just tried it and it appears to be downloading and building fine. The difference is that I am now using Oracle's Java installed using the webup8 ppa on ubuntu instead of OpenJDK,

@F21 F21 closed this as completed Jun 26, 2015
@leechwort
Copy link

I had the same issue when tried to build qt app for android. This command helped for me:

sudo update-ca-certificates -f

@RonaldoDeFreitas
Copy link

Solved by replacing https for http:
https://services.gradle.org/distributions/gradle-2.4-bin.zip
to
http://services.gradle.org/distributions/gradle-2.4-bin.zip

@amranial
Copy link

Where did you replace it please ?

@khalchev91
Copy link

Change it in the gradle/wrapper/gradle-wrapper.properties and you should be good to go

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants