# PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

**URL:** <https://community.seqera.io/t/pkix-path-building-failed-sun-security-provider-certpath-suncertpathbuilderexception-unable-to-find-valid-certification-path-to-requested-target/1210>\
**Category:** Ask for help\
**Tags:** nextflow\
**Created:** [September 23, 2024, 7:58pm UTC](https://community.seqera.io/t/pkix-path-building-failed-sun-security-provider-certpath-suncertpathbuilderexception-unable-to-find-valid-certification-path-to-requested-target/1210 "2024-09-23T19:58:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bskubi](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/bskubi/32/545_2.png) [@bskubi](https://community.seqera.io/u/bskubi)\
**Post date:** [September 23, 2024, 7:58pm UTC](https://community.seqera.io/t/pkix-path-building-failed-sun-security-provider-certpath-suncertpathbuilderexception-unable-to-find-valid-certification-path-to-requested-target/1210/1 "2024-09-23T19:58:43Z")

</div>

My Nextflow pipeline downloads a reference genome by passing the URL as a process input path. This has worked consistently until today, when I started getting the error:

```auto
Can't stage file https://www.encodeproject.org/files/GRCh38_no_alt_analysis_set_GCA_000001405.15/@@download/GRCh38_no_alt_analysis_set_GCA_000001405.15.fasta.gz -- reason: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

```

On the same computer where I’m getting this error, I can manually download the file using this URL in my browser. I also can download it by using curl in the staging process command. This isn’t a great solution however, because the user can also pass a local reference rather than a URL, and I had wanted Nextflow to manage staging files when necessary. Any idea what might be causing this error?

---

<div class="post-metadata">

**Author:** ![paolo](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/paolo/32/72_2.png) [@paolo](https://community.seqera.io/u/paolo)\
**Post date:** [September 24, 2024, 2:18pm UTC](https://community.seqera.io/t/pkix-path-building-failed-sun-security-provider-certpath-suncertpathbuilderexception-unable-to-find-valid-certification-path-to-requested-target/1210/2 "2024-09-24T14:18:39Z")

</div>

This commonly is related to HTTPS certificates. Why Java version are you using?

---

<div class="post-metadata">

**Author:** ![bskubi](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/bskubi/32/545_2.png) [@bskubi](https://community.seqera.io/u/bskubi)\
**Post date:** [September 24, 2024, 5:21pm UTC](https://community.seqera.io/t/pkix-path-building-failed-sun-security-provider-certpath-suncertpathbuilderexception-unable-to-find-valid-certification-path-to-requested-target/1210/3 "2024-09-24T17:21:11Z")

</div>

I was using OpenJDK 11, and upgrading to OpenJDK 21 was the solution. Thanks for the pointer in the right direction!

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/system/32/2402_2.png) [@system](https://community.seqera.io/u/system)\
**Post date:** [October 1, 2024, 5:22pm UTC](https://community.seqera.io/t/pkix-path-building-failed-sun-security-provider-certpath-suncertpathbuilderexception-unable-to-find-valid-certification-path-to-requested-target/1210/4 "2024-10-01T17:22:05Z")

</div>

Closed on October 1, 2024, 5:22pm UTC

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
