PKIX path building f ailed


(Alice) #1

When I compile elasticsearch source code, I get a such problem, like this:

  • What went wrong:
    A problem occurred configuring project ‘:benchmarks’.

Could not resolve all files for configuration ‘:benchmarks:classpath’.
Could not resolve com.github.jengelman.gradle.plugins:shadow:1.2.3.
Required by:
project :benchmarks
Could not resolve com.github.jengelman.gradle.plugins:shadow:1.2.3.
Could not get resource ‘https://plugins.gradle.org/m2/com/github/jeng
elman/gradle/plugins/shadow/1.2.3/shadow-1.2.3.pom’.
Could not GET ‘https://plugins.gradle.org/m2/com/github/jengelman/
gradle/plugins/shadow/1.2.3/shadow-1.2.3.pom’.
sun.security.validator.ValidatorException: PKIX path building f
ailed: sun.security.provider.certpath.SunCertPathBuilderException: unable to fin
d valid certification path to requested target

Anyone can help me? Thanks a lot.


(Mark Vieira) #2

Java is saying the SSL certificate presented here is invalid. The plugin portal is definitely using a verified certificate so perhaps you are using a proxy server with a self-signed certificate?


(Alice) #3

Yes, thanks a lot. I cat’t access external network and have to use Cntlm to configure some proxy settings. So it’s maybe that the proxy settings occur some errors. But I have checked the proxy settings again and agian, and I can’t find any problem.
here is the proxy settings in Cntlm.ini:
Username XXX
Domain china
Password XXX
Auth NTLM

and the gradle.properties in .gradle is here:
systemProp.http.proxyHost=127.0.0.1
systemProp.http.proxyPort=3128
systemProp.http.proxyUser=XXX
systemProp.http.proxyPassword=XXX

systemProp.https.proxyHost=127.0.0.1
systemProp.https.proxyPort=3128
systemProp.https.proxyUser=XXX
systemProp.https.proxyPassword=XXX

When I use CMD.exe to run gradle bulid, it can download something, but it stop by the error:
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring project ‘:benchmarks’.

Could not resolve all files for configuration ‘:benchmarks:classpath’.
Could not resolve com.github.jengelman.gradle.plugins:shadow:1.2.3.
Required by:
project :benchmarks
Could not resolve com.github.jengelman.gradle.plugins:shadow:1.2.3.
Could not get resource ‘https://plugins.gradle.org/m2/com/github/jeng
elman/gradle/plugins/shadow/1.2.3/shadow-1.2.3.pom’.
Could not GET ‘https://plugins.gradle.org/m2/com/github/jengelman/
gradle/plugins/shadow/1.2.3/shadow-1.2.3.pom’.
sun.security.validator.ValidatorException: PKIX path building f
ailed: sun.security.provider.certpath.SunCertPathBuilderException: unable to fin
d valid certification path to requested target

I hope sincerely anyone can help me.


(Mark Vieira) #4

Try removing the systemProp.https.* properties. It doesn’t seem right anyhow as the HTTP and HTTPS proxy should run on a different port.