linux-on-ibm-z / docs

A collection of instructions and tutorials to help you get your favorite software up and running on Linux on z
147 stars 56 forks source link

Error installing ElasticSearch on s390x - gradlew command - PKIX path building failed #41

Open pni0ekn opened 4 years ago

pni0ekn commented 4 years ago

Hi, I am building Elasticsearch on Red Hat 8 on z System (s390x) following the procedure Building Elasticsearch ( https://github.com/linux-on-ibm-z/docs/wiki/Building-Elasticsearch ), on step 6) Build, considering we have a corporate proxy, I changed the provided gradlew command
./gradlew :distribution:archives:oss-linux-s390x-tar:assemble --parallel to ./gradlew -Dhttps.proxyHost=proxy.xxxxxxxx.net -Dhttps.proxyPort=8080 :distribution:archives:oss-linux-s390x-tar:assemble --parallel and I got the error: [pni0ekn@vmlnx1-2 elasticsearch]$ ./gradlew -Dhttps.proxyHost=proxy.belwired.net -Dhttps.proxyPort=8080 :distribution:archives:oss-linux-s390x-tar:assemble --parallel Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8 Downloading https://services.gradle.org/distributions/gradle-6.5-all.zip

Exception in thread "main" javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:131) at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:325) at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:268) at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:263) at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.checkServerCerts(CertificateMessage.java:645) at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.onCertificate(CertificateMessage.java:464) at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.consume(CertificateMessage.java:360) at java.base/sun.security.ssl.SSLHandshake.consume(SSLHandshake.java:396) at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:445) at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:423) at java.base/sun.security.ssl.TransportContext.dispatch(TransportContext.java:182) at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:171) at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1475) at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1381) at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:441) at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:412) at java.base/sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:567) at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:171) at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1600) at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1528) at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:224) at org.gradle.wrapper.Download.downloadInternal(Download.java:83) at org.gradle.wrapper.Download.download(Download.java:66) at org.gradle.wrapper.Install$1.call(Install.java:68) at org.gradle.wrapper.Install$1.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:63) Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at java.base/sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:439) at java.base/sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:306) at java.base/sun.security.validator.Validator.validate(Validator.java:264) at java.base/sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:231) at java.base/sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:132) at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.checkServerCerts(CertificateMessage.java:629) ... 24 more Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at java.base/sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141) at java.base/sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126) at java.base/java.security.cert.CertPathBuilder.build(CertPathBuilder.java:297) at java.base/sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:434) ... 29 more

How can I solved this error, considering the server where I am installing Elasticsearch is behind a corporate proxy?

Thanks Jose Munoz

aborkar-ibm commented 4 years ago

Hello,

The issue does not seem to be related to building of elastic search. Its seems more related to certificate/environment related. The build instructions does a basic build of ES, to make sure that there are no issues specific to s390x arch. For specific usage of ES, please refer to the official documentation of ES.

Regards, Amod

pni0ekn commented 4 years ago

Hi Amod, Agree that the problem is related with certificates. I following the procedure to install ES and I stack on gradlew command. I do not know who can provide support to solve this issue with gradlew. Also, I would like to know if we have ES installations on s390x.