# PKIX path building f ailed

**URL:** <https://discuss.gradle.org/t/pkix-path-building-f-ailed/23867>\
**Category:** Help/Discuss\
**Created:** [August 25, 2017, 12:04pm UTC](https://discuss.gradle.org/t/pkix-path-building-f-ailed/23867 "2017-08-25T12:04:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![saliormoon](https://avatars.discourse-cdn.com/v4/letter/s/58f4c7/32.png) [@saliormoon](https://discuss.gradle.org/u/saliormoon)\
**Post date:** [August 25, 2017, 12:04pm UTC](https://discuss.gradle.org/t/pkix-path-building-f-ailed/23867/1 "2017-08-25T12:04:03Z")

</div>

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](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/](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.

---

<div class="post-metadata">

**Author:** ![mark\_vieira](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/mark_vieira/32/5396_2.png) [@mark\_vieira](https://discuss.gradle.org/u/mark_vieira)\
**Post date:** [August 25, 2017, 3:44pm UTC](https://discuss.gradle.org/t/pkix-path-building-f-ailed/23867/2 "2017-08-25T15:44:02Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![saliormoon](https://avatars.discourse-cdn.com/v4/letter/s/58f4c7/32.png) [@saliormoon](https://discuss.gradle.org/u/saliormoon)\
**Post date:** [August 26, 2017, 12:34am UTC](https://discuss.gradle.org/t/pkix-path-building-f-ailed/23867/3 "2017-08-26T00:34:52Z")

</div>

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](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/](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.

---

<div class="post-metadata">

**Author:** ![mark\_vieira](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/mark_vieira/32/5396_2.png) [@mark\_vieira](https://discuss.gradle.org/u/mark_vieira)\
**Post date:** [August 26, 2017, 5:26pm UTC](https://discuss.gradle.org/t/pkix-path-building-f-ailed/23867/4 "2017-08-26T17:26:51Z")

</div>

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