Unable to access file .vmtx (Jenkins plugin vSphere Cloud) - jenkins

I am using Jenkins version 2.236 (but also tried with 2.263.1), vSphere Plugin version 2.24, vSphere Client version 6.7.0
When i start my job and go to jenkins logs i see that below:
enter image description here
This vmtx file is avaliable on vSphere client (i can download it, delete it, move by hands no problem), i also can Clone VM from template manualy, but plugin can't get access to it and clone it, it has an error
enter image description here
Please help, how to avoid this problem?
Unexpected exception encountered while provisioning agent dynamic3fofguaybl6yiwkjfe7jk5zm9
com.vmware.vim25.CannotAccessVmConfig
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at java.lang.Class.newInstance(Class.java:442)
at com.vmware.vim25.ws.XmlGenDom.fromXml(XmlGenDom.java:253)
at com.vmware.vim25.ws.XmlGenDom.fromXml(XmlGenDom.java:363)
at com.vmware.vim25.ws.XmlGenDom.fromXml(XmlGenDom.java:363)
at com.vmware.vim25.ws.XmlGenDom.fromXml(XmlGenDom.java:363)
at com.vmware.vim25.ws.XmlGenDom.fromXml(XmlGenDom.java:356)
at com.vmware.vim25.ws.XmlGenDom.fromXML(XmlGenDom.java:233)
at com.vmware.vim25.ws.XmlGenDom.fromXML(XmlGenDom.java:124)
at com.vmware.vim25.ws.SoapClient.unMarshall(SoapClient.java:253)
at com.vmware.vim25.ws.WSClient.invoke(WSClient.java:96)
at com.vmware.vim25.ws.VimStub.retrieveProperties(VimStub.java:106)
at com.vmware.vim25.mo.PropertyCollector.retrieveProperties(PropertyCollector.java:98)
at com.vmware.vim25.mo.ManagedObject.retrieveObjectProperties(ManagedObject.java:146)
at com.vmware.vim25.mo.ManagedObject.getCurrentProperty(ManagedObject.java:167)
at com.vmware.vim25.mo.Task.getTaskInfo(Task.java:51)
Caused: org.jenkinsci.plugins.vsphere.tools.VSphereException: vSphere Error: Couldn't clone "ubuntu-18.04-dynamic-node-for-test". Clone task ended with status error.
Unable to access the virtual machine configuration: Unable to access file [esxi-datastore_nvme] ubuntu-18.04-dynamic-node-for-test/ubuntu-18.04-dynamic-node-for-test.vmtx
at org.jenkinsci.plugins.vsphere.tools.VSphere.newVSphereException(VSphere.java:1151)
at org.jenkinsci.plugins.vsphere.tools.VSphere.cloneOrDeployVm(VSphere.java:287)
at org.jenkinsci.plugins.vSphereCloudSlaveTemplate.provision(vSphereCloudSlaveTemplate.java:428)
at org.jenkinsci.plugins.vSphereCloudSlaveTemplate.provision(vSphereCloudSlaveTemplate.java:403)
at org.jenkinsci.plugins.vSphereCloud$VSpherePlannedNode.provisionNewNode(vSphereCloud.java:534)
at org.jenkinsci.plugins.vSphereCloud$VSpherePlannedNode.access$100(vSphereCloud.java:496)
at org.jenkinsci.plugins.vSphereCloud$VSpherePlannedNode$1.call(vSphereCloud.java:510)
at org.jenkinsci.plugins.vSphereCloud$VSpherePlannedNode$1.call(vSphereCloud.java:506)
at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
at jenkins.security.ImpersonatingExecutorService$2.call(ImpersonatingExecutorService.java:71)
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)

Related

Jenkins java.io.FileNotFoundException: https://groovy.jfrog.io/artifactory/dist-release-local/groovy-zips/pache-groovy-binary-2.5.3.zip

Some of our jobs that use groovy scripts have started failing today. It appears the "a" in "apache" is missing and there is a typo in the jfrog download reference. I suspect this was a long lived typo in the jfrog repo and may have been fixed in the past day or so (I see uploads yesterday), but now is breaking anyone who used it. Anyone have ideas of how to rectify this?
Running as SYSTEM
[EnvInject] - Loading node environment variables.
Building on master in workspace D:\Data\Jenkins\.jenkins\jobs\Emergency Deployment\workspace
Unpacking https://groovy.jfrog.io/artifactory/dist-release-local/groovy-zips/pache-groovy-binary-2.5.3.zip to D:\Data\Jenkins\.jenkins\tools\hudson.plugins.groovy.GroovyInstallation\Groovy_2.5.3 on Jenkins
FATAL: Failed to install https://groovy.jfrog.io/artifactory/dist-release-local/groovy-zips/pache-groovy-binary-2.5.3.zip to D:\Data\Jenkins\.jenkins\tools\hudson.plugins.groovy.GroovyInstallation\Groovy_2.5.3
java.io.FileNotFoundException: https://groovy.jfrog.io/artifactory/dist-release-local/groovy-zips/pache-groovy-binary-2.5.3.zip
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1836)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441)
at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:2943)
at java.net.URLConnection.getHeaderFieldLong(URLConnection.java:629)
at java.net.URLConnection.getContentLengthLong(URLConnection.java:501)
at java.net.URLConnection.getContentLength(URLConnection.java:485)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getContentLength(HttpsURLConnectionImpl.java:398)
at org.jvnet.robust_http_client.RetryableHttpStream.<init>(RetryableHttpStream.java:90)
Caused: java.io.FileNotFoundException: https://groovy.jfrog.io/artifactory/dist-release-local/groovy-zips/pache-groovy-binary-2.5.3.zip
at sun.reflect.GeneratedConstructorAccessor345.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1890)
at sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1885)
at java.security.AccessController.doPrivileged(Native Method)
at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1884)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1457)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
at org.jvnet.robust_http_client.RetryableHttpStream.getStream(RetryableHttpStream.java:98)
at org.jvnet.robust_http_client.RetryableHttpStream.<init>(RetryableHttpStream.java:91)
at org.jvnet.robust_http_client.RetryableHttpStream.<init>(RetryableHttpStream.java:74)
at hudson.ProxyConfiguration.getInputStream(ProxyConfiguration.java:330)
at hudson.FilePath.installIfNecessaryFrom(FilePath.java:924)
Caused: java.io.IOException: Failed to install https://groovy.jfrog.io/artifactory/dist-release-local/groovy-zips/pache-groovy-binary-2.5.3.zip to D:\Data\Jenkins\.jenkins\tools\hudson.plugins.groovy.GroovyInstallation\Groovy_2.5.3
at hudson.FilePath.installIfNecessaryFrom(FilePath.java:938)
at hudson.FilePath.installIfNecessaryFrom(FilePath.java:851)
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.groovy.GroovyInstallation.forNode(GroovyInstallation.java:73)
at hudson.plugins.groovy.Groovy.buildCommandLine(Groovy.java:255)
at hudson.plugins.groovy.Groovy.perform(Groovy.java:79)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804)
at hudson.model.Build$BuildExecution.build(Build.java:197)
at hudson.model.Build$BuildExecution.doRun(Build.java:163)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:514)
at hudson.model.Run.execute(Run.java:1894)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:428)
Finished: FAILURE
REST API
Started hitting this yesterday too. We've also switched to Extract Zip/Tar installer. It's worth noting you probably have to specify the Subdirectory of extracted archive setting based on the root dir inside the zip. So for us we used:
https://groovy.jfrog.io/artifactory/dist-release-local/groovy-zips/apache-groovy-binary-2.4.9.zip
For the Download URL, and the following for the subdir:
groovy-2.4.9

Failed to initialize Jenkins

Any idea about this Error?
I'm getting this Error in Jenkins Pods startup in GKE Cluster:
Docker image used Latest from
NAME CREATED IMAGE
jenkins 2021-02-13T15:31:20Z jenkins/jenkins:lts
GKE Cluster:1.16.15-gke.6000
Node Pool Version:1.15.12-gke.20
Helm chart:https://github.com/helm/charts/tree/master/stable/jenkins
2021-02-13 15:36:26.958+0000 [id=27] SEVERE jenkins.InitReactorRunner$1#onTaskFailed: Failed ConfigurationAsCode.init
java.lang.IllegalArgumentException: No hudson.slaves.Cloud implementation found for kubernetes
at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.lambda$lookupDescriptor$11(HeteroDescribableConfigurator.java:211)
at io.vavr.control.Option.orElse(Option.java:321)
at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.lookupDescriptor(HeteroDescribableConfigurator.java:210)
at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.lambda$configure$3(HeteroDescribableConfigurator.java:84)
at io.vavr.Tuple2.apply(Tuple2.java:238)
at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.configure(HeteroDescribableConfigurator.java:83)
at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.check(HeteroDescribableConfigurator.java:92)
at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.check(HeteroDescribableConfigurator.java:55)
at io.jenkins.plugins.casc.BaseConfigurator.configure(BaseConfigurator.java:344)
at io.jenkins.plugins.casc.BaseConfigurator.check(BaseConfigurator.java:287)
at io.jenkins.plugins.casc.ConfigurationAsCode.lambda$checkWith$8(ConfigurationAsCode.java:753)
at io.jenkins.plugins.casc.ConfigurationAsCode.invokeWith(ConfigurationAsCode.java:689)
at io.jenkins.plugins.casc.ConfigurationAsCode.checkWith(ConfigurationAsCode.java:753)
at io.jenkins.plugins.casc.ConfigurationAsCode.configureWith(ConfigurationAsCode.java:738)
at io.jenkins.plugins.casc.ConfigurationAsCode.configureWith(ConfigurationAsCode.java:614)
at io.jenkins.plugins.casc.ConfigurationAsCode.configure(ConfigurationAsCode.java:298)
at io.jenkins.plugins.casc.ConfigurationAsCode.init(ConfigurationAsCode.java:290)
Caused: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:104)
Caused: java.lang.Error
at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:110)
at hudson.init.TaskMethodFinder$TaskImpl.run(TaskMethodFinder.java:175)
at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296)
at jenkins.model.Jenkins$5.runTask(Jenkins.java:1131)
at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59)
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)
2021-02-13 15:36:26.960+0000 [id=20] SEVERE hudson.util.BootFailure#publish: Failed to initialize Jenkins
java.lang.IllegalArgumentException: No hudson.slaves.Cloud implementation found for kubernetes
at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.lambda$lookupDescriptor$11(HeteroDescribableConfigurator.java:211)
at io.vavr.control.Option.orElse(Option.java:321)
enter code here
I started getting this error after upgrading the jenkins chart version to 3.1.8 .
After upgrading to 3.1.9 the error has been fixed.
They seem to fix the configurations that were causing the error in the new version.
https://github.com/jenkinsci/helm-charts/compare/jenkins-3.1.8...jenkins-3.1.9
requirements.yaml
- name: "jenkins"
condition: jenkins.enabled
version: "3.1.9"
repository: "https://charts.jenkins.io"
First of all u need to change your chart repo, take this: https://github.com/jenkinsci/helm-charts
After try re-deploy your jenkins without pvc and plugins.
I got same issue and jenkins started after changed version on plugin:
https://github.com/jenkinsci/configuration-as-code-plugin/releases
I changed version from v1.46 to v1.47 and jenkins version from 2.263.4 to 2.279
For this use different tag from your jenkins/jenkins:lts to jenkins/jenkins it will take 2.279 or later
After this changes my jenkins get up

Jenkins Artifactory Plugin not working with recent Artifactory version

We have the following steps in our Jenkinsfile (trying to upload artifacts to our Artifactory server):
def server = script.Artifactory.server("our-artifactory-server-id")
def uploadSpec = """{
"files": [
{
"pattern": "${sourcePath}",
"target": "${targetPath}"
}
]
}"""
server.upload(uploadSpec)
This used to work until we updated to a newer version of Artifactory. Ever since the update, we get the following error when running the build job:
java.io.IOException: Failed to deploy file. Status code: 400
at org.jfrog.build.extractor.clientConfiguration.client.ArtifactoryBuildInfoClient.uploadFile(ArtifactoryBuildInfoClient.java:656)
at org.jfrog.build.extractor.clientConfiguration.client.ArtifactoryBuildInfoClient.deployArtifact(ArtifactoryBuildInfoClient.java:343)
at org.jfrog.build.extractor.clientConfiguration.util.spec.SpecsHelper.deploy(SpecsHelper.java:291)
at org.jfrog.build.extractor.clientConfiguration.util.spec.SpecsHelper.uploadArtifactsBySpec(SpecsHelper.java:65)
at org.jfrog.hudson.generic.GenericArtifactsDeployer$FilesDeployerCallable.invoke(GenericArtifactsDeployer.java:189)
at org.jfrog.hudson.generic.GenericArtifactsDeployer$FilesDeployerCallable.invoke(GenericArtifactsDeployer.java:130)
at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2750)
at hudson.remoting.UserRequest.perform(UserRequest.java:181)
at hudson.remoting.UserRequest.perform(UserRequest.java:52)
at hudson.remoting.Request$2.run(Request.java:336)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
at ......remote call to docker-bc26fb0b91c4(Native Method)
at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1554)
at hudson.remoting.UserResponse.retrieve(UserRequest.java:281)
at hudson.remoting.Channel.call(Channel.java:839)
at hudson.FilePath.act(FilePath.java:987)
Caused: java.io.IOException: remote file operation failed: /home/jenkins/workspace/tration_feature_jenkinsfile-ANARWI2SDBPRVZNIYHCS6XKXIAD2SZ5ZTHM6DRXHYSARAQHPWEMQ at hudson.remoting.Channel#4c39a5aa:docker-bc26fb0b91c4
at hudson.FilePath.act(FilePath.java:994)
at hudson.FilePath.act(FilePath.java:976)
at org.jfrog.hudson.pipeline.executors.GenericUploadExecutor.execution(GenericUploadExecutor.java:52)
at org.jfrog.hudson.pipeline.steps.UploadStep$Execution.run(UploadStep.java:65)
at org.jfrog.hudson.pipeline.steps.UploadStep$Execution.run(UploadStep.java:46)
at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:47)
at hudson.security.ACL.impersonate(ACL.java:260)
at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
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)
Finished: FAILURE
Some background regarding our setup:
Jenkins version 2.69
Artifactory version 5.8.4
Artifactory plugin version 2.14.0
the error started to appear with a recent update of Artifactory
the Artifactory log shows no output for the error
we are sitting behind a proxy, but no_proxy is set correctly, at least we can curl https://... to our Artifactory host
we have self-signed certificates for Artifactory, but they should be properly added to the java truststore and the system truststore, since we can open URLs in java apps as well as with curl without any issues.
Any idea how we could debug this issue?
I had a very similar issue and found the solution in the configuration of the Artifactory-Jenkins plugin (manage jenkins --> configure system --> artifactory).
What I did was changing the Artifactory server URL from:
https://<artifactorydomain.com>
to the new URL (adding the /artifactory):
https://<artifactorydomain.com>/artifactory
Hope this helps.

Jenkins on Raspberry Pi

I installed jenkins on my raspberry pi and when I opened the jenkins page, the introduction page comes up. The weird thing was that it said that my jenkins is offline and I should configure a proxy. That's weird because my raspberry pi has an internet connection and everything works fine. But then I tried to download github plugin for jenkins and no plugin was installed successfully. This is the exception:
hudson.util.IOException2: Failed to download from http://updates.jenkins-ci.org/download/plugins/github/1.25.1/github.hpi
at hudson.model.UpdateCenter$UpdateCenterConfiguration.download(UpdateCenter.java:1172)
at hudson.model.UpdateCenter$DownloadJob._run(UpdateCenter.java:1678)
at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1876)
at hudson.model.UpdateCenter$DownloadJob.run(UpdateCenter.java:1652)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:110)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.SocketException: Unexpected end of file from server
at sun.reflect.GeneratedConstructorAccessor65.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1890)
at sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1885)
at java.security.AccessController.doPrivileged(Native Method)
at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1884)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1457)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441)
at hudson.model.UpdateCenter$UpdateCenterConfiguration.download(UpdateCenter.java:1124)
... 7 more
Caused by: java.net.SocketException: Unexpected end of file from server
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:792)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:647)
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:789)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:647)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1536)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441)
at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:2943)
at java.net.URLConnection.getHeaderFieldLong(URLConnection.java:629)
at java.net.URLConnection.getContentLengthLong(URLConnection.java:501)
at java.net.URLConnection.getContentLength(URLConnection.java:485)
at hudson.model.UpdateCenter$UpdateCenterConfiguration.download(UpdateCenter.java:1123)
... 7 more
But when I try to go to that site (http://updates.jenkins-ci.org/download/plugins/github/1.25.1/github.hpi) manually, everything downloads just fine. Any ideas why my jenkins cannot access internet and seems to be offline?

How to change Jenkins mirror, when proxy forbids keyword ftp

When I install a jenkins-plugin like the 'git-plugin', then jenkins redirects my requests to the mirror ftp.halifax.rwth-aachen.de. But I work behind a corporate proxy that forbid requests to URL containing the word 'ftp'.
Is there a way to choose or disable the mirror when downloading plugins for jenkins? Jenkins has no problems installing plugins from sites that do not contain 'ftp'.
Here is the error from jenkins log-view:
Dez 22, 2016 3:46:54 PM INFORMATION hudson.model.UpdateCenter$DownloadJob run
Starting the installation of Git client plugin on behalf of admin-ci
Dez 22, 2016 3:46:54 PM SCHWERWIEGEND hudson.model.UpdateCenter$DownloadJob run
Failed to install Git client plugin
hudson.util.IOException2: Failed to download from http://updates.jenkins-ci.org/download/plugins/git-client/2.1.0/git-client.hpi (redirected to: http://ftp.halifax.rwth-aachen.de/jenkins/plugins/git-client/2.1.0/git-client.hpi)
at hudson.model.UpdateCenter$UpdateCenterConfiguration.download(UpdateCenter.java:1169)
at hudson.model.UpdateCenter$DownloadJob._run(UpdateCenter.java:1666)
at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1864)
at hudson.model.UpdateCenter$DownloadJob.run(UpdateCenter.java:1640)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:110)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: Server returned HTTP response code: 403 for URL: http://ftp.halifax.rwth-aachen.de/jenkins/plugins/git-client/2.1.0/git-client.hpi
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1926)
at sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1921)
at java.security.AccessController.doPrivileged(Native Method)
at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1920)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1490)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1474)
at hudson.model.UpdateCenter$UpdateCenterConfiguration.download(UpdateCenter.java:1121)
... 7 more
Caused by: java.io.IOException: Server returned HTTP response code: 403 for URL: http://ftp.halifax.rwth-aachen.de/jenkins/plugins/git-client/2.1.0/git-client.hpi
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1876)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1474)
at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:2982)
at java.net.URLConnection.getHeaderFieldLong(URLConnection.java:629)
at java.net.URLConnection.getContentLengthLong(URLConnection.java:501)
at java.net.URLConnection.getContentLength(URLConnection.java:485)
at hudson.model.UpdateCenter$UpdateCenterConfiguration.download(UpdateCenter.java:1120)
... 7 more
enter code here
By default Jenkins is using http://updates.jenkins-ci.org/update-center.json as a "load balancer" url which forwards you to the closest geographical mirror json (i.e. http://ftp-nyc.osuosl.org/pub/jenkins/updates/current/update-center.json for me). What you can do is use your own json file for that purpose by installing this plugin and host json file anywhere you want (i.e. internally):
https://wiki.jenkins.io/display/JENKINS/UpdateSites+Manager+plugin
I found a workaround:
Download the plugin direct from http://mirrors.jenkins-ci.org/plugins/gitlab-plugin/latest/
Upload the hpi-file into jenkins. There is an
upload field in http://host:8080/pluginManager/advanced.
But this is only a workaround. I would like to get an answer to my question: "Is there a way to choose or disable the mirror when downloading plugins for jenkins?"

Resources