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

Cannot upload a file to S3 with a trailing '/' in the PATH

    Details

    • Type: Bug
    • Status: Open
    • Priority: Normal
    • Resolution: Unresolved
    • Affects Version/s: 5.4.4
    • Fix Version/s: None
    • Component/s: Filestore, S3
    • Labels:
    • Sprint:
      Pam - Quality 7

      Description

      Configure the binarystore.xml to S3 binary provider.
      When the S3 path is ending with a '/', large files are not uploaded to the S3 bucket.

      binarystore.xml example:

      <config version="2">
          <chain template="cluster-s3"/>
          <provider id="s3" type="s3">
              <endpoint>http://s3.amazonaws.com</endpoint>
              <identity>[IDENTITY]</identity>
              <credential>ACCESS_KEY_SECRET</credential>
              <bucketName>artifactory-us-east-1-filestore</bucketName>
              <path>filestore/</path>
      </provider>
      </config>
      

      The issue occurs only when a large file is uploaded, that triggers the S3 multipart upload.

      Stack Trace:

      2017-06-29 16:26:08,538 [eventual-cluster-s3-worker-0] [WARN ] (o.j.s.b.p.RetryBinaryProvider:157) - Failed to add blob to next binary provider for the '3' time, a retry will start in seconds
      2017-06-29 16:26:08,538 [eventual-cluster-s3-worker-0] [DEBUG] (o.j.s.b.p.RetryBinaryProvider:159) - Failed to add blob to next binary provider for the '3' time, a retry will start in seconds
      java.io.IOException: Failed to put blob '1fffef6adc5bb303f20c7298b679881eab0387e3' to s3
      at org.artifactory.addon.filestore.type.jets3t.s3.S3JetS3tBinaryProvider.addBigStream(S3JetS3tBinaryProvider.java:230) ~[artifactory-addon-filestore-5.4.1.jar:na]
      at org.artifactory.addon.filestore.type.jets3t.s3.S3JetS3tBinaryProvider.addStream(S3JetS3tBinaryProvider.java:200) ~[artifactory-addon-filestore-5.4.1.jar:na]
      at org.jfrog.storage.binstore.providers.RetryBinaryProvider.addStream(RetryBinaryProvider.java:154) [binary-store-core-2.0.13.jar:na]
      at org.jfrog.storage.binstore.providers.RetryBinaryProvider.addStream(RetryBinaryProvider.java:162) [binary-store-core-2.0.13.jar:na]
      at org.jfrog.storage.binstore.providers.RetryBinaryProvider.addStream(RetryBinaryProvider.java:162) [binary-store-core-2.0.13.jar:na]
      at org.jfrog.storage.binstore.providers.RetryBinaryProvider.addStream(RetryBinaryProvider.java:69) [binary-store-core-2.0.13.jar:na]
      at org.artifactory.addon.filestore.eventual.cluster.EventualDownstreamWorker.addBinaryToDownstream(EventualDownstreamWorker.java:119) [artifactory-addon-filestore-5.4.1.jar:na]
      at org.artifactory.addon.filestore.eventual.cluster.EventualDownstreamWorker.handleAdd(EventualDownstreamWorker.java:79) [artifactory-addon-filestore-5.4.1.jar:na]
      at org.artifactory.addon.filestore.eventual.cluster.EventualDownstreamWorker.call(EventualDownstreamWorker.java:60) [artifactory-addon-filestore-5.4.1.jar:na]
      at org.artifactory.addon.filestore.eventual.cluster.EventualDownstreamWorker.call(EventualDownstreamWorker.java:1) [artifactory-addon-filestore-5.4.1.jar:na]
      at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_131]
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_131]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_131]
      at java.lang.Thread.run(Thread.java:748) [na:1.8.0_131]
      Caused by: java.lang.Exception: Multipart upload failed
      at org.jets3t.service.utils.MultipartUtils.uploadObjects(MultipartUtils.java:281) ~[jets3t-0.9.4.jar:0.9.4]
      at org.artifactory.addon.filestore.type.jets3t.s3.S3JetS3tBinaryProvider.addBigStream(S3JetS3tBinaryProvider.java:220) ~[artifactory-addon-filestore-5.4.1.jar:na]
      ... 13 common frames omitted
      Caused by: java.lang.NullPointerException: null
      at org.jets3t.service.utils.MultipartUtils.uploadObjects(MultipartUtils.java:263) ~[jets3t-0.9.4.jar:0.9.4]
      ... 14 common frames omitted
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                tamirh Tamir Hadad
                Reporter:
                arielk Ariel Kabov
              • Votes:
                1 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated: