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

Atlassian JIRA | Mauro Fernandez Badii [Atlassian] | 10 months ago
  1. 0

    h3. Summary Documentation [Importing issues|https://confluence.atlassian.com/jiracloud/importing-issues-737772291.html] 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. h3. Environment * JIRA Cloud h3. Steps to Reproduce # Attempt an Import with attachments in .tar.gz format h3. Expected Results The Import succeeds h3. Actual Results The Import fails and JIRA Cloud is locked: !JIRA_access_problem.jpeg|thumbnail! Logs show: {noformat} Caused by: com.atlassian.jira.issue.attachment.AttachmentWriteException: java.net.ProtocolException: unexpected end of stream {noformat} Full error: {noformat} 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) {noformat} h3. 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|https://jira.atlassian.com/browse/JRA-59906] h3.Workaround * Use .Zip * To unlock, contact Support that will restart JIRA

    Atlassian JIRA | 10 months ago | Mauro Fernandez Badii [Atlassian]
    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
  2. 0

    h3. Summary Documentation [Importing issues|https://confluence.atlassian.com/display/AdminJIRACloud/Importing+issues+from+JIRA+server+applications] 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. h3. Environment * JIRA Cloud h3. Steps to Reproduce # Attempt an Import with attachments in .tar.gz format h3. Expected Results The Import succeeds h3. 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: !JIRA_access_problem.jpeg|thumbnail! Logs show: {noformat} Caused by: com.atlassian.jira.issue.attachment.AttachmentWriteException: java.net.ProtocolException: unexpected end of stream {noformat} Full error: {noformat} 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) {noformat} h3. 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|https://jira.atlassian.com/browse/JRA-59906] h3.Workaround * Use .Zip * To unlock, contact Support that will restart JIRA

    Atlassian JIRA | 10 months ago | Mauro Fernandez Badii [Atlassian]
    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
  3. 0

    h3. Summary When there are a significant number of attachments to import it inevitably fails as the iostream closes. The only option is then to import without attachments and support moves the attachments in later. h3. Environment * JIRA Cloud h3. Steps to Reproduce # Perform a JIRA import including a zip file with many attachments (in my case it failed with 3,333 attachments) h3. Expected Results Import completes successfully. h3. Actual Results The import fails with cause: {noformat} Caused by: com.atlassian.jira.issue.attachment.AttachmentWriteException: java.io.IOException: Stream closed {noformat} Full error: {noformat} com.atlassian.studio.host.common.DataSetupException: com.atlassian.jira.issue.attachment.AttachmentRuntimeException: Could not upload attachment id:14,855 entry name:attachments/KEY/KEY-1504/14855 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:14,855 entry name:attachments/KEY/KEY-1504/14855 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.ZipArchiveExtractor.visitEntries(ZipArchiveExtractor.java:97) 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) ... 13 more Caused by: com.atlassian.jira.issue.attachment.AttachmentWriteException: java.io.IOException: Stream closed at java.util.zip.InflaterInputStream.ensureOpen(InflaterInputStream.java:67) at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:142) at io.atlassian.blobstore.client.impl.net.Sources$1.read(Sources.java:34) at okio.RealBufferedSink.writeAll(RealBufferedSink.java:96) at io.atlassian.blobstore.client.impl.net.StreamingRequestBody.writeTo(StreamingRequestBody.java:43) 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$ApplicationInterceptorChain.proceed(Call.java:230) 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$1285/33115244.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$1286/24824753.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) at com.atlassian.jira.issue.attachment.store.BlobStoreAttachmentStore$5.apply(BlobStoreAttachmentStore.java:132) at com.atlassian.jira.issue.attachment.store.BlobStoreAttachmentStore$5.apply(BlobStoreAttachmentStore.java:128) at com.google.common.base.Functions$FunctionComposition.apply(Functions.java:216) at com.atlassian.fugue.Either$Left.fold(Either.java:545) at com.atlassian.jira.issue.attachment.store.BlobStoreAttachmentStore$15.apply(BlobStoreAttachmentStore.java:304) at com.atlassian.jira.issue.attachment.store.BlobStoreAttachmentStore$15.apply(BlobStoreAttachmentStore.java:301) at com.atlassian.util.concurrent.Promises$Of$1.apply(Promises.java:263) at com.atlassian.util.concurrent.Promises$2.onSuccess(Promises.java:185) at com.google.common.util.concurrent.Futures$6.run(Futures.java:1319) at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:457) at com.google.common.util.concurrent.ExecutionList.executeListener(ExecutionList.java:156) at com.google.common.util.concurrent.ExecutionList.execute(ExecutionList.java:145) at com.google.common.util.concurrent.AbstractFuture.set(AbstractFuture.java:185) at com.google.common.util.concurrent.SettableFuture.set(SettableFuture.java:53) at com.atlassian.util.concurrent.Executors$DefaultSubmitter$CallableRunner.run(Executors.java:62) at com.atlassian.util.concurrent.LimitedExecutor$Runner.run(LimitedExecutor.java:93) ... 3 more {noformat} h3.Notes Similar error when using tar.gz files [JRA-59605|https://jira.atlassian.com/browse/JRA-59605] but with different cause. h3.Workaround Import with just the JIRA XML and request Atlassian Cloud Support (https://support.atlassian.com) migrate the attachments for you.

    Atlassian JIRA | 10 months ago | Matthew Hunter
    com.atlassian.studio.host.common.DataSetupException: com.atlassian.jira.issue.attachment.AttachmentRuntimeException: Could not upload attachment id:14,855 entry name:attachments/KEY/KEY-1504/14855
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    h3. Summary When there are a significant number of attachments to import it inevitably fails as the iostream closes. The only option is then to import without attachments and support moves the attachments in later. h3. Environment * JIRA Cloud h3. Steps to Reproduce # Perform a JIRA import including a zip file with many attachments (in my case it failed with 3,333 attachments) h3. Expected Results Import completes successfully. h3. Actual Results The import fails with cause: {noformat} Caused by: com.atlassian.jira.issue.attachment.AttachmentWriteException: java.io.IOException: Stream closed {noformat} Full error: {noformat} com.atlassian.studio.host.common.DataSetupException: com.atlassian.jira.issue.attachment.AttachmentRuntimeException: Could not upload attachment id:14,855 entry name:attachments/KEY/KEY-1504/14855 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:14,855 entry name:attachments/KEY/KEY-1504/14855 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.ZipArchiveExtractor.visitEntries(ZipArchiveExtractor.java:97) 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) ... 13 more Caused by: com.atlassian.jira.issue.attachment.AttachmentWriteException: java.io.IOException: Stream closed at java.util.zip.InflaterInputStream.ensureOpen(InflaterInputStream.java:67) at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:142) at io.atlassian.blobstore.client.impl.net.Sources$1.read(Sources.java:34) at okio.RealBufferedSink.writeAll(RealBufferedSink.java:96) at io.atlassian.blobstore.client.impl.net.StreamingRequestBody.writeTo(StreamingRequestBody.java:43) 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$ApplicationInterceptorChain.proceed(Call.java:230) 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$1285/33115244.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$1286/24824753.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) at com.atlassian.jira.issue.attachment.store.BlobStoreAttachmentStore$5.apply(BlobStoreAttachmentStore.java:132) at com.atlassian.jira.issue.attachment.store.BlobStoreAttachmentStore$5.apply(BlobStoreAttachmentStore.java:128) at com.google.common.base.Functions$FunctionComposition.apply(Functions.java:216) at com.atlassian.fugue.Either$Left.fold(Either.java:545) at com.atlassian.jira.issue.attachment.store.BlobStoreAttachmentStore$15.apply(BlobStoreAttachmentStore.java:304) at com.atlassian.jira.issue.attachment.store.BlobStoreAttachmentStore$15.apply(BlobStoreAttachmentStore.java:301) at com.atlassian.util.concurrent.Promises$Of$1.apply(Promises.java:263) at com.atlassian.util.concurrent.Promises$2.onSuccess(Promises.java:185) at com.google.common.util.concurrent.Futures$6.run(Futures.java:1319) at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:457) at com.google.common.util.concurrent.ExecutionList.executeListener(ExecutionList.java:156) at com.google.common.util.concurrent.ExecutionList.execute(ExecutionList.java:145) at com.google.common.util.concurrent.AbstractFuture.set(AbstractFuture.java:185) at com.google.common.util.concurrent.SettableFuture.set(SettableFuture.java:53) at com.atlassian.util.concurrent.Executors$DefaultSubmitter$CallableRunner.run(Executors.java:62) at com.atlassian.util.concurrent.LimitedExecutor$Runner.run(LimitedExecutor.java:93) ... 3 more {noformat} h3.Notes Similar error when using tar.gz files [JRA-59605|https://jira.atlassian.com/browse/JRA-59605] but with different cause. h3.Workaround Import with just the JIRA XML and request Atlassian Cloud Support (https://support.atlassian.com) migrate the attachments for you.

    Atlassian JIRA | 10 months ago | Matthew Hunter
    com.atlassian.studio.host.common.DataSetupException: com.atlassian.jira.issue.attachment.AttachmentRuntimeException: Could not upload attachment id:14,855 entry name:attachments/KEY/KEY-1504/14855

    Root Cause Analysis

    1. com.atlassian.jira.issue.attachment.AttachmentWriteException

      java.net.ProtocolException: unexpected end of stream

      at com.squareup.okhttp.internal.http.HttpConnection$FixedLengthSink.close()
    2. OkHttp
      HttpConnection$FixedLengthSink.close
      1. com.squareup.okhttp.internal.http.HttpConnection$FixedLengthSink.close(HttpConnection.java:300)
      1 frame
    3. Okio
      RealBufferedSink.close
      1. okio.RealBufferedSink.close(RealBufferedSink.java:235)
      1 frame
    4. OkHttp
      Call.execute
      1. com.squareup.okhttp.internal.http.HttpEngine$NetworkInterceptorChain.proceed(HttpEngine.java:899)
      2. com.squareup.okhttp.internal.http.HttpEngine.readResponse(HttpEngine.java:760)
      3. com.squareup.okhttp.Call.getResponse(Call.java:274)
      4. com.squareup.okhttp.Call.getResponseWithInterceptorChain(Call.java:201)
      5. com.squareup.okhttp.Call.execute(Call.java:81)
      5 frames
    5. io.atlassian.blobstore
      RemoteBlobStoreImpl.lambda$doPut$16
      1. io.atlassian.blobstore.client.impl.RemoteBlobStoreImpl.lambda$doPut$16(RemoteBlobStoreImpl.java:268)
      1 frame