Uploaded image for project: 'Jira Cloud'
  1. Jira Cloud
  2. JRACLOUD-65345

JIRA Cloud Import fails with Attachments in tar.gz or .tgz format

    XMLWordPrintable

Details

    Description

      Summary

      Documentation Importing issues states that file types .zip, .tar.gz/.tgz, .tar.bz2 are accepted but when compressing attachments in .tar.gz or .tgz format, the import fails. Using Zip it works.

      Environment

      • JIRA Cloud

      Steps to Reproduce

      1. Attempt an Import with attachments in .tar.gz format

      Expected Results

      The Import succeeds

      Actual Results

      Update: 7/7/2016 - JIRA will no longer allow archive formats that are known to cause problems to be selected. If the expected import files are not available for selection please repack the files in zip format and retry the import.

      Under the previous behaviour the Import fails and JIRA Cloud is locked:

      Logs show:

      Caused by: com.atlassian.jira.issue.attachment.AttachmentWriteException: java.net.ProtocolException: unexpected end of stream
      

      Full error:

      2016-01-28 17:39:55,306 JiraImportTaskExecutionThread-1 INFO arachunok     [c.a.j.studio.importer.StudioImport] Extract...Processing attachments
      2016-01-28 17:39:55,464 blobstore-client-http:thread-1 WARN arachunok     [i.a.b.client.impl.RemoteBlobStoreImpl] Not recovering due to unrecoverable exception java.net.ProtocolException: unexpected end of stream
      2016-01-28 17:39:55,485 JiraImportTaskExecutionThread-1 INFO arachunok     [c.a.s.j.i.i.upload.stream.AttachmentErrorReporter] Attachment 'attachments/GM/GM-83/36889' with id '36889' could not be uploaded retrying
      2016-01-28 17:39:55,487 JiraImportTaskExecutionThread-1 ERROR arachunok     [c.a.j.studio.importer.StudioImport] Error while processing archive type: ATTACHMENTS
      com.atlassian.studio.host.common.DataSetupException: com.atlassian.jira.issue.attachment.AttachmentRuntimeException: Could not upload attachment id:36,889 entry name:attachments/GM/GM-83/36889
      	at com.atlassian.studio.jira.importer.impl.JiraImportFileServiceImpl.importArchive(JiraImportFileServiceImpl.java:260)
      	at com.atlassian.studio.jira.importer.impl.StudioImporterFacade.importArchive(StudioImporterFacade.java:171)
      	at com.atlassian.jira.studio.importer.StudioDataImportAsyncCommand.importFileArchives(StudioDataImportAsyncCommand.java:210)
      	at com.atlassian.jira.studio.importer.StudioDataImportAsyncCommand.importDataAndFiles(StudioDataImportAsyncCommand.java:175)
      	at com.atlassian.jira.studio.importer.StudioDataImportAsyncCommand.call(StudioDataImportAsyncCommand.java:120)
      	at com.atlassian.jira.studio.importer.StudioDataImportAsyncCommand.call(StudioDataImportAsyncCommand.java:61)
      	at com.atlassian.jira.task.ImportTaskManagerImpl$TaskCallableDecorator.call(ImportTaskManagerImpl.java:157)
      	at com.atlassian.jira.task.ImportTaskManagerImpl$TaskCallableDecorator.call(ImportTaskManagerImpl.java:133)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	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:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: com.atlassian.jira.issue.attachment.AttachmentRuntimeException: Could not upload attachment id:36,889 entry name:attachments/GM/GM-83/36889
      	at com.atlassian.studio.jira.importer.impl.upload.stream.SingleAttachmentUploader.tryUploadAttachment(SingleAttachmentUploader.java:62)
      	at com.atlassian.studio.jira.importer.impl.upload.stream.SingleAttachmentUploader.apply(SingleAttachmentUploader.java:51)
      	at com.atlassian.studio.jira.importer.impl.upload.stream.SingleAttachmentUploader.apply(SingleAttachmentUploader.java:24)
      	at com.google.common.collect.Iterators$8.transform(Iterators.java:799)
      	at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:48)
      	at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143)
      	at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138)
      	at com.google.common.collect.Iterators.getNext(Iterators.java:865)
      	at com.google.common.collect.Iterators.find(Iterators.java:733)
      	at com.atlassian.studio.jira.importer.impl.upload.stream.UploadAllEntries.visit(UploadAllEntries.java:45)
      	at com.atlassian.studio.jira.importer.impl.upload.stream.UploadAllEntries.visit(UploadAllEntries.java:26)
      	at com.atlassian.studio.jira.importer.impl.archive.TarArchiveExtractor.visitEntries(TarArchiveExtractor.java:101)
      	at com.atlassian.studio.jira.importer.impl.upload.stream.StreamArchiveUploader.uploadEntries(StreamArchiveUploader.java:58)
      	at com.atlassian.studio.jira.importer.impl.JiraImportFileServiceImpl.importArchive(JiraImportFileServiceImpl.java:258)
      Caused by: com.atlassian.jira.issue.attachment.AttachmentWriteException: java.net.ProtocolException: unexpected end of stream
      	at com.squareup.okhttp.internal.http.HttpConnection$FixedLengthSink.close(HttpConnection.java:300)
      	at okio.RealBufferedSink.close(RealBufferedSink.java:235)
      	at com.squareup.okhttp.internal.http.HttpEngine$NetworkInterceptorChain.proceed(HttpEngine.java:899)
      	at com.squareup.okhttp.internal.http.HttpEngine.readResponse(HttpEngine.java:760)
      	at com.squareup.okhttp.Call.getResponse(Call.java:274)
      	at com.squareup.okhttp.Call.getResponseWithInterceptorChain(Call.java:201)
      	at com.squareup.okhttp.Call.execute(Call.java:81)
      	at io.atlassian.blobstore.client.impl.RemoteBlobStoreImpl.lambda$doPut$16(RemoteBlobStoreImpl.java:268)
      	at io.atlassian.blobstore.client.impl.RemoteBlobStoreImpl$$Lambda$941/15162317.get(Unknown Source)
      	at com.atlassian.fugue.retry.RetrySupplier.get(RetrySupplier.java:93)
      	at io.atlassian.blobstore.client.impl.RemoteBlobStoreImpl.lambda$retried$20(RemoteBlobStoreImpl.java:364)
      	at io.atlassian.blobstore.client.impl.RemoteBlobStoreImpl$$Lambda$942/14120897.get(Unknown Source)
      	at com.atlassian.util.concurrent.Suppliers$CallableAdapter.call(Suppliers.java:119)
      	at com.atlassian.util.concurrent.Executors$DefaultSubmitter$CallableRunner.run(Executors.java:62)
      	at com.atlassian.util.concurrent.LimitedExecutor$Runner.run(LimitedExecutor.java:93)
      	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)
      

      Notes

      Doing the same import with a .zip format works as expected
      If you are experiencing a similar error with zip, see: JRA-59906 - Import fails due to closed stream

      Workaround

      • Use .Zip
      • To unlock, contact Support that will restart JIRA

      Attachments

        Issue Links

          Activity

            People

              ohookins@atlassian.com Oliver Hookins (Inactive)
              mfernandezbadii Mauro Badii
              Votes:
              3 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: