Images and attachments no longer loading following migration of Jira instance between servers
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
Following a migration of a Jira instance from one server to another, attachments added to Jira prior to the migration are not loading or showing thumbnail previews. However new attachments (added since the migration completed) appear as expected.
Environment
Any Jira Server/Data Center instance.
Diagnosis
Attachment files present in the original <Jira-home>/data/attachments folder are not present in the post-migration <Jira-home>/data/attachments folder.
Within the atlassian-jira.log files the following may be observed:
1
2
3
4
2023-05-09 14:42:19,924-0500 http-nio-8080-exec-2 WARN admin 882x631181x1 1n18n9r 198.51.100.2,198.51.100.4 /secure/thumbnail/85451/_thumb_85451.png [c.a.j.issue.thumbnail.DefaultThumbnailManager] Unable to create thumbnail C:\Program Files\Atlassian\Application Data\Jira\data\attachments\KEY\10000\KEY-47\thumbs\_thumb_85451.png14990748362992015303.tmp for image image-2022-04-25-10-58-13-720.png id: 85451, found in issue KEY-47. Resetting thumbnailable flag to FALSE
com.atlassian.jira.issue.attachment.NoAttachmentDataException: Attachment does not exist in filesystem C:\Program Files\Atlassian\Application Data\Jira\data\attachments\STU\10000\STU-7647\85451
2023-05-09 14:42:20,058 http-bio-8080-exec-1 ERROR admin 866x99x1 1xmyu65 198.51.100.2 /secure/attachment/22730/attachment1.jpg [jira.web.servlet.ViewAttachmentServlet] Error serving file for path /47/attachment1.jpg: Attachment does not exist in filesystem /opt/atlassian/jira-application-data/data/attachments/KEY/KEY-47/attachment1.jpg com.atlassian.jira.issue.attachment.NoAttachmentDataException: Attachment does not exist in filesystem /opt/atlassian/jira-application-data/data/attachments/KEY/KEY-47/attachment1.jpg
Cause
The pre-migration attachment files were not migrated to the post-migration file system location and need to be copied over from the original <Jira-home> folder.
Solution
Performing the following actions should resolve the issue:
Copy the contents from the pre-migration <Jira-home>/data/attachments folder into the post migration <Jira-home>/data/attachments folder.
⚠️ For Data Center instances the <Jira-home> location should be the Jira Shared Home.
Was this helpful?