-
Bug
-
Resolution: Fixed
-
Major
-
None
-
Jenkins Version : 2.332.1
Installed in : jenkins/jenkins:2.332.1-lts-jdk11 Eks through helm.
Terrafrom Plugin: 1.0.10 (Latest)
The Terraform plugin is failing to download Terraform releases with the error:
java.net.UnknownHostException: releases.hashicorp.comhttps at java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:229) at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.base/java.net.Socket.connect(Socket.java:609) at java.base/sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:300) at java.base/sun.net.NetworkClient.doConnect(NetworkClient.java:177) at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:474) at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:569) at java.base/sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:266) at java.base/sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:373) at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:203) at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1187) at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1081) at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:189) at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:168) at hudson.FilePath.installIfNecessaryFrom(FilePath.java:995) Caused: java.io.IOException: Failed to install https://releases.hashicorp.comhttps://releases.hashicorp.com/terraform/1.1.9/terraform_1.1.9_linux_amd64.zip to /home/jenkins/agent/tools/org.jenkinsci.plugins.terraform.TerraformInstallation/terraform-1.1.9-amd64 at hudson.FilePath.installIfNecessaryFrom(FilePath.java:1069) at hudson.FilePath.installIfNecessaryFrom(FilePath.java:982) at hudson.tools.DownloadFromUrlInstaller.performInstallation(DownloadFromUrlInstaller.java:77) at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:70) at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:108) at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:221) at org.jenkinsci.plugins.terraform.TerraformInstallation.forNode(TerraformInstallation.java:50) at org.jenkinsci.plugins.terraform.TerraformInstallation.forNode(TerraformInstallation.java:35) at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:155) at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:136) 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:829)
Note the URL it is trying to install from appears to have two copies of the domain:
I believe this is a result of the crawler script referenced by the plugin
https://github.com/jenkins-infra/crawler/blob/master/terraform.groovy
which seems to assume the URLs hosted on https://releases.hashicorp.com are relative, but they are absolute (Possibly an update by Hashicorp changed this?)