Confluence Server 6.13 or later throws an 'unable to find valid certification path' error when running with AdoptOpenJDK

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Problem

The following error appears when running Confluence Server or Data Center 6.13 or later with AdoptOpenJDK. Error can occur when Confluence attempts to connect to another web service, for example the Atlassian Marketplace, or when configuring an external user directory that is also hosted on AWS (on a different node). 

...
sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

This issue is commonly seen when Confluence is hosted on AWS, but could occur wherever your Confluence is hosted. 

Cause

AdoptOpenJDK 1.8.0_181 is missing a number of CA root certificates, including the "Starfield Services Root Certificate Authority" root certificate, which is issued by Amazon.

Workaround

As a workaround you can install the missing root certificates from the Amazon Trust Repository. 

First, check whether a Starfield Services Root Certificate Authority certificate is present:

echo 'changeit'|keytool -list -v -keystore $(find ${JAVA_HOME} -name cacerts)|grep 'Owner'|grep 'Star'

If the certificate is not present, you can install it using the following command:

wget https://www.amazontrust.com/repository/SFSRootCAG2.pem && keytool -trustcacerts -keystore $JAVA_HOME/jre/lib/security/cacerts -storepass changeit -alias Root -import -file SFSRootCAG2.pem && rm SFSRootCAG2.pem


Resolution

We expect these certificates to be available again in a later AdoptOpenJDK version. See https://github.com/AdoptOpenJDK/openjdk-build/issues/676 for progress on this issue. 


Last modified on Mar 18, 2022

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.