I have an Android project that is encountering some issues while building. Locally from studio I'm able to build just fine. I have an older centos server running Jenkins which is also able to build without issue. Where I'm failling is on a seperate newer server (also using Centos + Jenkins) which I haven't yet migrated to seems to be having some problems.
This server was working for some time, but fairly recently the new machine had some issues with its SSL cert which had expired. My IT team updated the cert, and from the browser I'm able to access that machine just fine and the cert looks good.
The problem I face however is when the Jenkins agent is running a gradle build on that machine, I see a cert exception for a crashlytics task.
2021-12-26T08:33:26.635-0800 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] FAILURE: Build failed with an exception.
2021-12-26T08:33:26.635-0800 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
2021-12-26T08:33:26.635-0800 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * What went wrong:
2021-12-26T08:33:26.635-0800 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Execution failed for task ':MyApp:uploadCrashlyticsMappingFileMyAppDebug'.
2021-12-26T08:33:26.635-0800 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > javax.net.ssl.SSLHandshakeException: PKIX path validation failed: java.security.cert.CertPathValidatorException: validity check failed
I've not yet tried much other than googling and searching here on SO looking for solutions, but it's not clear what (if any) of the things I'm finding are relevant.
The only topic I attempted was Resolving javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed Error?
When the suggestion of
keytool -list -keystore "$JAVA_HOME/jre/lib/security/cacerts"
failed for me I went to execute echo $JAVA_HOME and found no directory.
As a follow up I ran find / cacerts and it was unable to locate the file.
Again I'm not sure if this topic I'm looking at is actually relevant for the gradle build process that's being debugged. I'd appreciate any leads even pointing me in a better direction for more research.