[JIRA] (JENKINS-59049) 400 Message: Bad Request when downloading resource

5 views
Skip to first unread message

Julien.Helbling@apgsga.ch (JIRA)

unread,
Aug 22, 2019, 6:59:03 AM8/22/19
to jenkinsc...@googlegroups.com
Julien Helbling created an issue
 
Jenkins / Bug JENKINS-59049
400 Message: Bad Request when downloading resource
Issue Type: Bug Bug
Assignee: Eyal Ben Moshe
Components: artifactory-plugin
Created: 2019-08-22 10:58
Priority: Major Major
Reporter: Julien Helbling

We have 2 identical resources (ZIP) available on Artifactory (cloud). One resource is within a "Generic Repository", the other one is on a "Maven Repository". We're downloading these resources using the following code from within a pipeline:

 

node {

   def zip = 'it21gui-dist-zip-9.1.0.ADMIN-UIMIG-1160.zip'
   def server = Artifactory.server env.ARTIFACTORY_SERVER_ID
   
   	withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 'dev',
			usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD']]) {

		server.username = "${USERNAME}"
		server.password = "${PASSWORD}"
	}
   
   	def downloadSpec = """{
              "files": [
                    {
                      "pattern": "${env.RELEASES_PATCH_REPO}*${zip}",
					   "target": "download10/"
					   }
			 ]
	}"""
	server.download(downloadSpec)
   
}

When downloading from the "Generic Repository", no problem. When downloading from the "Maven Repository", we get the following error:

Running in Durability level: MAX_SURVIVABILITY
[Pipeline] Start of Pipeline
[Pipeline] node
Running on Jenkins in C:\Program Files (x86)\Jenkins\workspace\testDownload
[Pipeline] {
[Pipeline] getArtifactoryServer
[Pipeline] withCredentials
Masking supported pattern matches of %USERNAME% or %PASSWORD%
[Pipeline] {
[Pipeline] }
[Pipeline] // withCredentials
[Pipeline] newBuildInfo
[Pipeline] artifactoryDownload
expected to call org.jfrog.hudson.pipeline.common.types.ArtifactoryServer.download but wound up catching artifactoryDownload; see: https://jenkins.io/redirect/pipeline-cps-method-mismatches/
Searching for artifacts...
Found 1 artifacts.
Beginning to resolve Build Info published dependencies.
Downloading 'https://artifactory4t4apgsga.jfrog.io/artifactory4t4apgsga/releases-test/com/affichage/it21/it21gui-dist-zip/9.1.0.ADMIN-UIMIG-1160/it21gui-dist-zip-9.1.0.ADMIN-UIMIG-1160.zip'...
[Thread downloader_0] downloading C:\Windows\TEMP\1566470759755-0\com/affichage/it21/it21gui-dist-zip/9.1.0.ADMIN-UIMIG-1160/it21gui-dist-zip-9.1.0.ADMIN-UIMIG-1160.zip0 as part of file https://artifactory4t4apgsga.jfrog.io/artifactory4t4apgsga/releases-test/com/affichage/it21/it21gui-dist-zip/9.1.0.ADMIN-UIMIG-1160/it21gui-dist-zip-9.1.0.ADMIN-UIMIG-1160.zip threw an exception: java.io.IOException: Error downloading https://artifactory4t4apgsga.jfrog.io/artifactory4t4apgsga/releases-test/com/affichage/it21/it21gui-dist-zip/9.1.0.ADMIN-UIMIG-1160/it21gui-dist-zip-9.1.0.ADMIN-UIMIG-1160.zip. Code: 400 Message: Bad Request
	at org.jfrog.build.extractor.clientConfiguration.client.ArtifactoryDependenciesClient.executeDownload(ArtifactoryDependenciesClient.java:207)
	at org.jfrog.build.extractor.clientConfiguration.client.ArtifactoryDependenciesClient.downloadArtifact(ArtifactoryDependenciesClient.java:171)
	at org.jfrog.build.extractor.clientConfiguration.util.DependenciesDownloaderHelper.saveRequestToFile(DependenciesDownloaderHelper.java:330)
	at org.jfrog.build.extractor.clientConfiguration.util.DependenciesDownloaderHelper.access$000(DependenciesDownloaderHelper.java:40)
	at org.jfrog.build.extractor.clientConfiguration.util.DependenciesDownloaderHelper$1.run(DependenciesDownloaderHelper.java:293)
	at java.lang.Thread.run(Unknown Source)

[Thread downloader_1] downloading C:\Windows\TEMP\1566470759755-0\com/affichage/it21/it21gui-dist-zip/9.1.0.ADMIN-UIMIG-1160/it21gui-dist-zip-9.1.0.ADMIN-UIMIG-1160.zip1 as part of file https://artifactory4t4apgsga.jfrog.io/artifactory4t4apgsga/releases-test/com/affichage/it21/it21gui-dist-zip/9.1.0.ADMIN-UIMIG-1160/it21gui-dist-zip-9.1.0.ADMIN-UIMIG-1160.zip threw an exception: java.io.IOException: Error downloading https://artifactory4t4apgsga.jfrog.io/artifactory4t4apgsga/releases-test/com/affichage/it21/it21gui-dist-zip/9.1.0.ADMIN-UIMIG-1160/it21gui-dist-zip-9.1.0.ADMIN-UIMIG-1160.zip. Code: 400 Message: Bad Request
	at org.jfrog.build.extractor.clientConfiguration.client.ArtifactoryDependenciesClient.executeDownload(ArtifactoryDependenciesClient.java:207)
	at org.jfrog.build.extractor.clientConfiguration.client.ArtifactoryDependenciesClient.downloadArtifact(ArtifactoryDependenciesClient.java:171)
	at org.jfrog.build.extractor.clientConfiguration.util.DependenciesDownloaderHelper.saveRequestToFile(DependenciesDownloaderHelper.java:330)
	at org.jfrog.build.extractor.clientConfiguration.util.DependenciesDownloaderHelper.access$000(DependenciesDownloaderHelper.java:40)
	at org.jfrog.build.extractor.clientConfiguration.util.DependenciesDownloaderHelper$1.run(DependenciesDownloaderHelper.java:293)
	at java.lang.Thread.run(Unknown Source)

[Thread downloader_2] downloading C:\Windows\TEMP\1566470759755-0\com/affichage/it21/it21gui-dist-zip/9.1.0.ADMIN-UIMIG-1160/it21gui-dist-zip-9.1.0.ADMIN-UIMIG-1160.zip2 as part of file https://artifactory4t4apgsga.jfrog.io/artifactory4t4apgsga/releases-test/com/affichage/it21/it21gui-dist-zip/9.1.0.ADMIN-UIMIG-1160/it21gui-dist-zip-9.1.0.ADMIN-UIMIG-1160.zip threw an exception: java.io.IOException: Error downloading https://artifactory4t4apgsga.jfrog.io/artifactory4t4apgsga/releases-test/com/affichage/it21/it21gui-dist-zip/9.1.0.ADMIN-UIMIG-1160/it21gui-dist-zip-9.1.0.ADMIN-UIMIG-1160.zip. Code: 400 Message: Bad Request
	at org.jfrog.build.extractor.clientConfiguration.client.ArtifactoryDependenciesClient.executeDownload(ArtifactoryDependenciesClient.java:207)
	at org.jfrog.build.extractor.clientConfiguration.client.ArtifactoryDependenciesClient.downloadArtifact(ArtifactoryDependenciesClient.java:171)
	at org.jfrog.build.extractor.clientConfiguration.util.DependenciesDownloaderHelper.saveRequestToFile(DependenciesDownloaderHelper.java:330)
	at org.jfrog.build.extractor.clientConfiguration.util.DependenciesDownloaderHelper.access$000(DependenciesDownloaderHelper.java:40)
	at org.jfrog.build.extractor.clientConfiguration.util.DependenciesDownloaderHelper$1.run(DependenciesDownloaderHelper.java:293)
	at java.lang.Thread.run(Unknown Source)

[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
java.lang.Exception: Error occurred while downloading https://artifactory4t4apgsga.jfrog.io/artifactory4t4apgsga/releases-test/com/affichage/it21/it21gui-dist-zip/9.1.0.ADMIN-UIMIG-1160/it21gui-dist-zip-9.1.0.ADMIN-UIMIG-1160.zip, please refer to logs for more information
	at org.jfrog.build.extractor.clientConfiguration.util.DependenciesDownloaderHelper.doConcurrentDownload(DependenciesDownloaderHelper.java:313)
	at org.jfrog.build.extractor.clientConfiguration.util.DependenciesDownloaderHelper.downloadFileConcurrently(DependenciesDownloaderHelper.java:265)
	at org.jfrog.build.extractor.clientConfiguration.util.DependenciesDownloaderHelper.downloadArtifact(DependenciesDownloaderHelper.java:219)
Caused: java.io.IOException
	at org.jfrog.build.extractor.clientConfiguration.util.DependenciesDownloaderHelper.downloadArtifact(DependenciesDownloaderHelper.java:232)
	at org.jfrog.build.extractor.clientConfiguration.util.DependenciesDownloaderHelper.downloadArtifact(DependenciesDownloaderHelper.java:193)
	at org.jfrog.build.extractor.clientConfiguration.util.DependenciesDownloaderHelper.downloadDependencies(DependenciesDownloaderHelper.java:131)
	at org.jfrog.build.extractor.clientConfiguration.util.DependenciesDownloaderHelper.downloadDependencies(DependenciesDownloaderHelper.java:90)
	at org.jfrog.build.extractor.clientConfiguration.util.spec.SpecsHelper.downloadArtifactsBySpec(SpecsHelper.java:142)
	at org.jfrog.hudson.generic.FilesResolverCallable.invoke(FilesResolverCallable.java:48)
	at org.jfrog.hudson.generic.FilesResolverCallable.invoke(FilesResolverCallable.java:20)
	at hudson.FilePath.act(FilePath.java:1076)
	at hudson.FilePath.act(FilePath.java:1059)
	at org.jfrog.hudson.pipeline.common.executors.GenericDownloadExecutor.execute(GenericDownloadExecutor.java:47)
	at org.jfrog.hudson.pipeline.scripted.steps.DownloadStep$Execution.run(DownloadStep.java:73)
	at org.jfrog.hudson.pipeline.scripted.steps.DownloadStep$Execution.run(DownloadStep.java:52)
	at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:47)
	at hudson.security.ACL.impersonate(ACL.java:290)
	at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44)
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.util.concurrent.FutureTask.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Finished: FAILURE

An idea what could be wrong?

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

Julien.Helbling@apgsga.ch (JIRA)

unread,
Aug 22, 2019, 7:07:02 AM8/22/19
to jenkinsc...@googlegroups.com
Julien Helbling updated an issue
Change By: Julien Helbling
We have 2 identical resources (ZIP) available on Artifactory (cloud). One resource is within a "Generic Repository", the other one is on a "Maven Repository". We're downloading these resources using the following code from within a pipeline:

 

{code:java}

node {

   def zip = 'it21gui-dist-zip-9.1.0.ADMIN-UIMIG-1160.zip'
   def server = Artifactory.server env.ARTIFACTORY_SERVER_ID
   
    withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: ' dev xxx ',

   usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD']]) {

  server.username = "${USERNAME}"
  server.password = "${PASSWORD}"
}
   
    def downloadSpec = """{
              "files": [
                    {
                     "pattern": "${env.RELEASES_PATCH_REPO}*${zip}",
        "target": "download10/"
        }
    ]
}"""
server.download(downloadSpec)
   
}
{code}


When downloading from the "Generic Repository", no problem. When downloading from the "Maven Repository", we get the following error:


{noformat}
{noformat}


An idea what could be wrong?

Julien.Helbling@apgsga.ch (JIRA)

unread,
Aug 22, 2019, 7:25:05 AM8/22/19
to jenkinsc...@googlegroups.com
Julien Helbling updated an issue
We have 2 identical resources (ZIP) available on Artifactory (cloud). One resource is within a "Generic Repository", the other one is on a "Maven Repository". We're downloading these resources using the following code from within a pipeline:

 

{code:java}
node {

   def zip = 'it21gui-dist-zip-9.1.0.ADMIN-UIMIG-1160.zip'
   def server = Artifactory.server env.ARTIFACTORY_SERVER_ID
   
    withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 'xxx',

We have the issue with either version 2.15.1 version of the plugin or with the latest version: 3.3.2.
Reply all
Reply to author
Forward
0 new messages