Gradle Tool Failed Download

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Gradle Tool Failed Download

Sverre Moe-2
This has worked before. Now that we where to upgrade from Gradle 5.0 to 5.5 and added the tool gradle-5.5 it fails to retrieve the archive.

Anyone have an idea what the problem might be?

Running both Jenkins and Agents on Java 8 Update 221.

Is there any way arround this without hacking the JRE cacerts with the gradle web site certificate?

sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
	at java.base/sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141)
	at java.base/sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126)
	at java.base/java.security.cert.CertPathBuilder.build(CertPathBuilder.java:297)
	at java.base/sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:380)
Caused: sun.security.validator.ValidatorException: PKIX path building failed
	at java.base/sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:385)
	at java.base/sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:290)
	at java.base/sun.security.validator.Validator.validate(Validator.java:264)
	at java.base/sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:321)
	at java.base/sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:221)
	at java.base/sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:129)
	at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.checkServerCerts(CertificateMessage.java:626)
Caused: javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
	at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:131)
	at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:321)
	at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:264)
	at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:259)
	at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.checkServerCerts(CertificateMessage.java:642)
	at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.onCertificate(CertificateMessage.java:461)
	at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.consume(CertificateMessage.java:361)
	at java.base/sun.security.ssl.SSLHandshake.consume(SSLHandshake.java:392)
	at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:448)
	at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:425)
	at java.base/sun.security.ssl.TransportContext.dispatch(TransportContext.java:178)
	at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:164)
	at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1152)
	at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1063)
	at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:402)
	at java.base/sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:567)
	at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.followRedirect0(HttpURLConnection.java:2768)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.followRedirect(HttpURLConnection.java:2680)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1843)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1509)
	at java.base/java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:527)
	at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:329)
	at hudson.FilePath.installIfNecessaryFrom(FilePath.java:874)
Caused: java.io.IOException: Failed to install https://services.gradle.org/distributions/gradle-5.5.1-bin.zip to /home/build/jenkins-test/tools/hudson.plugins.gradle.GradleInstallation/gradle-5.5
	at hudson.FilePath.installIfNecessaryFrom(FilePath.java:938)
	at hudson.FilePath.installIfNecessaryFrom(FilePath.java:846)
	at hudson.tools.DownloadFromUrlInstaller.performInstallation(DownloadFromUrlInstaller.java:77)
	at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:69)
	at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:109)
	at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:206)
	at hudson.plugins.gradle.GradleInstallation.forNode(GradleInstallation.java:92)
	at hudson.plugins.gradle.GradleInstallation.forNode(GradleInstallation.java:30)
	at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:152)
	at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:133)
	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/93ecd2ab-622a-4306-ad97-6546972c3471%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Gradle Tool Failed Download

Sverre Moe-2
I don't think this is a problem with the Tool as I get the same problem trying manually on the agent

build@jbssles123x64:~/workspace/meos-dashboard> gradle wrapper --gradle-version=5.5.1
build@jbssles123x64:~/workspace/project> ./gradlew --version
Downloading https://services.gradle.org/distributions/gradle-5.5.1-bin.zip

Gives same Stacktrace.

onsdag 7. august 2019 18.51.37 UTC+2 skrev Sverre Moe følgende:
This has worked before. Now that we where to upgrade from Gradle 5.0 to 5.5 and added the tool gradle-5.5 it fails to retrieve the archive.

Anyone have an idea what the problem might be?

Running both Jenkins and Agents on Java 8 Update 221.

Is there any way arround this without hacking the JRE cacerts with the gradle web site certificate?

sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
	at java.base/sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141)
	at java.base/sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126)
	at java.base/java.security.cert.CertPathBuilder.build(CertPathBuilder.java:297)
	at java.base/sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:380)
Caused: sun.security.validator.ValidatorException: PKIX path building failed
	at java.base/sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:385)
	at java.base/sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:290)
	at java.base/sun.security.validator.Validator.validate(Validator.java:264)
	at java.base/sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:321)
	at java.base/sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:221)
	at java.base/sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:129)
	at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.checkServerCerts(CertificateMessage.java:626)
Caused: javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
	at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:131)
	at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:321)
	at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:264)
	at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:259)
	at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.checkServerCerts(CertificateMessage.java:642)
	at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.onCertificate(CertificateMessage.java:461)
	at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.consume(CertificateMessage.java:361)
	at java.base/sun.security.ssl.SSLHandshake.consume(SSLHandshake.java:392)
	at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:448)
	at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:425)
	at java.base/sun.security.ssl.TransportContext.dispatch(TransportContext.java:178)
	at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:164)
	at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1152)
	at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1063)
	at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:402)
	at java.base/sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:567)
	at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.followRedirect0(HttpURLConnection.java:2768)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.followRedirect(HttpURLConnection.java:2680)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1843)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1509)
	at java.base/java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:527)
	at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:329)
	at hudson.FilePath.installIfNecessaryFrom(FilePath.java:874)
Caused: java.io.IOException: Failed to install <a href="https://services.gradle.org/distributions/gradle-5.5.1-bin.zip" style="font-size: 15px; color: rgb(149, 115, 115); --darkreader-inline-color:#b7b2a7;" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fservices.gradle.org%2Fdistributions%2Fgradle-5.5.1-bin.zip\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNENMkYwq8EymLo0Nd04J1QhhkbWnQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fservices.gradle.org%2Fdistributions%2Fgradle-5.5.1-bin.zip\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNENMkYwq8EymLo0Nd04J1QhhkbWnQ&#39;;return true;" data-darkreader-inline-color="">https://services.gradle.org/distributions/gradle-5.5.1-bin.zip to /home/build/jenkins-test/tools/hudson.plugins.gradle.GradleInstallation/gradle-5.5
	at hudson.FilePath.installIfNecessaryFrom(FilePath.java:938)
	at hudson.FilePath.installIfNecessaryFrom(FilePath.java:846)
	at hudson.tools.DownloadFromUrlInstaller.performInstallation(DownloadFromUrlInstaller.java:77)
	at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:69)
	at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:109)
	at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:206)
	at hudson.plugins.gradle.GradleInstallation.forNode(GradleInstallation.java:92)
	at hudson.plugins.gradle.GradleInstallation.forNode(GradleInstallation.java:30)
	at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:152)
	at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:133)
	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/c0cdb9f1-8acf-4226-8d41-d6983a24c2b7%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Gradle Tool Failed Download

Mark Waite-2
In reply to this post by Sverre Moe-2
I would guess that you may already be using a modified cacerts file which does not include the authority that is certifying the validity of the SSL certificate on the gradle site.

When I download from that URL, my web browser reports no issues from Google Chrome on Windows and no issues from wget on a FreeBSD computer.

On Wed, Aug 7, 2019 at 10:51 AM Sverre Moe <[hidden email]> wrote:
This has worked before. Now that we where to upgrade from Gradle 5.0 to 5.5 and added the tool gradle-5.5 it fails to retrieve the archive.

Anyone have an idea what the problem might be?

Running both Jenkins and Agents on Java 8 Update 221.

Is there any way arround this without hacking the JRE cacerts with the gradle web site certificate?

sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
	at java.base/sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141)
	at java.base/sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126)
	at java.base/java.security.cert.CertPathBuilder.build(CertPathBuilder.java:297)
	at java.base/sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:380)
Caused: sun.security.validator.ValidatorException: PKIX path building failed
	at java.base/sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:385)
	at java.base/sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:290)
	at java.base/sun.security.validator.Validator.validate(Validator.java:264)
	at java.base/sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:321)
	at java.base/sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:221)
	at java.base/sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:129)
	at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.checkServerCerts(CertificateMessage.java:626)
Caused: javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
	at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:131)
	at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:321)
	at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:264)
	at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:259)
	at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.checkServerCerts(CertificateMessage.java:642)
	at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.onCertificate(CertificateMessage.java:461)
	at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.consume(CertificateMessage.java:361)
	at java.base/sun.security.ssl.SSLHandshake.consume(SSLHandshake.java:392)
	at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:448)
	at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:425)
	at java.base/sun.security.ssl.TransportContext.dispatch(TransportContext.java:178)
	at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:164)
	at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1152)
	at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1063)
	at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:402)
	at java.base/sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:567)
	at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.followRedirect0(HttpURLConnection.java:2768)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.followRedirect(HttpURLConnection.java:2680)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1843)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1509)
	at java.base/java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:527)
	at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:329)
	at hudson.FilePath.installIfNecessaryFrom(FilePath.java:874)
Caused: java.io.IOException: Failed to install https://services.gradle.org/distributions/gradle-5.5.1-bin.zip to /home/build/jenkins-test/tools/hudson.plugins.gradle.GradleInstallation/gradle-5.5
	at hudson.FilePath.installIfNecessaryFrom(FilePath.java:938)
	at hudson.FilePath.installIfNecessaryFrom(FilePath.java:846)
	at hudson.tools.DownloadFromUrlInstaller.performInstallation(DownloadFromUrlInstaller.java:77)
	at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:69)
	at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:109)
	at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:206)
	at hudson.plugins.gradle.GradleInstallation.forNode(GradleInstallation.java:92)
	at hudson.plugins.gradle.GradleInstallation.forNode(GradleInstallation.java:30)
	at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:152)
	at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:133)
	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/93ecd2ab-622a-4306-ad97-6546972c3471%40googlegroups.com.


--
Thanks!
Mark Waite

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtGcos8AcPadeP2odSM%3DbynXGTswNg5j4ip%3D2mFpEk6rQg%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Gradle Tool Failed Download

Sverre Moe-2
I have no modifed cacerts.

Using wget also fails on the agent, until I set a proxy.
The Jenkins server does have proxy configured, but not the agents.
When I add HTTP Proxy in Jenkins under the Update Center I get a totally different stacktrace when it tries to retrieve the gradle tool.

Unpacking https://services.gradle.org/distributions/gradle-5.5.1-bin.zip to /home/build/jenkins-test/tools/hudson.plugins.gradle.GradleInstallation/gradle-5.5 on master-sles12.3-x86_64_2
ERROR: Failed to download https://services.gradle.org/distributions/gradle-5.5.1-bin.zip from agent; will retry from master
sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
	at sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141)
	at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126)
	at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280)
	at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:392)
Caused: sun.security.validator.ValidatorException: PKIX path building failed
	at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:397)
	at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:302)
	at sun.security.validator.Validator.validate(Validator.java:262)
	at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:330)
	at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:237)
	at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:132)
	at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1621)
Also:   hudson.remoting.Channel$CallSiteStackTrace: Remote call to master-sles12.3-x86_64_2
		at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1743)
		at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:357)
		at hudson.remoting.Channel.call(Channel.java:957)
		at hudson.FilePath.act(FilePath.java:1070)
		at hudson.FilePath.act(FilePath.java:1059)
		at hudson.FilePath.installIfNecessaryFrom(FilePath.java:913)
		at hudson.FilePath.installIfNecessaryFrom(FilePath.java:846)
		at hudson.tools.DownloadFromUrlInstaller.performInstallation(DownloadFromUrlInstaller.java:77)
		at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:69)
		at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:109)
		at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:206)
		at hudson.plugins.gradle.GradleInstallation.forNode(GradleInstallation.java:92)
		at hudson.plugins.gradle.GradleInstallation.forNode(GradleInstallation.java:30)
		at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:152)
		at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:133)
		at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
		at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
		at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
		at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
		at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
		at java.base/java.lang.Thread.run(Thread.java:834)
Caused: javax.net.ssl.SSLHandshakeException
	at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
	at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1946)
	at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:316)
	at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:310)
	at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1639)
	at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:223)
	at sun.security.ssl.Handshaker.processLoop(Handshaker.java:1037)
	at sun.security.ssl.Handshaker.process_record(Handshaker.java:965)
	at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1064)
	at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1367)
	at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1395)
	at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1379)
	at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559)
	at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
	at sun.net.www.protocol.http.HttpURLConnection.followRedirect0(HttpURLConnection.java:2735)
	at sun.net.www.protocol.http.HttpURLConnection.followRedirect(HttpURLConnection.java:2647)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1830)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1498)
	at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:268)
	at java.net.URL.openStream(URL.java:1057)
	at hudson.FilePath$Unpack.invoke(FilePath.java:949)
	at hudson.FilePath$Unpack.invoke(FilePath.java:943)
	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3050)
	at hudson.remoting.UserRequest.perform(UserRequest.java:212)
	at hudson.remoting.UserRequest.perform(UserRequest.java:54)
	at hudson.remoting.Request$2.run(Request.java:369)
	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

javax.net.ssl.SSLHandshakeException: Received fatal alert: access_denied
	at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:131)
	at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:117)
	at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:308)
	at java.base/sun.security.ssl.Alert$AlertConsumer.consume(Alert.java:285)
	at java.base/sun.security.ssl.TransportContext.dispatch(TransportContext.java:181)
	at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:164)
	at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1152)
	at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1063)
	at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:402)
	at java.base/sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:567)
	at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.followRedirect0(HttpURLConnection.java:2768)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.followRedirect(HttpURLConnection.java:2680)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1843)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1509)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:3084)
	at java.base/java.net.URLConnection.getHeaderFieldLong(URLConnection.java:636)
	at java.base/java.net.URLConnection.getContentLengthLong(URLConnection.java:508)
	at java.base/java.net.URLConnection.getContentLength(URLConnection.java:492)
	at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getContentLength(HttpsURLConnectionImpl.java:389)
	at org.jvnet.robust_http_client.RetryableHttpStream.<init>(RetryableHttpStream.java:90)
Caused: javax.net.ssl.SSLHandshakeException: Received fatal alert: access_denied
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
	at java.base/sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1963)
	at java.base/sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1958)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1957)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1525)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1509)
	at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:245)
	at org.jvnet.robust_http_client.RetryableHttpStream.getStream(RetryableHttpStream.java:98)
	at org.jvnet.robust_http_client.RetryableHttpStream.<init>(RetryableHttpStream.java:91)
	at hudson.ProxyConfiguration.getInputStream(ProxyConfiguration.java:285)
	at hudson.FilePath.installIfNecessaryFrom(FilePath.java:924)
Caused: java.io.IOException: Failed to install https://services.gradle.org/distributions/gradle-5.5.1-bin.zip to /home/build/jenkins-test/tools/hudson.plugins.gradle.GradleInstallation/gradle-5.5
	at hudson.FilePath.installIfNecessaryFrom(FilePath.java:938)
	at hudson.FilePath.installIfNecessaryFrom(FilePath.java:846)
	at hudson.tools.DownloadFromUrlInstaller.performInstallation(DownloadFromUrlInstaller.java:77)
	at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:69)
	at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:109)
	at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:206)
	at hudson.plugins.gradle.GradleInstallation.forNode(GradleInstallation.java:92)
	at hudson.plugins.gradle.GradleInstallation.forNode(GradleInstallation.java:30)
	at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:152)
	at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:133)
	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)

onsdag 7. august 2019 19.28.15 UTC+2 skrev Mark Waite følgende:
I would guess that you may already be using a modified cacerts file which does not include the authority that is certifying the validity of the SSL certificate on the gradle site.

When I download from that URL, my web browser reports no issues from Google Chrome on Windows and no issues from wget on a FreeBSD computer.

On Wed, Aug 7, 2019 at 10:51 AM Sverre Moe <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="bK4oR87KFgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">sver...@...> wrote:
This has worked before. Now that we where to upgrade from Gradle 5.0 to 5.5 and added the tool gradle-5.5 it fails to retrieve the archive.

Anyone have an idea what the problem might be?

Running both Jenkins and Agents on Java 8 Update 221.

Is there any way arround this without hacking the JRE cacerts with the gradle web site certificate?

sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
	at java.base/sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141)
	at java.base/sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126)
	at java.base/java.security.cert.CertPathBuilder.build(CertPathBuilder.java:297)
	at java.base/sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:380)
Caused: sun.security.validator.ValidatorException: PKIX path building failed
	at java.base/sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:385)
	at java.base/sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:290)
	at java.base/sun.security.validator.Validator.validate(Validator.java:264)
	at java.base/sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:321)
	at java.base/sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:221)
	at java.base/sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:129)
	at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.checkServerCerts(CertificateMessage.java:626)
Caused: javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
	at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:131)
	at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:321)
	at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:264)
	at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:259)
	at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.checkServerCerts(CertificateMessage.java:642)
	at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.onCertificate(CertificateMessage.java:461)
	at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.consume(CertificateMessage.java:361)
	at java.base/sun.security.ssl.SSLHandshake.consume(SSLHandshake.java:392)
	at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:448)
	at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:425)
	at java.base/sun.security.ssl.TransportContext.dispatch(TransportContext.java:178)
	at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:164)
	at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1152)
	at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1063)
	at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:402)
	at java.base/sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:567)
	at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.followRedirect0(HttpURLConnection.java:2768)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.followRedirect(HttpURLConnection.java:2680)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1843)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1509)
	at java.base/java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:527)
	at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:329)
	at hudson.FilePath.installIfNecessaryFrom(FilePath.java:874)
Caused: java.io.IOException: Failed to install <a href="https://services.gradle.org/distributions/gradle-5.5.1-bin.zip" style="font-size: 15px; color: rgb(149, 115, 115); --darkreader-inline-color:#b7b2a7;" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fservices.gradle.org%2Fdistributions%2Fgradle-5.5.1-bin.zip\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNENMkYwq8EymLo0Nd04J1QhhkbWnQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fservices.gradle.org%2Fdistributions%2Fgradle-5.5.1-bin.zip\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNENMkYwq8EymLo0Nd04J1QhhkbWnQ&#39;;return true;" data-darkreader-inline-color="">https://services.gradle.org/distributions/gradle-5.5.1-bin.zip to /home/build/jenkins-test/tools/hudson.plugins.gradle.GradleInstallation/gradle-5.5
	at hudson.FilePath.installIfNecessaryFrom(FilePath.java:938)
	at hudson.FilePath.installIfNecessaryFrom(FilePath.java:846)
	at hudson.tools.DownloadFromUrlInstaller.performInstallation(DownloadFromUrlInstaller.java:77)
	at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:69)
	at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:109)
	at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:206)
	at hudson.plugins.gradle.GradleInstallation.forNode(GradleInstallation.java:92)
	at hudson.plugins.gradle.GradleInstallation.forNode(GradleInstallation.java:30)
	at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:152)
	at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:133)
	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="bK4oR87KFgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">jenkins...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/jenkinsci-users/93ecd2ab-622a-4306-ad97-6546972c3471%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/93ecd2ab-622a-4306-ad97-6546972c3471%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/93ecd2ab-622a-4306-ad97-6546972c3471%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/jenkinsci-users/93ecd2ab-622a-4306-ad97-6546972c3471%40googlegroups.com.


--
Thanks!
Mark Waite

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/4f6bdea1-95fd-4237-a7d7-b2f4c0834046%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Gradle Tool Failed Download

Mark Waite-2
Maybe this is the time to reconfigure the tool installer to download from a locally cached copy of the tool instead of pulling it from the internet?

I've had good results with that technique by placing zip files of the tool installers inside my network and then configuring the tool installer to use the copy from my network instead of the copy from the internet.

On Wed, Aug 7, 2019 at 11:56 AM Sverre Moe <[hidden email]> wrote:
I have no modifed cacerts.

Using wget also fails on the agent, until I set a proxy.
The Jenkins server does have proxy configured, but not the agents.
When I add HTTP Proxy in Jenkins under the Update Center I get a totally different stacktrace when it tries to retrieve the gradle tool.

Unpacking https://services.gradle.org/distributions/gradle-5.5.1-bin.zip to /home/build/jenkins-test/tools/hudson.plugins.gradle.GradleInstallation/gradle-5.5 on master-sles12.3-x86_64_2
ERROR: Failed to download https://services.gradle.org/distributions/gradle-5.5.1-bin.zip from agent; will retry from master
sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
	at sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141)
	at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126)
	at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280)
	at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:392)
Caused: sun.security.validator.ValidatorException: PKIX path building failed
	at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:397)
	at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:302)
	at sun.security.validator.Validator.validate(Validator.java:262)
	at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:330)
	at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:237)
	at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:132)
	at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1621)
Also:   hudson.remoting.Channel$CallSiteStackTrace: Remote call to master-sles12.3-x86_64_2
		at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1743)
		at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:357)
		at hudson.remoting.Channel.call(Channel.java:957)
		at hudson.FilePath.act(FilePath.java:1070)
		at hudson.FilePath.act(FilePath.java:1059)
		at hudson.FilePath.installIfNecessaryFrom(FilePath.java:913)
		at hudson.FilePath.installIfNecessaryFrom(FilePath.java:846)
		at hudson.tools.DownloadFromUrlInstaller.performInstallation(DownloadFromUrlInstaller.java:77)
		at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:69)
		at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:109)
		at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:206)
		at hudson.plugins.gradle.GradleInstallation.forNode(GradleInstallation.java:92)
		at hudson.plugins.gradle.GradleInstallation.forNode(GradleInstallation.java:30)
		at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:152)
		at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:133)
		at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
		at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
		at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
		at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
		at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
		at java.base/java.lang.Thread.run(Thread.java:834)
Caused: javax.net.ssl.SSLHandshakeException
	at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
	at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1946)
	at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:316)
	at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:310)
	at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1639)
	at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:223)
	at sun.security.ssl.Handshaker.processLoop(Handshaker.java:1037)
	at sun.security.ssl.Handshaker.process_record(Handshaker.java:965)
	at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1064)
	at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1367)
	at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1395)
	at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1379)
	at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559)
	at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
	at sun.net.www.protocol.http.HttpURLConnection.followRedirect0(HttpURLConnection.java:2735)
	at sun.net.www.protocol.http.HttpURLConnection.followRedirect(HttpURLConnection.java:2647)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1830)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1498)
	at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:268)
	at java.net.URL.openStream(URL.java:1057)
	at hudson.FilePath$Unpack.invoke(FilePath.java:949)
	at hudson.FilePath$Unpack.invoke(FilePath.java:943)
	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3050)
	at hudson.remoting.UserRequest.perform(UserRequest.java:212)
	at hudson.remoting.UserRequest.perform(UserRequest.java:54)
	at hudson.remoting.Request$2.run(Request.java:369)
	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

javax.net.ssl.SSLHandshakeException: Received fatal alert: access_denied
	at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:131)
	at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:117)
	at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:308)
	at java.base/sun.security.ssl.Alert$AlertConsumer.consume(Alert.java:285)
	at java.base/sun.security.ssl.TransportContext.dispatch(TransportContext.java:181)
	at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:164)
	at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1152)
	at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1063)
	at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:402)
	at java.base/sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:567)
	at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.followRedirect0(HttpURLConnection.java:2768)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.followRedirect(HttpURLConnection.java:2680)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1843)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1509)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:3084)
	at java.base/java.net.URLConnection.getHeaderFieldLong(URLConnection.java:636)
	at java.base/java.net.URLConnection.getContentLengthLong(URLConnection.java:508)
	at java.base/java.net.URLConnection.getContentLength(URLConnection.java:492)
	at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getContentLength(HttpsURLConnectionImpl.java:389)
	at org.jvnet.robust_http_client.RetryableHttpStream.<init>(RetryableHttpStream.java:90)
Caused: javax.net.ssl.SSLHandshakeException: Received fatal alert: access_denied
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
	at java.base/sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1963)
	at java.base/sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1958)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1957)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1525)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1509)
	at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:245)
	at org.jvnet.robust_http_client.RetryableHttpStream.getStream(RetryableHttpStream.java:98)
	at org.jvnet.robust_http_client.RetryableHttpStream.<init>(RetryableHttpStream.java:91)
	at hudson.ProxyConfiguration.getInputStream(ProxyConfiguration.java:285)
	at hudson.FilePath.installIfNecessaryFrom(FilePath.java:924)
Caused: java.io.IOException: Failed to install https://services.gradle.org/distributions/gradle-5.5.1-bin.zip to /home/build/jenkins-test/tools/hudson.plugins.gradle.GradleInstallation/gradle-5.5
	at hudson.FilePath.installIfNecessaryFrom(FilePath.java:938)
	at hudson.FilePath.installIfNecessaryFrom(FilePath.java:846)
	at hudson.tools.DownloadFromUrlInstaller.performInstallation(DownloadFromUrlInstaller.java:77)
	at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:69)
	at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:109)
	at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:206)
	at hudson.plugins.gradle.GradleInstallation.forNode(GradleInstallation.java:92)
	at hudson.plugins.gradle.GradleInstallation.forNode(GradleInstallation.java:30)
	at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:152)
	at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:133)
	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)

onsdag 7. august 2019 19.28.15 UTC+2 skrev Mark Waite følgende:
I would guess that you may already be using a modified cacerts file which does not include the authority that is certifying the validity of the SSL certificate on the gradle site.

When I download from that URL, my web browser reports no issues from Google Chrome on Windows and no issues from wget on a FreeBSD computer.

On Wed, Aug 7, 2019 at 10:51 AM Sverre Moe <[hidden email]> wrote:
This has worked before. Now that we where to upgrade from Gradle 5.0 to 5.5 and added the tool gradle-5.5 it fails to retrieve the archive.

Anyone have an idea what the problem might be?

Running both Jenkins and Agents on Java 8 Update 221.

Is there any way arround this without hacking the JRE cacerts with the gradle web site certificate?

sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
	at java.base/sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141)
	at java.base/sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126)
	at java.base/java.security.cert.CertPathBuilder.build(CertPathBuilder.java:297)
	at java.base/sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:380)
Caused: sun.security.validator.ValidatorException: PKIX path building failed
	at java.base/sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:385)
	at java.base/sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:290)
	at java.base/sun.security.validator.Validator.validate(Validator.java:264)
	at java.base/sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:321)
	at java.base/sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:221)
	at java.base/sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:129)
	at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.checkServerCerts(CertificateMessage.java:626)
Caused: javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
	at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:131)
	at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:321)
	at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:264)
	at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:259)
	at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.checkServerCerts(CertificateMessage.java:642)
	at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.onCertificate(CertificateMessage.java:461)
	at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.consume(CertificateMessage.java:361)
	at java.base/sun.security.ssl.SSLHandshake.consume(SSLHandshake.java:392)
	at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:448)
	at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:425)
	at java.base/sun.security.ssl.TransportContext.dispatch(TransportContext.java:178)
	at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:164)
	at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1152)
	at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1063)
	at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:402)
	at java.base/sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:567)
	at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.followRedirect0(HttpURLConnection.java:2768)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.followRedirect(HttpURLConnection.java:2680)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1843)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1509)
	at java.base/java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:527)
	at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:329)
	at hudson.FilePath.installIfNecessaryFrom(FilePath.java:874)
Caused: java.io.IOException: Failed to install https://services.gradle.org/distributions/gradle-5.5.1-bin.zip to /home/build/jenkins-test/tools/hudson.plugins.gradle.GradleInstallation/gradle-5.5
	at hudson.FilePath.installIfNecessaryFrom(FilePath.java:938)
	at hudson.FilePath.installIfNecessaryFrom(FilePath.java:846)
	at hudson.tools.DownloadFromUrlInstaller.performInstallation(DownloadFromUrlInstaller.java:77)
	at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:69)
	at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:109)
	at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:206)
	at hudson.plugins.gradle.GradleInstallation.forNode(GradleInstallation.java:92)
	at hudson.plugins.gradle.GradleInstallation.forNode(GradleInstallation.java:30)
	at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:152)
	at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:133)
	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/93ecd2ab-622a-4306-ad97-6546972c3471%40googlegroups.com.


--
Thanks!
Mark Waite

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/4f6bdea1-95fd-4237-a7d7-b2f4c0834046%40googlegroups.com.


--
Thanks!
Mark Waite

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtHAoN%3D6-XG1%2Bkrd48J-ps39v7A06-n3JmHbtkQfx6V2eA%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Gradle Tool Failed Download

Sverre Moe-2
I thought of the same.
I downloaded the Gradle distribution zip file. Placed it in our Nexus Repository Manager, in a raw repository.

Used the Installer "Extract *.zip/*.tar.gz". Did not go so well
Tool: gradle-5.5
File: gradle-5.5.1-bin.zip

Get extracted in
hudson.plugins.gradle.GradleInstallation/gradle-5.5/gradle-5.5.1

My pipeline script suspects to find the gradle executable under ${gradleTool}/bin/gradle.

The GradleInstaller unpacks it under the tool name.

onsdag 7. august 2019 20.51.09 UTC+2 skrev Mark Waite følgende:
Maybe this is the time to reconfigure the tool installer to download from a locally cached copy of the tool instead of pulling it from the internet?

I've had good results with that technique by placing zip files of the tool installers inside my network and then configuring the tool installer to use the copy from my network instead of the copy from the internet.

On Wed, Aug 7, 2019 at 11:56 AM Sverre Moe <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="J_pPaVTPFgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">sver...@...> wrote:
I have no modifed cacerts.

Using wget also fails on the agent, until I set a proxy.
The Jenkins server does have proxy configured, but not the agents.
When I add HTTP Proxy in Jenkins under the Update Center I get a totally different stacktrace when it tries to retrieve the gradle tool.

Unpacking <a href="https://services.gradle.org/distributions/gradle-5.5.1-bin.zip" style="font-size: 15px; color: rgb(149, 115, 115); --darkreader-inline-color:#b7b2a7;" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fservices.gradle.org%2Fdistributions%2Fgradle-5.5.1-bin.zip\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNENMkYwq8EymLo0Nd04J1QhhkbWnQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fservices.gradle.org%2Fdistributions%2Fgradle-5.5.1-bin.zip\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNENMkYwq8EymLo0Nd04J1QhhkbWnQ&#39;;return true;" data-darkreader-inline-color="">https://services.gradle.org/distributions/gradle-5.5.1-bin.zip to /home/build/jenkins-test/tools/hudson.plugins.gradle.GradleInstallation/gradle-5.5 on master-sles12.3-x86_64_2
ERROR: Failed to download <a href="https://services.gradle.org/distributions/gradle-5.5.1-bin.zip" style="font-size: 15px; color: rgb(149, 115, 115); --darkreader-inline-color:#b7b2a7;" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fservices.gradle.org%2Fdistributions%2Fgradle-5.5.1-bin.zip\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNENMkYwq8EymLo0Nd04J1QhhkbWnQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fservices.gradle.org%2Fdistributions%2Fgradle-5.5.1-bin.zip\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNENMkYwq8EymLo0Nd04J1QhhkbWnQ&#39;;return true;" data-darkreader-inline-color="">https://services.gradle.org/distributions/gradle-5.5.1-bin.zip from agent; will retry from master
sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
	at sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141)
	at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126)
	at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280)
	at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:392)
Caused: sun.security.validator.ValidatorException: PKIX path building failed
	at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:397)
	at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:302)
	at sun.security.validator.Validator.validate(Validator.java:262)
	at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:330)
	at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:237)
	at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:132)
	at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1621)
Also:   hudson.remoting.Channel$CallSiteStackTrace: Remote call to master-sles12.3-x86_64_2
		at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1743)
		at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:357)
		at hudson.remoting.Channel.call(Channel.java:957)
		at hudson.FilePath.act(FilePath.java:1070)
		at hudson.FilePath.act(FilePath.java:1059)
		at hudson.FilePath.installIfNecessaryFrom(FilePath.java:913)
		at hudson.FilePath.installIfNecessaryFrom(FilePath.java:846)
		at hudson.tools.DownloadFromUrlInstaller.performInstallation(DownloadFromUrlInstaller.java:77)
		at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:69)
		at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:109)
		at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:206)
		at hudson.plugins.gradle.GradleInstallation.forNode(GradleInstallation.java:92)
		at hudson.plugins.gradle.GradleInstallation.forNode(GradleInstallation.java:30)
		at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:152)
		at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:133)
		at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
		at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
		at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
		at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
		at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
		at java.base/java.lang.Thread.run(Thread.java:834)
Caused: javax.net.ssl.SSLHandshakeException
	at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
	at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1946)
	at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:316)
	at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:310)
	at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1639)
	at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:223)
	at sun.security.ssl.Handshaker.processLoop(Handshaker.java:1037)
	at sun.security.ssl.Handshaker.process_record(Handshaker.java:965)
	at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1064)
	at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1367)
	at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1395)
	at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1379)
	at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559)
	at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
	at sun.net.www.protocol.http.HttpURLConnection.followRedirect0(HttpURLConnection.java:2735)
	at sun.net.www.protocol.http.HttpURLConnection.followRedirect(HttpURLConnection.java:2647)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1830)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1498)
	at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:268)
	at java.net.URL.openStream(URL.java:1057)
	at hudson.FilePath$Unpack.invoke(FilePath.java:949)
	at hudson.FilePath$Unpack.invoke(FilePath.java:943)
	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3050)
	at hudson.remoting.UserRequest.perform(UserRequest.java:212)
	at hudson.remoting.UserRequest.perform(UserRequest.java:54)
	at hudson.remoting.Request$2.run(Request.java:369)
	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

javax.net.ssl.SSLHandshakeException: Received fatal alert: access_denied
	at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:131)
	at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:117)
	at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:308)
	at java.base/sun.security.ssl.Alert$AlertConsumer.consume(Alert.java:285)
	at java.base/sun.security.ssl.TransportContext.dispatch(TransportContext.java:181)
	at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:164)
	at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1152)
	at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1063)
	at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:402)
	at java.base/sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:567)
	at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.followRedirect0(HttpURLConnection.java:2768)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.followRedirect(HttpURLConnection.java:2680)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1843)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1509)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:3084)
	at java.base/java.net.URLConnection.getHeaderFieldLong(URLConnection.java:636)
	at java.base/java.net.URLConnection.getContentLengthLong(URLConnection.java:508)
	at java.base/java.net.URLConnection.getContentLength(URLConnection.java:492)
	at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getContentLength(HttpsURLConnectionImpl.java:389)
	at org.jvnet.robust_http_client.RetryableHttpStream.<init>(RetryableHttpStream.java:90)
Caused: javax.net.ssl.SSLHandshakeException: Received fatal alert: access_denied
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
	at java.base/sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1963)
	at java.base/sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1958)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1957)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1525)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1509)
	at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:245)
	at org.jvnet.robust_http_client.RetryableHttpStream.getStream(RetryableHttpStream.java:98)
	at org.jvnet.robust_http_client.RetryableHttpStream.<init>(RetryableHttpStream.java:91)
	at hudson.ProxyConfiguration.getInputStream(ProxyConfiguration.java:285)
	at hudson.FilePath.installIfNecessaryFrom(FilePath.java:924)
Caused: java.io.IOException: Failed to install <a href="https://services.gradle.org/distributions/gradle-5.5.1-bin.zip" style="font-size: 15px; color: rgb(149, 115, 115); --darkreader-inline-color:#b7b2a7;" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fservices.gradle.org%2Fdistributions%2Fgradle-5.5.1-bin.zip\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNENMkYwq8EymLo0Nd04J1QhhkbWnQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fservices.gradle.org%2Fdistributions%2Fgradle-5.5.1-bin.zip\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNENMkYwq8EymLo0Nd04J1QhhkbWnQ&#39;;return true;" data-darkreader-inline-color="">https://services.gradle.org/distributions/gradle-5.5.1-bin.zip to /home/build/jenkins-test/tools/hudson.plugins.gradle.GradleInstallation/gradle-5.5
	at hudson.FilePath.installIfNecessaryFrom(FilePath.java:938)
	at hudson.FilePath.installIfNecessaryFrom(FilePath.java:846)
	at hudson.tools.DownloadFromUrlInstaller.performInstallation(DownloadFromUrlInstaller.java:77)
	at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:69)
	at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:109)
	at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:206)
	at hudson.plugins.gradle.GradleInstallation.forNode(GradleInstallation.java:92)
	at hudson.plugins.gradle.GradleInstallation.forNode(GradleInstallation.java:30)
	at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:152)
	at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:133)
	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)

onsdag 7. august 2019 19.28.15 UTC+2 skrev Mark Waite følgende:
I would guess that you may already be using a modified cacerts file which does not include the authority that is certifying the validity of the SSL certificate on the gradle site.

When I download from that URL, my web browser reports no issues from Google Chrome on Windows and no issues from wget on a FreeBSD computer.

On Wed, Aug 7, 2019 at 10:51 AM Sverre Moe <[hidden email]> wrote:
This has worked before. Now that we where to upgrade from Gradle 5.0 to 5.5 and added the tool gradle-5.5 it fails to retrieve the archive.

Anyone have an idea what the problem might be?

Running both Jenkins and Agents on Java 8 Update 221.

Is there any way arround this without hacking the JRE cacerts with the gradle web site certificate?

sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
	at java.base/sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141)
	at java.base/sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126)
	at java.base/java.security.cert.CertPathBuilder.build(CertPathBuilder.java:297)
	at java.base/sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:380)
Caused: sun.security.validator.ValidatorException: PKIX path building failed
	at java.base/sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:385)
	at java.base/sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:290)
	at java.base/sun.security.validator.Validator.validate(Validator.java:264)
	at java.base/sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:321)
	at java.base/sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:221)
	at java.base/sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:129)
	at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.checkServerCerts(CertificateMessage.java:626)
Caused: javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
	at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:131)
	at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:321)
	at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:264)
	at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:259)
	at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.checkServerCerts(CertificateMessage.java:642)
	at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.onCertificate(CertificateMessage.java:461)
	at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.consume(CertificateMessage.java:361)
	at java.base/sun.security.ssl.SSLHandshake.consume(SSLHandshake.java:392)
	at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:448)
	at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:425)
	at java.base/sun.security.ssl.TransportContext.dispatch(TransportContext.java:178)
	at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:164)
	at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1152)
	at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1063)
	at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:402)
	at java.base/sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:567)
	at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.followRedirect0(HttpURLConnection.java:2768)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.followRedirect(HttpURLConnection.java:2680)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1843)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1509)
	at java.base/<a href="http://java.net" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fjava.net\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHvsroZ72hHEGjeEAhG-RVyDevYYw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fjava.net\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHvsroZ72hHEGjeEAhG-RVyDevYYw&#39;;return true;">java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:527)
	at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:329)
	at hudson.FilePath.installIfNecessaryFrom(FilePath.java:874)
Caused: java.io.IOException: Failed to install <a href="https://services.gradle.org/distributions/gradle-5.5.1-bin.zip" style="font-size: 15px; color: rgb(149, 115, 115); --darkreader-inline-color:#b7b2a7;" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fservices.gradle.org%2Fdistributions%2Fgradle-5.5.1-bin.zip\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNENMkYwq8EymLo0Nd04J1QhhkbWnQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fservices.gradle.org%2Fdistributions%2Fgradle-5.5.1-bin.zip\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNENMkYwq8EymLo0Nd04J1QhhkbWnQ&#39;;return true;" data-darkreader-inline-color="">https://services.gradle.org/distributions/gradle-5.5.1-bin.zip to /home/build/jenkins-test/tools/hudson.plugins.gradle.GradleInstallation/gradle-5.5
	at hudson.FilePath.installIfNecessaryFrom(FilePath.java:938)
	at hudson.FilePath.installIfNecessaryFrom(FilePath.java:846)
	at hudson.tools.DownloadFromUrlInstaller.performInstallation(DownloadFromUrlInstaller.java:77)
	at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:69)
	at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:109)
	at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:206)
	at hudson.plugins.gradle.GradleInstallation.forNode(GradleInstallation.java:92)
	at hudson.plugins.gradle.GradleInstallation.forNode(GradleInstallation.java:30)
	at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:152)
	at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:133)
	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/jenkinsci-users/93ecd2ab-622a-4306-ad97-6546972c3471%40googlegroups.com?utm_medium=email&amp;utm_source=footer" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/93ecd2ab-622a-4306-ad97-6546972c3471%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/93ecd2ab-622a-4306-ad97-6546972c3471%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/jenkinsci-users/93ecd2ab-622a-4306-ad97-6546972c3471%40googlegroups.com.


--
Thanks!
Mark Waite

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="J_pPaVTPFgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">jenkins...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/jenkinsci-users/4f6bdea1-95fd-4237-a7d7-b2f4c0834046%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/4f6bdea1-95fd-4237-a7d7-b2f4c0834046%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/4f6bdea1-95fd-4237-a7d7-b2f4c0834046%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/jenkinsci-users/4f6bdea1-95fd-4237-a7d7-b2f4c0834046%40googlegroups.com.


--
Thanks!
Mark Waite

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/7855dd78-2614-4418-a62f-103de143b1db%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Gradle Tool Failed Download

Sverre Moe-2
Perhaps I could use instead the Installers "Run Shell Command", or "Run Batch Command".
Then unpack it myself, ensuring it gets unpacked within the tool name directory.
Would I need both in order for it to work on Linux and Windows?

onsdag 7. august 2019 21.04.09 UTC+2 skrev Sverre Moe følgende:
I thought of the same.
I downloaded the Gradle distribution zip file. Placed it in our Nexus Repository Manager, in a raw repository.

Used the Installer "Extract *.zip/*.tar.gz". Did not go so well
Tool: gradle-5.5
File: gradle-5.5.1-bin.zip

Get extracted in
hudson.plugins.gradle.GradleInstallation/gradle-5.5/gradle-5.5.1

My pipeline script suspects to find the gradle executable under ${gradleTool}/bin/gradle.

The GradleInstaller unpacks it under the tool name.

onsdag 7. august 2019 20.51.09 UTC+2 skrev Mark Waite følgende:
Maybe this is the time to reconfigure the tool installer to download from a locally cached copy of the tool instead of pulling it from the internet?

I've had good results with that technique by placing zip files of the tool installers inside my network and then configuring the tool installer to use the copy from my network instead of the copy from the internet.

On Wed, Aug 7, 2019 at 11:56 AM Sverre Moe <[hidden email]> wrote:
I have no modifed cacerts.

Using wget also fails on the agent, until I set a proxy.
The Jenkins server does have proxy configured, but not the agents.
When I add HTTP Proxy in Jenkins under the Update Center I get a totally different stacktrace when it tries to retrieve the gradle tool.

Unpacking <a href="https://services.gradle.org/distributions/gradle-5.5.1-bin.zip" style="font-size: 15px; color: rgb(149, 115, 115); --darkreader-inline-color:#b7b2a7;" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fservices.gradle.org%2Fdistributions%2Fgradle-5.5.1-bin.zip\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNENMkYwq8EymLo0Nd04J1QhhkbWnQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fservices.gradle.org%2Fdistributions%2Fgradle-5.5.1-bin.zip\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNENMkYwq8EymLo0Nd04J1QhhkbWnQ&#39;;return true;" data-darkreader-inline-color="">https://services.gradle.org/distributions/gradle-5.5.1-bin.zip to /home/build/jenkins-test/tools/hudson.plugins.gradle.GradleInstallation/gradle-5.5 on master-sles12.3-x86_64_2
ERROR: Failed to download <a href="https://services.gradle.org/distributions/gradle-5.5.1-bin.zip" style="font-size: 15px; color: rgb(149, 115, 115); --darkreader-inline-color:#b7b2a7;" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fservices.gradle.org%2Fdistributions%2Fgradle-5.5.1-bin.zip\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNENMkYwq8EymLo0Nd04J1QhhkbWnQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fservices.gradle.org%2Fdistributions%2Fgradle-5.5.1-bin.zip\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNENMkYwq8EymLo0Nd04J1QhhkbWnQ&#39;;return true;" data-darkreader-inline-color="">https://services.gradle.org/distributions/gradle-5.5.1-bin.zip from agent; will retry from master
sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
	at sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141)
	at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126)
	at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280)
	at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:392)
Caused: sun.security.validator.ValidatorException: PKIX path building failed
	at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:397)
	at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:302)
	at sun.security.validator.Validator.validate(Validator.java:262)
	at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:330)
	at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:237)
	at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:132)
	at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1621)
Also:   hudson.remoting.Channel$CallSiteStackTrace: Remote call to master-sles12.3-x86_64_2
		at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1743)
		at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:357)
		at hudson.remoting.Channel.call(Channel.java:957)
		at hudson.FilePath.act(FilePath.java:1070)
		at hudson.FilePath.act(FilePath.java:1059)
		at hudson.FilePath.installIfNecessaryFrom(FilePath.java:913)
		at hudson.FilePath.installIfNecessaryFrom(FilePath.java:846)
		at hudson.tools.DownloadFromUrlInstaller.performInstallation(DownloadFromUrlInstaller.java:77)
		at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:69)
		at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:109)
		at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:206)
		at hudson.plugins.gradle.GradleInstallation.forNode(GradleInstallation.java:92)
		at hudson.plugins.gradle.GradleInstallation.forNode(GradleInstallation.java:30)
		at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:152)
		at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:133)
		at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
		at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
		at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
		at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
		at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
		at java.base/java.lang.Thread.run(Thread.java:834)
Caused: javax.net.ssl.SSLHandshakeException
	at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
	at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1946)
	at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:316)
	at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:310)
	at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1639)
	at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:223)
	at sun.security.ssl.Handshaker.processLoop(Handshaker.java:1037)
	at sun.security.ssl.Handshaker.process_record(Handshaker.java:965)
	at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1064)
	at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1367)
	at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1395)
	at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1379)
	at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559)
	at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
	at sun.net.www.protocol.http.HttpURLConnection.followRedirect0(HttpURLConnection.java:2735)
	at sun.net.www.protocol.http.HttpURLConnection.followRedirect(HttpURLConnection.java:2647)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1830)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1498)
	at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:268)
	at java.net.URL.openStream(URL.java:1057)
	at hudson.FilePath$Unpack.invoke(FilePath.java:949)
	at hudson.FilePath$Unpack.invoke(FilePath.java:943)
	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3050)
	at hudson.remoting.UserRequest.perform(UserRequest.java:212)
	at hudson.remoting.UserRequest.perform(UserRequest.java:54)
	at hudson.remoting.Request$2.run(Request.java:369)
	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

javax.net.ssl.SSLHandshakeException: Received fatal alert: access_denied
	at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:131)
	at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:117)
	at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:308)
	at java.base/sun.security.ssl.Alert$AlertConsumer.consume(Alert.java:285)
	at java.base/sun.security.ssl.TransportContext.dispatch(TransportContext.java:181)
	at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:164)
	at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1152)
	at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1063)
	at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:402)
	at java.base/sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:567)
	at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.followRedirect0(HttpURLConnection.java:2768)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.followRedirect(HttpURLConnection.java:2680)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1843)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1509)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:3084)
	at java.base/java.net.URLConnection.getHeaderFieldLong(URLConnection.java:636)
	at java.base/java.net.URLConnection.getContentLengthLong(URLConnection.java:508)
	at java.base/java.net.URLConnection.getContentLength(URLConnection.java:492)
	at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getContentLength(HttpsURLConnectionImpl.java:389)
	at org.jvnet.robust_http_client.RetryableHttpStream.<init>(RetryableHttpStream.java:90)
Caused: javax.net.ssl.SSLHandshakeException: Received fatal alert: access_denied
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
	at java.base/sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1963)
	at java.base/sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1958)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1957)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1525)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1509)
	at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:245)
	at org.jvnet.robust_http_client.RetryableHttpStream.getStream(RetryableHttpStream.java:98)
	at org.jvnet.robust_http_client.RetryableHttpStream.<init>(RetryableHttpStream.java:91)
	at hudson.ProxyConfiguration.getInputStream(ProxyConfiguration.java:285)
	at hudson.FilePath.installIfNecessaryFrom(FilePath.java:924)
Caused: java.io.IOException: Failed to install <a href="https://services.gradle.org/distributions/gradle-5.5.1-bin.zip" style="font-size: 15px; color: rgb(149, 115, 115); --darkreader-inline-color:#b7b2a7;" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fservices.gradle.org%2Fdistributions%2Fgradle-5.5.1-bin.zip\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNENMkYwq8EymLo0Nd04J1QhhkbWnQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fservices.gradle.org%2Fdistributions%2Fgradle-5.5.1-bin.zip\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNENMkYwq8EymLo0Nd04J1QhhkbWnQ&#39;;return true;" data-darkreader-inline-color="">https://services.gradle.org/distributions/gradle-5.5.1-bin.zip to /home/build/jenkins-test/tools/hudson.plugins.gradle.GradleInstallation/gradle-5.5
	at hudson.FilePath.installIfNecessaryFrom(FilePath.java:938)
	at hudson.FilePath.installIfNecessaryFrom(FilePath.java:846)
	at hudson.tools.DownloadFromUrlInstaller.performInstallation(DownloadFromUrlInstaller.java:77)
	at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:69)
	at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:109)
	at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:206)
	at hudson.plugins.gradle.GradleInstallation.forNode(GradleInstallation.java:92)
	at hudson.plugins.gradle.GradleInstallation.forNode(GradleInstallation.java:30)
	at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:152)
	at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:133)
	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)

onsdag 7. august 2019 19.28.15 UTC+2 skrev Mark Waite følgende:
I would guess that you may already be using a modified cacerts file which does not include the authority that is certifying the validity of the SSL certificate on the gradle site.

When I download from that URL, my web browser reports no issues from Google Chrome on Windows and no issues from wget on a FreeBSD computer.

On Wed, Aug 7, 2019 at 10:51 AM Sverre Moe <[hidden email]> wrote:
This has worked before. Now that we where to upgrade from Gradle 5.0 to 5.5 and added the tool gradle-5.5 it fails to retrieve the archive.

Anyone have an idea what the problem might be?

Running both Jenkins and Agents on Java 8 Update 221.

Is there any way arround this without hacking the JRE cacerts with the gradle web site certificate?

sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
	at java.base/sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141)
	at java.base/sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126)
	at java.base/java.security.cert.CertPathBuilder.build(CertPathBuilder.java:297)
	at java.base/sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:380)
Caused: sun.security.validator.ValidatorException: PKIX path building failed
	at java.base/sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:385)
	at java.base/sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:290)
	at java.base/sun.security.validator.Validator.validate(Validator.java:264)
	at java.base/sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:321)
	at java.base/sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:221)
	at java.base/sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:129)
	at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.checkServerCerts(CertificateMessage.java:626)
Caused: javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
	at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:131)
	at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:321)
	at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:264)
	at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:259)
	at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.checkServerCerts(CertificateMessage.java:642)
	at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.onCertificate(CertificateMessage.java:461)
	at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.consume(CertificateMessage.java:361)
	at java.base/sun.security.ssl.SSLHandshake.consume(SSLHandshake.java:392)
	at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:448)
	at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:425)
	at java.base/sun.security.ssl.TransportContext.dispatch(TransportContext.java:178)
	at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:164)
	at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1152)
	at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1063)
	at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:402)
	at java.base/sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:567)
	at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.followRedirect0(HttpURLConnection.java:2768)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.followRedirect(HttpURLConnection.java:2680)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1843)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1509)
	at java.base/<a href="http://java.net" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fjava.net\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHvsroZ72hHEGjeEAhG-RVyDevYYw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fjava.net\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHvsroZ72hHEGjeEAhG-RVyDevYYw&#39;;return true;">java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:527)
	at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:329)
	at hudson.FilePath.installIfNecessaryFrom(FilePath.java:874)
Caused: java.io.IOException: Failed to install <a href="https://services.gradle.org/distributions/gradle-5.5.1-bin.zip" style="font-size: 15px; color: rgb(149, 115, 115); --darkreader-inline-color:#b7b2a7;" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fservices.gradle.org%2Fdistributions%2Fgradle-5.5.1-bin.zip\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNENMkYwq8EymLo0Nd04J1QhhkbWnQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fservices.gradle.org%2Fdistributions%2Fgradle-5.5.1-bin.zip\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNENMkYwq8EymLo0Nd04J1QhhkbWnQ&#39;;return true;" data-darkreader-inline-color="">https://services.gradle.org/distributions/gradle-5.5.1-bin.zip to /home/build/jenkins-test/tools/hudson.plugins.gradle.GradleInstallation/gradle-5.5
	at hudson.FilePath.installIfNecessaryFrom(FilePath.java:938)
	at hudson.FilePath.installIfNecessaryFrom(FilePath.java:846)
	at hudson.tools.DownloadFromUrlInstaller.performInstallation(DownloadFromUrlInstaller.java:77)
	at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:69)
	at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:109)
	at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:206)
	at hudson.plugins.gradle.GradleInstallation.forNode(GradleInstallation.java:92)
	at hudson.plugins.gradle.GradleInstallation.forNode(GradleInstallation.java:30)
	at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:152)
	at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:133)
	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/jenkinsci-users/93ecd2ab-622a-4306-ad97-6546972c3471%40googlegroups.com?utm_medium=email&amp;utm_source=footer" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/93ecd2ab-622a-4306-ad97-6546972c3471%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/93ecd2ab-622a-4306-ad97-6546972c3471%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/jenkinsci-users/93ecd2ab-622a-4306-ad97-6546972c3471%40googlegroups.com.


--
Thanks!
Mark Waite

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/jenkinsci-users/4f6bdea1-95fd-4237-a7d7-b2f4c0834046%40googlegroups.com?utm_medium=email&amp;utm_source=footer" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/4f6bdea1-95fd-4237-a7d7-b2f4c0834046%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/4f6bdea1-95fd-4237-a7d7-b2f4c0834046%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/jenkinsci-users/4f6bdea1-95fd-4237-a7d7-b2f4c0834046%40googlegroups.com.


--
Thanks!
Mark Waite

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/eb3f50ce-eda8-4695-aeeb-f46f5b74a750%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Gradle Tool Failed Download

Sverre Moe-2
Got it working using the "Run Shell Command". Though I find it very cumbersome.

wget --quiet https://nexus.company.no:8443/repository/gradle-distributions/gradle-5.5.1-bin.zip
unzip
-qq gradle-5.5.1-bin.zip
mv gradle
-5.5.1/* .
rmdir gradle-5.5.1
rm gradle-5.5.1-bin.zip


onsdag 7. august 2019 21.10.59 UTC+2 skrev Sverre Moe følgende:
Perhaps I could use instead the Installers "Run Shell Command", or "Run Batch Command".
Then unpack it myself, ensuring it gets unpacked within the tool name directory.
Would I need both in order for it to work on Linux and Windows?

onsdag 7. august 2019 21.04.09 UTC+2 skrev Sverre Moe følgende:
I thought of the same.
I downloaded the Gradle distribution zip file. Placed it in our Nexus Repository Manager, in a raw repository.

Used the Installer "Extract *.zip/*.tar.gz". Did not go so well
Tool: gradle-5.5
File: gradle-5.5.1-bin.zip

Get extracted in
hudson.plugins.gradle.GradleInstallation/gradle-5.5/gradle-5.5.1

My pipeline script suspects to find the gradle executable under ${gradleTool}/bin/gradle.

The GradleInstaller unpacks it under the tool name.

onsdag 7. august 2019 20.51.09 UTC+2 skrev Mark Waite følgende:
Maybe this is the time to reconfigure the tool installer to download from a locally cached copy of the tool instead of pulling it from the internet?

I've had good results with that technique by placing zip files of the tool installers inside my network and then configuring the tool installer to use the copy from my network instead of the copy from the internet.

On Wed, Aug 7, 2019 at 11:56 AM Sverre Moe <[hidden email]> wrote:
I have no modifed cacerts.

Using wget also fails on the agent, until I set a proxy.
The Jenkins server does have proxy configured, but not the agents.
When I add HTTP Proxy in Jenkins under the Update Center I get a totally different stacktrace when it tries to retrieve the gradle tool.

Unpacking <a href="https://services.gradle.org/distributions/gradle-5.5.1-bin.zip" style="font-size: 15px; color: rgb(149, 115, 115); --darkreader-inline-color:#b7b2a7;" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fservices.gradle.org%2Fdistributions%2Fgradle-5.5.1-bin.zip\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNENMkYwq8EymLo0Nd04J1QhhkbWnQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fservices.gradle.org%2Fdistributions%2Fgradle-5.5.1-bin.zip\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNENMkYwq8EymLo0Nd04J1QhhkbWnQ&#39;;return true;" data-darkreader-inline-color="">https://services.gradle.org/distributions/gradle-5.5.1-bin.zip to /home/build/jenkins-test/tools/hudson.plugins.gradle.GradleInstallation/gradle-5.5 on master-sles12.3-x86_64_2
ERROR: Failed to download <a href="https://services.gradle.org/distributions/gradle-5.5.1-bin.zip" style="font-size: 15px; color: rgb(149, 115, 115); --darkreader-inline-color:#b7b2a7;" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fservices.gradle.org%2Fdistributions%2Fgradle-5.5.1-bin.zip\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNENMkYwq8EymLo0Nd04J1QhhkbWnQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fservices.gradle.org%2Fdistributions%2Fgradle-5.5.1-bin.zip\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNENMkYwq8EymLo0Nd04J1QhhkbWnQ&#39;;return true;" data-darkreader-inline-color="">https://services.gradle.org/distributions/gradle-5.5.1-bin.zip from agent; will retry from master
sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
	at sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141)
	at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126)
	at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280)
	at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:392)
Caused: sun.security.validator.ValidatorException: PKIX path building failed
	at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:397)
	at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:302)
	at sun.security.validator.Validator.validate(Validator.java:262)
	at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:330)
	at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:237)
	at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:132)
	at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1621)
Also:   hudson.remoting.Channel$CallSiteStackTrace: Remote call to master-sles12.3-x86_64_2
		at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1743)
		at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:357)
		at hudson.remoting.Channel.call(Channel.java:957)
		at hudson.FilePath.act(FilePath.java:1070)
		at hudson.FilePath.act(FilePath.java:1059)
		at hudson.FilePath.installIfNecessaryFrom(FilePath.java:913)
		at hudson.FilePath.installIfNecessaryFrom(FilePath.java:846)
		at hudson.tools.DownloadFromUrlInstaller.performInstallation(DownloadFromUrlInstaller.java:77)
		at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:69)
		at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:109)
		at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:206)
		at hudson.plugins.gradle.GradleInstallation.forNode(GradleInstallation.java:92)
		at hudson.plugins.gradle.GradleInstallation.forNode(GradleInstallation.java:30)
		at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:152)
		at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:133)
		at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
		at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
		at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
		at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
		at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
		at java.base/java.lang.Thread.run(Thread.java:834)
Caused: javax.net.ssl.SSLHandshakeException
	at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
	at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1946)
	at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:316)
	at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:310)
	at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1639)
	at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:223)
	at sun.security.ssl.Handshaker.processLoop(Handshaker.java:1037)
	at sun.security.ssl.Handshaker.process_record(Handshaker.java:965)
	at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1064)
	at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1367)
	at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1395)
	at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1379)
	at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559)
	at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
	at sun.net.www.protocol.http.HttpURLConnection.followRedirect0(HttpURLConnection.java:2735)
	at sun.net.www.protocol.http.HttpURLConnection.followRedirect(HttpURLConnection.java:2647)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1830)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1498)
	at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:268)
	at java.net.URL.openStream(URL.java:1057)
	at hudson.FilePath$Unpack.invoke(FilePath.java:949)
	at hudson.FilePath$Unpack.invoke(FilePath.java:943)
	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3050)
	at hudson.remoting.UserRequest.perform(UserRequest.java:212)
	at hudson.remoting.UserRequest.perform(UserRequest.java:54)
	at hudson.remoting.Request$2.run(Request.java:369)
	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

javax.net.ssl.SSLHandshakeException: Received fatal alert: access_denied
	at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:131)
	at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:117)
	at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:308)
	at java.base/sun.security.ssl.Alert$AlertConsumer.consume(Alert.java:285)
	at java.base/sun.security.ssl.TransportContext.dispatch(TransportContext.java:181)
	at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:164)
	at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1152)
	at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1063)
	at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:402)
	at java.base/sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:567)
	at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.followRedirect0(HttpURLConnection.java:2768)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.followRedirect(HttpURLConnection.java:2680)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1843)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1509)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:3084)
	at java.base/java.net.URLConnection.getHeaderFieldLong(URLConnection.java:636)
	at java.base/java.net.URLConnection.getContentLengthLong(URLConnection.java:508)
	at java.base/java.net.URLConnection.getContentLength(URLConnection.java:492)
	at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getContentLength(HttpsURLConnectionImpl.java:389)
	at org.jvnet.robust_http_client.RetryableHttpStream.<init>(RetryableHttpStream.java:90)
Caused: javax.net.ssl.SSLHandshakeException: Received fatal alert: access_denied
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
	at java.base/sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1963)
	at java.base/sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1958)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1957)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1525)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1509)
	at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:245)
	at org.jvnet.robust_http_client.RetryableHttpStream.getStream(RetryableHttpStream.java:98)
	at org.jvnet.robust_http_client.RetryableHttpStream.<init>(RetryableHttpStream.java:91)
	at hudson.ProxyConfiguration.getInputStream(ProxyConfiguration.java:285)
	at hudson.FilePath.installIfNecessaryFrom(FilePath.java:924)
Caused: java.io.IOException: Failed to install <a href="https://services.gradle.org/distributions/gradle-5.5.1-bin.zip" style="font-size: 15px; color: rgb(149, 115, 115); --darkreader-inline-color:#b7b2a7;" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fservices.gradle.org%2Fdistributions%2Fgradle-5.5.1-bin.zip\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNENMkYwq8EymLo0Nd04J1QhhkbWnQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fservices.gradle.org%2Fdistributions%2Fgradle-5.5.1-bin.zip\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNENMkYwq8EymLo0Nd04J1QhhkbWnQ&#39;;return true;" data-darkreader-inline-color="">https://services.gradle.org/distributions/gradle-5.5.1-bin.zip to /home/build/jenkins-test/tools/hudson.plugins.gradle.GradleInstallation/gradle-5.5
	at hudson.FilePath.installIfNecessaryFrom(FilePath.java:938)
	at hudson.FilePath.installIfNecessaryFrom(FilePath.java:846)
	at hudson.tools.DownloadFromUrlInstaller.performInstallation(DownloadFromUrlInstaller.java:77)
	at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:69)
	at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:109)
	at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:206)
	at hudson.plugins.gradle.GradleInstallation.forNode(GradleInstallation.java:92)
	at hudson.plugins.gradle.GradleInstallation.forNode(GradleInstallation.java:30)
	at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:152)
	at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:133)
	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)

onsdag 7. august 2019 19.28.15 UTC+2 skrev Mark Waite følgende:
I would guess that you may already be using a modified cacerts file which does not include the authority that is certifying the validity of the SSL certificate on the gradle site.

When I download from that URL, my web browser reports no issues from Google Chrome on Windows and no issues from wget on a FreeBSD computer.

On Wed, Aug 7, 2019 at 10:51 AM Sverre Moe <[hidden email]> wrote:
This has worked before. Now that we where to upgrade from Gradle 5.0 to 5.5 and added the tool gradle-5.5 it fails to retrieve the archive.

Anyone have an idea what the problem might be?

Running both Jenkins and Agents on Java 8 Update 221.

Is there any way arround this without hacking the JRE cacerts with the gradle web site certificate?

sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
	at java.base/sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141)
	at java.base/sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126)
	at java.base/java.security.cert.CertPathBuilder.build(CertPathBuilder.java:297)
	at java.base/sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:380)
Caused: sun.security.validator.ValidatorException: PKIX path building failed
	at java.base/sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:385)
	at java.base/sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:290)
	at java.base/sun.security.validator.Validator.validate(Validator.java:264)
	at java.base/sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:321)
	at java.base/sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:221)
	at java.base/sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:129)
	at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.checkServerCerts(CertificateMessage.java:626)
Caused: javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
	at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:131)
	at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:321)
	at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:264)
	at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:259)
	at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.checkServerCerts(CertificateMessage.java:642)
	at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.onCertificate(CertificateMessage.java:461)
	at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.consume(CertificateMessage.java:361)
	at java.base/sun.security.ssl.SSLHandshake.consume(SSLHandshake.java:392)
	at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:448)
	at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:425)
	at java.base/sun.security.ssl.TransportContext.dispatch(TransportContext.java:178)
	at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:164)
	at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1152)
	at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1063)
	at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:402)
	at java.base/sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:567)
	at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.followRedirect0(HttpURLConnection.java:2768)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.followRedirect(HttpURLConnection.java:2680)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1843)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1509)
	at java.base/<a href="http://java.net" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fjava.net\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHvsroZ72hHEGjeEAhG-RVyDevYYw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fjava.net\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHvsroZ72hHEGjeEAhG-RVyDevYYw&#39;;return true;">java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:527)
	at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:329)
	at hudson.FilePath.installIfNecessaryFrom(FilePath.java:874)
Caused: java.io.IOException: Failed to install <a href="https://services.gradle.org/distributions/gradle-5.5.1-bin.zip" style="font-size: 15px; color: rgb(149, 115, 115); --darkreader-inline-color:#b7b2a7;" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fservices.gradle.org%2Fdistributions%2Fgradle-5.5.1-bin.zip\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNENMkYwq8EymLo0Nd04J1QhhkbWnQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fservices.gradle.org%2Fdistributions%2Fgradle-5.5.1-bin.zip\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNENMkYwq8EymLo0Nd04J1QhhkbWnQ&#39;;return true;" data-darkreader-inline-color="">https://services.gradle.org/distributions/gradle-5.5.1-bin.zip to /home/build/jenkins-test/tools/hudson.plugins.gradle.GradleInstallation/gradle-5.5
	at hudson.FilePath.installIfNecessaryFrom(FilePath.java:938)
	at hudson.FilePath.installIfNecessaryFrom(FilePath.java:846)
	at hudson.tools.DownloadFromUrlInstaller.performInstallation(DownloadFromUrlInstaller.java:77)
	at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:69)
	at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:109)
	at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:206)
	at hudson.plugins.gradle.GradleInstallation.forNode(GradleInstallation.java:92)
	at hudson.plugins.gradle.GradleInstallation.forNode(GradleInstallation.java:30)
	at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:152)
	at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:133)
	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/jenkinsci-users/93ecd2ab-622a-4306-ad97-6546972c3471%40googlegroups.com?utm_medium=email&amp;utm_source=footer" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/93ecd2ab-622a-4306-ad97-6546972c3471%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/93ecd2ab-622a-4306-ad97-6546972c3471%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/jenkinsci-users/93ecd2ab-622a-4306-ad97-6546972c3471%40googlegroups.com.


--
Thanks!
Mark Waite

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/jenkinsci-users/4f6bdea1-95fd-4237-a7d7-b2f4c0834046%40googlegroups.com?utm_medium=email&amp;utm_source=footer" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/4f6bdea1-95fd-4237-a7d7-b2f4c0834046%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/4f6bdea1-95fd-4237-a7d7-b2f4c0834046%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/jenkinsci-users/4f6bdea1-95fd-4237-a7d7-b2f4c0834046%40googlegroups.com.


--
Thanks!
Mark Waite

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/af4494fc-4010-4421-a9c3-b87406426b03%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Gradle Tool Failed Download

Richard Bywater-3
Personally with Gradle I've always found it easier to use Gradle Wrapper instead of full installs.

Don't know if that's an option for you or not. 

Richard.

On Thu, 8 Aug 2019, 7:38 AM Sverre Moe, <[hidden email]> wrote:
Got it working using the "Run Shell Command". Though I find it very cumbersome.

wget --quiet https://nexus.company.no:8443/repository/gradle-distributions/gradle-5.5.1-bin.zip
unzip
-qq gradle-5.5.1-bin.zip
mv gradle
-5.5.1/* .
rmdir gradle-5.5.1
rm gradle-5.5.1-bin.zip


onsdag 7. august 2019 21.10.59 UTC+2 skrev Sverre Moe følgende:
Perhaps I could use instead the Installers "Run Shell Command", or "Run Batch Command".
Then unpack it myself, ensuring it gets unpacked within the tool name directory.
Would I need both in order for it to work on Linux and Windows?

onsdag 7. august 2019 21.04.09 UTC+2 skrev Sverre Moe følgende:
I thought of the same.
I downloaded the Gradle distribution zip file. Placed it in our Nexus Repository Manager, in a raw repository.

Used the Installer "Extract *.zip/*.tar.gz". Did not go so well
Tool: gradle-5.5
File: gradle-5.5.1-bin.zip

Get extracted in
hudson.plugins.gradle.GradleInstallation/gradle-5.5/gradle-5.5.1

My pipeline script suspects to find the gradle executable under ${gradleTool}/bin/gradle.

The GradleInstaller unpacks it under the tool name.

onsdag 7. august 2019 20.51.09 UTC+2 skrev Mark Waite følgende:
Maybe this is the time to reconfigure the tool installer to download from a locally cached copy of the tool instead of pulling it from the internet?

I've had good results with that technique by placing zip files of the tool installers inside my network and then configuring the tool installer to use the copy from my network instead of the copy from the internet.

On Wed, Aug 7, 2019 at 11:56 AM Sverre Moe <[hidden email]> wrote:
I have no modifed cacerts.

Using wget also fails on the agent, until I set a proxy.
The Jenkins server does have proxy configured, but not the agents.
When I add HTTP Proxy in Jenkins under the Update Center I get a totally different stacktrace when it tries to retrieve the gradle tool.

Unpacking https://services.gradle.org/distributions/gradle-5.5.1-bin.zip to /home/build/jenkins-test/tools/hudson.plugins.gradle.GradleInstallation/gradle-5.5 on master-sles12.3-x86_64_2
ERROR: Failed to download https://services.gradle.org/distributions/gradle-5.5.1-bin.zip from agent; will retry from master
sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
	at sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141)
	at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126)
	at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280)
	at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:392)
Caused: sun.security.validator.ValidatorException: PKIX path building failed
	at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:397)
	at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:302)
	at sun.security.validator.Validator.validate(Validator.java:262)
	at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:330)
	at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:237)
	at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:132)
	at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1621)
Also:   hudson.remoting.Channel$CallSiteStackTrace: Remote call to master-sles12.3-x86_64_2
		at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1743)
		at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:357)
		at hudson.remoting.Channel.call(Channel.java:957)
		at hudson.FilePath.act(FilePath.java:1070)
		at hudson.FilePath.act(FilePath.java:1059)
		at hudson.FilePath.installIfNecessaryFrom(FilePath.java:913)
		at hudson.FilePath.installIfNecessaryFrom(FilePath.java:846)
		at hudson.tools.DownloadFromUrlInstaller.performInstallation(DownloadFromUrlInstaller.java:77)
		at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:69)
		at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:109)
		at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:206)
		at hudson.plugins.gradle.GradleInstallation.forNode(GradleInstallation.java:92)
		at hudson.plugins.gradle.GradleInstallation.forNode(GradleInstallation.java:30)
		at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:152)
		at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:133)
		at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
		at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
		at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
		at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
		at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
		at java.base/java.lang.Thread.run(Thread.java:834)
Caused: javax.net.ssl.SSLHandshakeException
	at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
	at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1946)
	at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:316)
	at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:310)
	at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1639)
	at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:223)
	at sun.security.ssl.Handshaker.processLoop(Handshaker.java:1037)
	at sun.security.ssl.Handshaker.process_record(Handshaker.java:965)
	at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1064)
	at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1367)
	at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1395)
	at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1379)
	at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559)
	at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
	at sun.net.www.protocol.http.HttpURLConnection.followRedirect0(HttpURLConnection.java:2735)
	at sun.net.www.protocol.http.HttpURLConnection.followRedirect(HttpURLConnection.java:2647)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1830)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1498)
	at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:268)
	at java.net.URL.openStream(URL.java:1057)
	at hudson.FilePath$Unpack.invoke(FilePath.java:949)
	at hudson.FilePath$Unpack.invoke(FilePath.java:943)
	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3050)
	at hudson.remoting.UserRequest.perform(UserRequest.java:212)
	at hudson.remoting.UserRequest.perform(UserRequest.java:54)
	at hudson.remoting.Request$2.run(Request.java:369)
	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

javax.net.ssl.SSLHandshakeException: Received fatal alert: access_denied
	at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:131)
	at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:117)
	at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:308)
	at java.base/sun.security.ssl.Alert$AlertConsumer.consume(Alert.java:285)
	at java.base/sun.security.ssl.TransportContext.dispatch(TransportContext.java:181)
	at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:164)
	at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1152)
	at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1063)
	at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:402)
	at java.base/sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:567)
	at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.followRedirect0(HttpURLConnection.java:2768)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.followRedirect(HttpURLConnection.java:2680)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1843)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1509)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:3084)
	at java.base/java.net.URLConnection.getHeaderFieldLong(URLConnection.java:636)
	at java.base/java.net.URLConnection.getContentLengthLong(URLConnection.java:508)
	at java.base/java.net.URLConnection.getContentLength(URLConnection.java:492)
	at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getContentLength(HttpsURLConnectionImpl.java:389)
	at org.jvnet.robust_http_client.RetryableHttpStream.<init>(RetryableHttpStream.java:90)
Caused: javax.net.ssl.SSLHandshakeException: Received fatal alert: access_denied
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
	at java.base/sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1963)
	at java.base/sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1958)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1957)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1525)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1509)
	at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:245)
	at org.jvnet.robust_http_client.RetryableHttpStream.getStream(RetryableHttpStream.java:98)
	at org.jvnet.robust_http_client.RetryableHttpStream.<init>(RetryableHttpStream.java:91)
	at hudson.ProxyConfiguration.getInputStream(ProxyConfiguration.java:285)
	at hudson.FilePath.installIfNecessaryFrom(FilePath.java:924)
Caused: java.io.IOException: Failed to install https://services.gradle.org/distributions/gradle-5.5.1-bin.zip to /home/build/jenkins-test/tools/hudson.plugins.gradle.GradleInstallation/gradle-5.5
	at hudson.FilePath.installIfNecessaryFrom(FilePath.java:938)
	at hudson.FilePath.installIfNecessaryFrom(FilePath.java:846)
	at hudson.tools.DownloadFromUrlInstaller.performInstallation(DownloadFromUrlInstaller.java:77)
	at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:69)
	at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:109)
	at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:206)
	at hudson.plugins.gradle.GradleInstallation.forNode(GradleInstallation.java:92)
	at hudson.plugins.gradle.GradleInstallation.forNode(GradleInstallation.java:30)
	at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:152)
	at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:133)
	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)

onsdag 7. august 2019 19.28.15 UTC+2 skrev Mark Waite følgende:
I would guess that you may already be using a modified cacerts file which does not include the authority that is certifying the validity of the SSL certificate on the gradle site.

When I download from that URL, my web browser reports no issues from Google Chrome on Windows and no issues from wget on a FreeBSD computer.

On Wed, Aug 7, 2019 at 10:51 AM Sverre Moe <[hidden email]> wrote:
This has worked before. Now that we where to upgrade from Gradle 5.0 to 5.5 and added the tool gradle-5.5 it fails to retrieve the archive.

Anyone have an idea what the problem might be?

Running both Jenkins and Agents on Java 8 Update 221.

Is there any way arround this without hacking the JRE cacerts with the gradle web site certificate?

sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
	at java.base/sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141)
	at java.base/sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126)
	at java.base/java.security.cert.CertPathBuilder.build(CertPathBuilder.java:297)
	at java.base/sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:380)
Caused: sun.security.validator.ValidatorException: PKIX path building failed
	at java.base/sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:385)
	at java.base/sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:290)
	at java.base/sun.security.validator.Validator.validate(Validator.java:264)
	at java.base/sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:321)
	at java.base/sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:221)
	at java.base/sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:129)
	at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.checkServerCerts(CertificateMessage.java:626)
Caused: javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
	at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:131)
	at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:321)
	at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:264)
	at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:259)
	at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.checkServerCerts(CertificateMessage.java:642)
	at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.onCertificate(CertificateMessage.java:461)
	at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.consume(CertificateMessage.java:361)
	at java.base/sun.security.ssl.SSLHandshake.consume(SSLHandshake.java:392)
	at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:448)
	at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:425)
	at java.base/sun.security.ssl.TransportContext.dispatch(TransportContext.java:178)
	at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:164)
	at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1152)
	at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1063)
	at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:402)
	at java.base/sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:567)
	at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.followRedirect0(HttpURLConnection.java:2768)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.followRedirect(HttpURLConnection.java:2680)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1843)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1509)
	at java.base/java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:527)
	at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:329)
	at hudson.FilePath.installIfNecessaryFrom(FilePath.java:874)
Caused: java.io.IOException: Failed to install https://services.gradle.org/distributions/gradle-5.5.1-bin.zip to /home/build/jenkins-test/tools/hudson.plugins.gradle.GradleInstallation/gradle-5.5
	at hudson.FilePath.installIfNecessaryFrom(FilePath.java:938)
	at hudson.FilePath.installIfNecessaryFrom(FilePath.java:846)
	at hudson.tools.DownloadFromUrlInstaller.performInstallation(DownloadFromUrlInstaller.java:77)
	at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:69)
	at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:109)
	at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:206)
	at hudson.plugins.gradle.GradleInstallation.forNode(GradleInstallation.java:92)
	at hudson.plugins.gradle.GradleInstallation.forNode(GradleInstallation.java:30)
	at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:152)
	at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:133)
	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/93ecd2ab-622a-4306-ad97-6546972c3471%40googlegroups.com.


--
Thanks!
Mark Waite

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/4f6bdea1-95fd-4237-a7d7-b2f4c0834046%40googlegroups.com.


--
Thanks!
Mark Waite

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/af4494fc-4010-4421-a9c3-b87406426b03%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAAy0hwdCnZEkwCec2jP4joQP2J2de-b8GcxUj1szH5zZ4KMdjg%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Gradle Tool Failed Download

Sverre Moe-2
I am not very keen on checking in the gradle wrapper to git. Though I do see the appeal.

Now with Gradle 5.5 I am planning on creating a custom Gradle distribution and storing it with Nexus NXRM.
https://docs.gradle.org/5.5/userguide/organizing_gradle_projects.html#sec:custom_gradle_distribution

onsdag 7. august 2019 22.00.53 UTC+2 skrev Richard Bywater følgende:
Personally with Gradle I've always found it easier to use Gradle Wrapper instead of full installs.

Don't know if that's an option for you or not. 

Richard.

On Thu, 8 Aug 2019, 7:38 AM Sverre Moe, <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="ktJQayLTFgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">sver...@...> wrote:
Got it working using the "Run Shell Command". Though I find it very cumbersome.

wget --quiet https://<a href="http://nexus.company.no:8443/repository/gradle-distributions/gradle-5.5.1-bin.zip" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fnexus.company.no%3A8443%2Frepository%2Fgradle-distributions%2Fgradle-5.5.1-bin.zip\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFzfuTv2wCbe9StktzF00fIUOABFg&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fnexus.company.no%3A8443%2Frepository%2Fgradle-distributions%2Fgradle-5.5.1-bin.zip\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFzfuTv2wCbe9StktzF00fIUOABFg&#39;;return true;">nexus.company.no:8443/repository/gradle-distributions/gradle-5.5.1-bin.zip
unzip
-qq gradle-5.5.1-bin.zip
mv gradle
-5.5.1/* .
rmdir gradle-5.5.1
rm gradle-5.5.1-bin.zip


onsdag 7. august 2019 21.10.59 UTC+2 skrev Sverre Moe følgende:
Perhaps I could use instead the Installers "Run Shell Command", or "Run Batch Command".
Then unpack it myself, ensuring it gets unpacked within the tool name directory.
Would I need both in order for it to work on Linux and Windows?

onsdag 7. august 2019 21.04.09 UTC+2 skrev Sverre Moe følgende:
I thought of the same.
I downloaded the Gradle distribution zip file. Placed it in our Nexus Repository Manager, in a raw repository.

Used the Installer "Extract *.zip/*.tar.gz". Did not go so well
Tool: gradle-5.5
File: gradle-5.5.1-bin.zip

Get extracted in
hudson.plugins.gradle.GradleInstallation/gradle-5.5/gradle-5.5.1

My pipeline script suspects to find the gradle executable under ${gradleTool}/bin/gradle.

The GradleInstaller unpacks it under the tool name.

onsdag 7. august 2019 20.51.09 UTC+2 skrev Mark Waite følgende:
Maybe this is the time to reconfigure the tool installer to download from a locally cached copy of the tool instead of pulling it from the internet?

I've had good results with that technique by placing zip files of the tool installers inside my network and then configuring the tool installer to use the copy from my network instead of the copy from the internet.

On Wed, Aug 7, 2019 at 11:56 AM Sverre Moe <[hidden email]> wrote:
I have no modifed cacerts.

Using wget also fails on the agent, until I set a proxy.
The Jenkins server does have proxy configured, but not the agents.
When I add HTTP Proxy in Jenkins under the Update Center I get a totally different stacktrace when it tries to retrieve the gradle tool.

Unpacking <a href="https://services.gradle.org/distributions/gradle-5.5.1-bin.zip" style="font-size: 15px; color: rgb(149, 115, 115); --darkreader-inline-color:#b7b2a7;" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fservices.gradle.org%2Fdistributions%2Fgradle-5.5.1-bin.zip\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNENMkYwq8EymLo0Nd04J1QhhkbWnQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fservices.gradle.org%2Fdistributions%2Fgradle-5.5.1-bin.zip\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNENMkYwq8EymLo0Nd04J1QhhkbWnQ&#39;;return true;" data-darkreader-inline-color="">https://services.gradle.org/distributions/gradle-5.5.1-bin.zip to /home/build/jenkins-test/tools/hudson.plugins.gradle.GradleInstallation/gradle-5.5 on master-sles12.3-x86_64_2
ERROR: Failed to download <a href="https://services.gradle.org/distributions/gradle-5.5.1-bin.zip" style="font-size: 15px; color: rgb(149, 115, 115); --darkreader-inline-color:#b7b2a7;" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fservices.gradle.org%2Fdistributions%2Fgradle-5.5.1-bin.zip\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNENMkYwq8EymLo0Nd04J1QhhkbWnQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fservices.gradle.org%2Fdistributions%2Fgradle-5.5.1-bin.zip\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNENMkYwq8EymLo0Nd04J1QhhkbWnQ&#39;;return true;" data-darkreader-inline-color="">https://services.gradle.org/distributions/gradle-5.5.1-bin.zip from agent; will retry from master
sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
	at sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141)
	at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126)
	at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280)
	at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:392)
Caused: sun.security.validator.ValidatorException: PKIX path building failed
	at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:397)
	at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:302)
	at sun.security.validator.Validator.validate(Validator.java:262)
	at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:330)
	at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:237)
	at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:132)
	at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1621)
Also:   hudson.remoting.Channel$CallSiteStackTrace: Remote call to master-sles12.3-x86_64_2
		at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1743)
		at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:357)
		at hudson.remoting.Channel.call(Channel.java:957)
		at hudson.FilePath.act(FilePath.java:1070)
		at hudson.FilePath.act(FilePath.java:1059)
		at hudson.FilePath.installIfNecessaryFrom(FilePath.java:913)
		at hudson.FilePath.installIfNecessaryFrom(FilePath.java:846)
		at hudson.tools.DownloadFromUrlInstaller.performInstallation(DownloadFromUrlInstaller.java:77)
		at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:69)
		at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:109)
		at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:206)
		at hudson.plugins.gradle.GradleInstallation.forNode(GradleInstallation.java:92)
		at hudson.plugins.gradle.GradleInstallation.forNode(GradleInstallation.java:30)
		at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:152)
		at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:133)
		at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
		at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
		at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
		at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
		at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
		at java.base/java.lang.Thread.run(Thread.java:834)
Caused: javax.net.ssl.SSLHandshakeException
	at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
	at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1946)
	at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:316)
	at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:310)
	at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1639)
	at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:223)
	at sun.security.ssl.Handshaker.processLoop(Handshaker.java:1037)
	at sun.security.ssl.Handshaker.process_record(Handshaker.java:965)
	at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1064)
	at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1367)
	at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1395)
	at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1379)
	at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559)
	at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
	at sun.net.www.protocol.http.HttpURLConnection.followRedirect0(HttpURLConnection.java:2735)
	at sun.net.www.protocol.http.HttpURLConnection.followRedirect(HttpURLConnection.java:2647)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1830)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1498)
	at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:268)
	at java.net.URL.openStream(URL.java:1057)
	at hudson.FilePath$Unpack.invoke(FilePath.java:949)
	at hudson.FilePath$Unpack.invoke(FilePath.java:943)
	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3050)
	at hudson.remoting.UserRequest.perform(UserRequest.java:212)
	at hudson.remoting.UserRequest.perform(UserRequest.java:54)
	at hudson.remoting.Request$2.run(Request.java:369)
	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

javax.net.ssl.SSLHandshakeException: Received fatal alert: access_denied
	at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:131)
	at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:117)
	at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:308)
	at java.base/sun.security.ssl.Alert$AlertConsumer.consume(Alert.java:285)
	at java.base/sun.security.ssl.TransportContext.dispatch(TransportContext.java:181)
	at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:164)
	at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1152)
	at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1063)
	at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:402)
	at java.base/sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:567)
	at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.followRedirect0(HttpURLConnection.java:2768)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.followRedirect(HttpURLConnection.java:2680)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1843)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1509)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:3084)
	at java.base/<a href="http://java.net" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fjava.net\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHvsroZ72hHEGjeEAhG-RVyDevYYw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fjava.net\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHvsroZ72hHEGjeEAhG-RVyDevYYw&#39;;return true;">java.net.URLConnection.getHeaderFieldLong(URLConnection.java:636)
	at java.base/<a href="http://java.net" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fjava.net\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHvsroZ72hHEGjeEAhG-RVyDevYYw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fjava.net\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHvsroZ72hHEGjeEAhG-RVyDevYYw&#39;;return true;">java.net.URLConnection.getContentLengthLong(URLConnection.java:508)
	at java.base/<a href="http://java.net" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fjava.net\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHvsroZ72hHEGjeEAhG-RVyDevYYw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fjava.net\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHvsroZ72hHEGjeEAhG-RVyDevYYw&#39;;return true;">java.net.URLConnection.getContentLength(URLConnection.java:492)
	at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getContentLength(HttpsURLConnectionImpl.java:389)
	at org.jvnet.robust_http_client.RetryableHttpStream.<init>(RetryableHttpStream.java:90)
Caused: javax.net.ssl.SSLHandshakeException: Received fatal alert: access_denied
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
	at java.base/sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1963)
	at java.base/sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1958)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1957)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1525)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1509)
	at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:245)
	at org.jvnet.robust_http_client.RetryableHttpStream.getStream(RetryableHttpStream.java:98)
	at org.jvnet.robust_http_client.RetryableHttpStream.<init>(RetryableHttpStream.java:91)
	at hudson.ProxyConfiguration.getInputStream(ProxyConfiguration.java:285)
	at hudson.FilePath.installIfNecessaryFrom(FilePath.java:924)
Caused: java.io.IOException: Failed to install <a href="https://services.gradle.org/distributions/gradle-5.5.1-bin.zip" style="font-size: 15px; color: rgb(149, 115, 115); --darkreader-inline-color:#b7b2a7;" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fservices.gradle.org%2Fdistributions%2Fgradle-5.5.1-bin.zip\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNENMkYwq8EymLo0Nd04J1QhhkbWnQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fservices.gradle.org%2Fdistributions%2Fgradle-5.5.1-bin.zip\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNENMkYwq8EymLo0Nd04J1QhhkbWnQ&#39;;return true;" data-darkreader-inline-color="">https://services.gradle.org/distributions/gradle-5.5.1-bin.zip to /home/build/jenkins-test/tools/hudson.plugins.gradle.GradleInstallation/gradle-5.5
	at hudson.FilePath.installIfNecessaryFrom(FilePath.java:938)
	at hudson.FilePath.installIfNecessaryFrom(FilePath.java:846)
	at hudson.tools.DownloadFromUrlInstaller.performInstallation(DownloadFromUrlInstaller.java:77)
	at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:69)
	at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:109)
	at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:206)
	at hudson.plugins.gradle.GradleInstallation.forNode(GradleInstallation.java:92)
	at hudson.plugins.gradle.GradleInstallation.forNode(GradleInstallation.java:30)
	at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:152)
	at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:133)
	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)

onsdag 7. august 2019 19.28.15 UTC+2 skrev Mark Waite følgende:
I would guess that you may already be using a modified cacerts file which does not include the authority that is certifying the validity of the SSL certificate on the gradle site.

When I download from that URL, my web browser reports no issues from Google Chrome on Windows and no issues from wget on a FreeBSD computer.

On Wed, Aug 7, 2019 at 10:51 AM Sverre Moe <[hidden email]> wrote:
This has worked before. Now that we where to upgrade from Gradle 5.0 to 5.5 and added the tool gradle-5.5 it fails to retrieve the archive.

Anyone have an idea what the problem might be?

Running both Jenkins and Agents on Java 8 Update 221.

Is there any way arround this without hacking the JRE cacerts with the gradle web site certificate?

sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
	at java.base/sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141)
	at java.base/sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126)
	at java.base/java.security.cert.CertPathBuilder.build(CertPathBuilder.java:297)
	at java.base/sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:380)
Caused: sun.security.validator.ValidatorException: PKIX path building failed
	at java.base/sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:385)
	at java.base/sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:290)
	at java.base/sun.security.validator.Validator.validate(Validator.java:264)
	at java.base/sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:321)
	at java.base/sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:221)
	at java.base/sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:129)
	at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.checkServerCerts(CertificateMessage.java:626)
Caused: javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
	at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:131)
	at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:321)
	at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:264)
	at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:259)
	at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.checkServerCerts(CertificateMessage.java:642)
	at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.onCertificate(CertificateMessage.java:461)
	at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.consume(CertificateMessage.java:361)
	at java.base/sun.security.ssl.SSLHandshake.consume(SSLHandshake.java:392)
	at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:448)
	at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:425)
	at java.base/sun.security.ssl.TransportContext.dispatch(TransportContext.java:178)
	at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:164)
	at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1152)
	at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1063)
	at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:402)
	at java.base/sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:567)
	at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.followRedirect0(HttpURLConnection.java:2768)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.followRedirect(HttpURLConnection.java:2680)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1843)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1509)
	at java.base/<a href="http://java.net" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fjava.net\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHvsroZ72hHEGjeEAhG-RVyDevYYw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fjava.net\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHvsroZ72hHEGjeEAhG-RVyDevYYw&#39;;return true;">java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:527)
	at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:329)
	at hudson.FilePath.installIfNecessaryFrom(FilePath.java:874)
Caused: java.io.IOException: Failed to install <a href="https://services.gradle.org/distributions/gradle-5.5.1-bin.zip" style="font-size: 15px; color: rgb(149, 115, 115); --darkreader-inline-color:#b7b2a7;" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fservices.gradle.org%2Fdistributions%2Fgradle-5.5.1-bin.zip\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNENMkYwq8EymLo0Nd04J1QhhkbWnQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fservices.gradle.org%2Fdistributions%2Fgradle-5.5.1-bin.zip\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNENMkYwq8EymLo0Nd04J1QhhkbWnQ&#39;;return true;" data-darkreader-inline-color="">https://services.gradle.org/distributions/gradle-5.5.1-bin.zip to /home/build/jenkins-test/tools/hudson.plugins.gradle.GradleInstallation/gradle-5.5
	at hudson.FilePath.installIfNecessaryFrom(FilePath.java:938)
	at hudson.FilePath.installIfNecessaryFrom(FilePath.java:846)
	at hudson.tools.DownloadFromUrlInstaller.performInstallation(DownloadFromUrlInstaller.java:77)
	at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:69)
	at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:109)
	at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:206)
	at hudson.plugins.gradle.GradleInstallation.forNode(GradleInstallation.java:92)
	at hudson.plugins.gradle.GradleInstallation.forNode(GradleInstallation.java:30)
	at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:152)
	at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:133)
	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/jenkinsci-users/93ecd2ab-622a-4306-ad97-6546972c3471%40googlegroups.com?utm_medium=email&amp;utm_source=footer" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/93ecd2ab-622a-4306-ad97-6546972c3471%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/93ecd2ab-622a-4306-ad97-6546972c3471%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/jenkinsci-users/93ecd2ab-622a-4306-ad97-6546972c3471%40googlegroups.com.


--
Thanks!
Mark Waite

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/jenkinsci-users/4f6bdea1-95fd-4237-a7d7-b2f4c0834046%40googlegroups.com?utm_medium=email&amp;utm_source=footer" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/4f6bdea1-95fd-4237-a7d7-b2f4c0834046%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/4f6bdea1-95fd-4237-a7d7-b2f4c0834046%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/jenkinsci-users/4f6bdea1-95fd-4237-a7d7-b2f4c0834046%40googlegroups.com.


--
Thanks!
Mark Waite

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" rel="nofollow" target="_blank" gdf-obfuscated-mailto="ktJQayLTFgAJ" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">jenkins...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/jenkinsci-users/af4494fc-4010-4421-a9c3-b87406426b03%40googlegroups.com?utm_medium=email&amp;utm_source=footer" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/af4494fc-4010-4421-a9c3-b87406426b03%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/af4494fc-4010-4421-a9c3-b87406426b03%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/jenkinsci-users/af4494fc-4010-4421-a9c3-b87406426b03%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/cce96111-6963-44c7-943c-156087b0a591%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Gradle Tool Failed Download

Sverre Moe-2
I get the same problem trying to get the gradle wrapper on our build agents.

Using Proxy with gradle fixes that problem:
gradle wrapper --gradle-version=5.5.1
./gradlew -Dhttps.proxyHost=proxy.company.com -Dhttps.proxyPort=3128 --version

Is there a way to get Jenkins to use this proxy when downloading the Gradle distribution?
I have configured Jenkins to use our Proxy under the Plugin Manager > Advanced.

However considering we want to create our own Gradle distribution now that has become an option after 5.5, I think we would to stick with the option of unpacking the installer our self using "Run Shell Command".

onsdag 7. august 2019 23.42.57 UTC+2 skrev Sverre Moe følgende:
I am not very keen on checking in the gradle wrapper to git. Though I do see the appeal.

Now with Gradle 5.5 I am planning on creating a custom Gradle distribution and storing it with Nexus NXRM.
<a href="https://docs.gradle.org/5.5/userguide/organizing_gradle_projects.html#sec:custom_gradle_distribution" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fdocs.gradle.org%2F5.5%2Fuserguide%2Forganizing_gradle_projects.html%23sec%3Acustom_gradle_distribution\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNG1v1p1Iz5SzA5zwIa6GCtnQP4sCw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fdocs.gradle.org%2F5.5%2Fuserguide%2Forganizing_gradle_projects.html%23sec%3Acustom_gradle_distribution\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNG1v1p1Iz5SzA5zwIa6GCtnQP4sCw&#39;;return true;">https://docs.gradle.org/5.5/userguide/organizing_gradle_projects.html#sec:custom_gradle_distribution

onsdag 7. august 2019 22.00.53 UTC+2 skrev Richard Bywater følgende:
Personally with Gradle I've always found it easier to use Gradle Wrapper instead of full installs.

Don't know if that's an option for you or not. 

Richard.

On Thu, 8 Aug 2019, 7:38 AM Sverre Moe, <[hidden email]> wrote:
Got it working using the "Run Shell Command". Though I find it very cumbersome.

wget --quiet https://<a href="http://nexus.company.no:8443/repository/gradle-distributions/gradle-5.5.1-bin.zip" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fnexus.company.no%3A8443%2Frepository%2Fgradle-distributions%2Fgradle-5.5.1-bin.zip\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFzfuTv2wCbe9StktzF00fIUOABFg&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fnexus.company.no%3A8443%2Frepository%2Fgradle-distributions%2Fgradle-5.5.1-bin.zip\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFzfuTv2wCbe9StktzF00fIUOABFg&#39;;return true;">nexus.company.no:8443/repository/gradle-distributions/gradle-5.5.1-bin.zip
unzip
-qq gradle-5.5.1-bin.zip
mv gradle
-5.5.1/* .
rmdir gradle-5.5.1
rm gradle-5.5.1-bin.zip


onsdag 7. august 2019 21.10.59 UTC+2 skrev Sverre Moe følgende:
Perhaps I could use instead the Installers "Run Shell Command", or "Run Batch Command".
Then unpack it myself, ensuring it gets unpacked within the tool name directory.
Would I need both in order for it to work on Linux and Windows?

onsdag 7. august 2019 21.04.09 UTC+2 skrev Sverre Moe følgende:
I thought of the same.
I downloaded the Gradle distribution zip file. Placed it in our Nexus Repository Manager, in a raw repository.

Used the Installer "Extract *.zip/*.tar.gz". Did not go so well
Tool: gradle-5.5
File: gradle-5.5.1-bin.zip

Get extracted in
hudson.plugins.gradle.GradleInstallation/gradle-5.5/gradle-5.5.1

My pipeline script suspects to find the gradle executable under ${gradleTool}/bin/gradle.

The GradleInstaller unpacks it under the tool name.

onsdag 7. august 2019 20.51.09 UTC+2 skrev Mark Waite følgende:
Maybe this is the time to reconfigure the tool installer to download from a locally cached copy of the tool instead of pulling it from the internet?

I've had good results with that technique by placing zip files of the tool installers inside my network and then configuring the tool installer to use the copy from my network instead of the copy from the internet.

On Wed, Aug 7, 2019 at 11:56 AM Sverre Moe <[hidden email]> wrote:
I have no modifed cacerts.

Using wget also fails on the agent, until I set a proxy.
The Jenkins server does have proxy configured, but not the agents.
When I add HTTP Proxy in Jenkins under the Update Center I get a totally different stacktrace when it tries to retrieve the gradle tool.

Unpacking <a href="https://services.gradle.org/distributions/gradle-5.5.1-bin.zip" style="font-size: 15px; color: rgb(149, 115, 115); --darkreader-inline-color:#b7b2a7;" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fservices.gradle.org%2Fdistributions%2Fgradle-5.5.1-bin.zip\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNENMkYwq8EymLo0Nd04J1QhhkbWnQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fservices.gradle.org%2Fdistributions%2Fgradle-5.5.1-bin.zip\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNENMkYwq8EymLo0Nd04J1QhhkbWnQ&#39;;return true;" data-darkreader-inline-color="">https://services.gradle.org/distributions/gradle-5.5.1-bin.zip to /home/build/jenkins-test/tools/hudson.plugins.gradle.GradleInstallation/gradle-5.5 on master-sles12.3-x86_64_2
ERROR: Failed to download <a href="https://services.gradle.org/distributions/gradle-5.5.1-bin.zip" style="font-size: 15px; color: rgb(149, 115, 115); --darkreader-inline-color:#b7b2a7;" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fservices.gradle.org%2Fdistributions%2Fgradle-5.5.1-bin.zip\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNENMkYwq8EymLo0Nd04J1QhhkbWnQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fservices.gradle.org%2Fdistributions%2Fgradle-5.5.1-bin.zip\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNENMkYwq8EymLo0Nd04J1QhhkbWnQ&#39;;return true;" data-darkreader-inline-color="">https://services.gradle.org/distributions/gradle-5.5.1-bin.zip from agent; will retry from master
sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
	at sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141)
	at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126)
	at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280)
	at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:392)
Caused: sun.security.validator.ValidatorException: PKIX path building failed
	at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:397)
	at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:302)
	at sun.security.validator.Validator.validate(Validator.java:262)
	at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:330)
	at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:237)
	at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:132)
	at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1621)
Also:   hudson.remoting.Channel$CallSiteStackTrace: Remote call to master-sles12.3-x86_64_2
		at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1743)
		at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:357)
		at hudson.remoting.Channel.call(Channel.java:957)
		at hudson.FilePath.act(FilePath.java:1070)
		at hudson.FilePath.act(FilePath.java:1059)
		at hudson.FilePath.installIfNecessaryFrom(FilePath.java:913)
		at hudson.FilePath.installIfNecessaryFrom(FilePath.java:846)
		at hudson.tools.DownloadFromUrlInstaller.performInstallation(DownloadFromUrlInstaller.java:77)
		at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:69)
		at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:109)
		at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:206)
		at hudson.plugins.gradle.GradleInstallation.forNode(GradleInstallation.java:92)
		at hudson.plugins.gradle.GradleInstallation.forNode(GradleInstallation.java:30)
		at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:152)
		at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:133)
		at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
		at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
		at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
		at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
		at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
		at java.base/java.lang.Thread.run(Thread.java:834)
Caused: javax.net.ssl.SSLHandshakeException
	at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
	at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1946)
	at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:316)
	at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:310)
	at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1639)
	at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:223)
	at sun.security.ssl.Handshaker.processLoop(Handshaker.java:1037)
	at sun.security.ssl.Handshaker.process_record(Handshaker.java:965)
	at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1064)
	at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1367)
	at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1395)
	at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1379)
	at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559)
	at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
	at sun.net.www.protocol.http.HttpURLConnection.followRedirect0(HttpURLConnection.java:2735)
	at sun.net.www.protocol.http.HttpURLConnection.followRedirect(HttpURLConnection.java:2647)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1830)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1498)
	at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:268)
	at java.net.URL.openStream(URL.java:1057)
	at hudson.FilePath$Unpack.invoke(FilePath.java:949)
	at hudson.FilePath$Unpack.invoke(FilePath.java:943)
	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3050)
	at hudson.remoting.UserRequest.perform(UserRequest.java:212)
	at hudson.remoting.UserRequest.perform(UserRequest.java:54)
	at hudson.remoting.Request$2.run(Request.java:369)
	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

javax.net.ssl.SSLHandshakeException: Received fatal alert: access_denied
	at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:131)
	at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:117)
	at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:308)
	at java.base/sun.security.ssl.Alert$AlertConsumer.consume(Alert.java:285)
	at java.base/sun.security.ssl.TransportContext.dispatch(TransportContext.java:181)
	at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:164)
	at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1152)
	at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1063)
	at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:402)
	at java.base/sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:567)
	at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.followRedirect0(HttpURLConnection.java:2768)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.followRedirect(HttpURLConnection.java:2680)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1843)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1509)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:3084)
	at java.base/<a href="http://java.net" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fjava.net\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHvsroZ72hHEGjeEAhG-RVyDevYYw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fjava.net\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHvsroZ72hHEGjeEAhG-RVyDevYYw&#39;;return true;">java.net.URLConnection.getHeaderFieldLong(URLConnection.java:636)
	at java.base/<a href="http://java.net" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fjava.net\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHvsroZ72hHEGjeEAhG-RVyDevYYw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fjava.net\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHvsroZ72hHEGjeEAhG-RVyDevYYw&#39;;return true;">java.net.URLConnection.getContentLengthLong(URLConnection.java:508)
	at java.base/<a href="http://java.net" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fjava.net\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHvsroZ72hHEGjeEAhG-RVyDevYYw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fjava.net\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHvsroZ72hHEGjeEAhG-RVyDevYYw&#39;;return true;">java.net.URLConnection.getContentLength(URLConnection.java:492)
	at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getContentLength(HttpsURLConnectionImpl.java:389)
	at org.jvnet.robust_http_client.RetryableHttpStream.<init>(RetryableHttpStream.java:90)
Caused: javax.net.ssl.SSLHandshakeException: Received fatal alert: access_denied
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
	at java.base/sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1963)
	at java.base/sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1958)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1957)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1525)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1509)
	at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:245)
	at org.jvnet.robust_http_client.RetryableHttpStream.getStream(RetryableHttpStream.java:98)
	at org.jvnet.robust_http_client.RetryableHttpStream.<init>(RetryableHttpStream.java:91)
	at hudson.ProxyConfiguration.getInputStream(ProxyConfiguration.java:285)
	at hudson.FilePath.installIfNecessaryFrom(FilePath.java:924)
Caused: java.io.IOException: Failed to install <a href="https://services.gradle.org/distributions/gradle-5.5.1-bin.zip" style="font-size: 15px; color: rgb(149, 115, 115); --darkreader-inline-color:#b7b2a7;" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fservices.gradle.org%2Fdistributions%2Fgradle-5.5.1-bin.zip\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNENMkYwq8EymLo0Nd04J1QhhkbWnQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fservices.gradle.org%2Fdistributions%2Fgradle-5.5.1-bin.zip\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNENMkYwq8EymLo0Nd04J1QhhkbWnQ&#39;;return true;" data-darkreader-inline-color="">https://services.gradle.org/distributions/gradle-5.5.1-bin.zip to /home/build/jenkins-test/tools/hudson.plugins.gradle.GradleInstallation/gradle-5.5
	at hudson.FilePath.installIfNecessaryFrom(FilePath.java:938)
	at hudson.FilePath.installIfNecessaryFrom(FilePath.java:846)
	at hudson.tools.DownloadFromUrlInstaller.performInstallation(DownloadFromUrlInstaller.java:77)
	at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:69)
	at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:109)
	at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:206)
	at hudson.plugins.gradle.GradleInstallation.forNode(GradleInstallation.java:92)
	at hudson.plugins.gradle.GradleInstallation.forNode(GradleInstallation.java:30)
	at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:152)
	at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:133)
	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)

onsdag 7. august 2019 19.28.15 UTC+2 skrev Mark Waite følgende:
I would guess that you may already be using a modified cacerts file which does not include the authority that is certifying the validity of the SSL certificate on the gradle site.

When I download from that URL, my web browser reports no issues from Google Chrome on Windows and no issues from wget on a FreeBSD computer.

On Wed, Aug 7, 2019 at 10:51 AM Sverre Moe <[hidden email]> wrote:
This has worked before. Now that we where to upgrade from Gradle 5.0 to 5.5 and added the tool gradle-5.5 it fails to retrieve the archive.

Anyone have an idea what the problem might be?

Running both Jenkins and Agents on Java 8 Update 221.

Is there any way arround this without hacking the JRE cacerts with the gradle web site certificate?

sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
	at java.base/sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141)
	at java.base/sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126)
	at java.base/java.security.cert.CertPathBuilder.build(CertPathBuilder.java:297)
	at java.base/sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:380)
Caused: sun.security.validator.ValidatorException: PKIX path building failed
	at java.base/sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:385)
	at java.base/sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:290)
	at java.base/sun.security.validator.Validator.validate(Validator.java:264)
	at java.base/sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:321)
	at java.base/sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:221)
	at java.base/sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:129)
	at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.checkServerCerts(CertificateMessage.java:626)
Caused: javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
	at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:131)
	at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:321)
	at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:264)
	at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:259)
	at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.checkServerCerts(CertificateMessage.java:642)
	at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.onCertificate(CertificateMessage.java:461)
	at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.consume(CertificateMessage.java:361)
	at java.base/sun.security.ssl.SSLHandshake.consume(SSLHandshake.java:392)
	at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:448)
	at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:425)
	at java.base/sun.security.ssl.TransportContext.dispatch(TransportContext.java:178)
	at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:164)
	at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1152)
	at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1063)
	at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:402)
	at java.base/sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:567)
	at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.followRedirect0(HttpURLConnection.java:2768)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.followRedirect(HttpURLConnection.java:2680)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1843)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1509)
	at java.base/<a href="http://java.net" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fjava.net\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHvsroZ72hHEGjeEAhG-RVyDevYYw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fjava.net\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHvsroZ72hHEGjeEAhG-RVyDevYYw&#39;;return true;">java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:527)
	at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:329)
	at hudson.FilePath.installIfNecessaryFrom(FilePath.java:874)
Caused: java.io.IOException: Failed to install <a href="https://services.gradle.org/distributions/gradle-5.5.1-bin.zip" style="font-size: 15px; color: rgb(149, 115, 115); --darkreader-inline-color:#b7b2a7;" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fservices.gradle.org%2Fdistributions%2Fgradle-5.5.1-bin.zip\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNENMkYwq8EymLo0Nd04J1QhhkbWnQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fservices.gradle.org%2Fdistributions%2Fgradle-5.5.1-bin.zip\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNENMkYwq8EymLo0Nd04J1QhhkbWnQ&#39;;return true;" data-darkreader-inline-color="">https://services.gradle.org/distributions/gradle-5.5.1-bin.zip to /home/build/jenkins-test/tools/hudson.plugins.gradle.GradleInstallation/gradle-5.5
	at hudson.FilePath.installIfNecessaryFrom(FilePath.java:938)
	at hudson.FilePath.installIfNecessaryFrom(FilePath.java:846)
	at hudson.tools.DownloadFromUrlInstaller.performInstallation(DownloadFromUrlInstaller.java:77)
	at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:69)
	at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:109)
	at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:206)
	at hudson.plugins.gradle.GradleInstallation.forNode(GradleInstallation.java:92)
	at hudson.plugins.gradle.GradleInstallation.forNode(GradleInstallation.java:30)
	at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:152)
	at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:133)
	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/jenkinsci-users/93ecd2ab-622a-4306-ad97-6546972c3471%40googlegroups.com?utm_medium=email&amp;utm_source=footer" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/93ecd2ab-622a-4306-ad97-6546972c3471%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/93ecd2ab-622a-4306-ad97-6546972c3471%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/jenkinsci-users/93ecd2ab-622a-4306-ad97-6546972c3471%40googlegroups.com.


--
Thanks!
Mark Waite

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/jenkinsci-users/4f6bdea1-95fd-4237-a7d7-b2f4c0834046%40googlegroups.com?utm_medium=email&amp;utm_source=footer" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/4f6bdea1-95fd-4237-a7d7-b2f4c0834046%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/4f6bdea1-95fd-4237-a7d7-b2f4c0834046%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/jenkinsci-users/4f6bdea1-95fd-4237-a7d7-b2f4c0834046%40googlegroups.com.


--
Thanks!
Mark Waite

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/jenkinsci-users/af4494fc-4010-4421-a9c3-b87406426b03%40googlegroups.com?utm_medium=email&amp;utm_source=footer" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/af4494fc-4010-4421-a9c3-b87406426b03%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/af4494fc-4010-4421-a9c3-b87406426b03%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/jenkinsci-users/af4494fc-4010-4421-a9c3-b87406426b03%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/5d06a129-3955-4a87-b635-9f05d3e97519%40googlegroups.com.