Uploaded image for project: 'Migration Platform'
  1. Migration Platform
  2. MIG-263

JCMA project migration fails with "request to Media failed"

    XMLWordPrintable

Details

    • 2
    • Severity 3 - Minor

    Description

      Issue Summary

      When migrating a big amount of projects/attachments with JCMA the add-on might fail to migrate the projects and throw the below export error:

      2020-09-10 16:22:07.547 ERROR ABC attachment-export We couldn't export Attachment 'A.jpg' (on Issue ABC-128654). Reason: com.atlassian.jira.issue.attachment.AttachmentReadException: com.atlassian.jira.migration.mediaclient.MediaClientErrorException: request to Media failed.
      

      Steps to Reproduce

      1. Create a migration plan.
      2. Migrate a few projects.

      Expected Results

      JCMA should be able to migrate the attachments and projects without issues.

      Actual Results

      JCMA fails when exporting attachmetns and in the JIRA applications logs we can see the below error:

      2020-09-10 10:22:07,557-0600 pool-5532-thread-5 WARN user@abc.com 391x446976x3 1hkyydu 10.57.121.10 /rest/plugins/1.0/ [c.a.j.m.workers.attachments.AttachmentProcessor] d0dd5208-6885-4a17-abaf-315b4f3d0ab2-attachmentsUpload#ABC$ecxxxxxxc100c6f054333c49111bb5e6ce654b6ceff2b0db121f1748e305e: error in attachments upload task for project key ABC
      com.atlassian.jira.migration.workers.attachments.AttachmentUploadException: com.atlassian.jira.issue.attachment.AttachmentReadException: com.atlassian.jira.issue.attachment.AttachmentReadException:
      ......
      Caused by: com.atlassian.jira.migration.httpclient.exceptions.UnexpectedStatusCodeException: Received an unexpected status code; expected [200, 409], but received 404: {"error":{"code":"NotFoundError","title":"The Upload with the given xxxx-f84b-43eb-962b-1a0c7c043416 does not exist","href":"https://api.media.atlassian.com#NotFoundError"}}
      	at com.atlassian.jira.migration.httpclient.exceptions.ExceptionsKt.unexpectedStatusCode(Exceptions.kt:7)
      	at com.atlassian.jira.migration.httpclient.MigrationPluginHttpClient.checkExpectedResponseCode(MigrationPluginHttpClient.kt:136)
      	at com.atlassian.jira.migration.httpclient.MigrationPluginHttpClient.execute(MigrationPluginHttpClient.kt:65)
      	at com.atlassian.jira.migration.mediaclient.MediaClient.execute(MediaClient.kt:181)
      	... 13 more
      

      Notes

      The issue is transient and it won't necessarily affect the same attachment.
      So far it seems like the migration duration is related to the issue.

      Workaround

      Retry the migration for the affected projects. JCMA should only migrate the missing attachments so it should take way less time and it should also go through.

      Attachments

        Issue Links

          Activity

            People

              dweerasinghe@atlassian.com Dilan Weerasinghe
              akasper André K. (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: