Uploaded image for project: 'Artifactory Binary Repository'
  1. Artifactory Binary Repository
  2. RTFACT-16802

multi-threaded uploads on new directory failure

    XMLWordPrintable

    Details

    • Severity:
      Medium
    • Regression:
      Yes

      Description

      scope:

      jenkins core 2.124

      jenkins artifactory plugin  2.16.1

      steps to reproduce:

      1. create multiple "txt" files in the jenkins %workspace%
      2. create a 'sandbox' local repo on jfrog
      3. define a publish stage in jenkins pipeline so that a new sub-directory is created during upload:
                    stage(Publish)
                    {
                        steps
                        {
                            script{
                            server = Artifactory.server 'jfrog_artifactory'
                            def uploadSpec = """{
                            \"files\": [
                            {
                                \"pattern\": \"*.txt\",
                                \"target\": \"sandbox/${env.NODE_NAME}${env.BUILD_NUMBER}/\"
                            }
                            ]
                            }"""
                            server.upload(uploadSpec)
                            }                
                        }
                    }
        
      1. Publish fails with odd
        Bad credentials Status code: 401

        Race condition?

      [consumer_0] Deploying artifact: http://artifactory.company.com:8081/artifactory/sandbox/chaxen6/env.txt
      [consumer_1] Deploying artifact: http://artifactory.company.com:8081/artifactory/sandbox/chaxen6/env1.txt
      [consumer_2] Deploying artifact: http://artifactory.company.com:8081/artifactory/sandbox/chaxen6/env2.txt
      [Thread consumer_0] An exception occurred during execution:
      java.lang.RuntimeException: java.io.IOException: Failed to deploy file. Status code: 401 Response message: Artifactory returned the following errors:
      Bad credentials Status code: 401
          at org.jfrog.build.extractor.clientConfiguration.util.spec.SpecDeploymentConsumer.consumerRun(SpecDeploymentConsumer.java:44)
          at org.jfrog.build.extractor.producerConsumer.ConsumerRunnableBase.run(ConsumerRunnableBase.java:11)
          at java.lang.Thread.run(Unknown Source)
      Caused by: java.io.IOException: Failed to deploy file. Status code: 401 Response message: Artifactory returned the following errors:
      Bad credentials Status code: 401
          at org.jfrog.build.extractor.clientConfiguration.client.ArtifactoryBuildInfoClient.uploadFile(ArtifactoryBuildInfoClient.java:692)
          at org.jfrog.build.extractor.clientConfiguration.client.ArtifactoryBuildInfoClient.doDeployArtifact(ArtifactoryBuildInfoClient.java:374)
          at org.jfrog.build.extractor.clientConfiguration.client.ArtifactoryBuildInfoClient.deployArtifact(ArtifactoryBuildInfoClient.java:362)
          at org.jfrog.build.extractor.clientConfiguration.util.spec.SpecDeploymentConsumer.consumerRun(SpecDeploymentConsumer.java:39)
          ... 2 more
      1. workaround: upload every file one after the other

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            kgiloo GK (Inactive)
            Votes:
            4 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated:

                Sync Status

                Connection: RTFACT Sync
                RTMID-16802 -
                SYNCHRONIZED
                • Last Sync Date: