Attachment rendering errors following migration of Jira server

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

Symptoms

After Migrating Servers or migrating from JIRA Cloud to JIRA Server, following the step 4. described on Migrating from JIRA Cloud to JIRA Server

The attachments Thumbnail does not render in the Issue View screen:

(Auto-migrated image: description temporarily unavailable)

The following appear in the logs:

1 2 3 4 5 6 7 2015-01-15 19:58:10,910 http-bio-8080-exec-18 ERROR sysadmin 1198x51x1 xk7j1j 127.0.0.1 /browse/ISSUEKEY-1 [jira.web.component.ModuleWebComponentImpl] An exception occured while rendering the web panel: com.atlassian.jira.jira-view-issue-plugin:attachmentmodule (null) java.lang.IllegalStateException: java.io.IOException: No such file or directory at com.atlassian.jira.issue.thumbnail.DefaultThumbnailManager.getTempFile(DefaultThumbnailManager.java:125) at com.atlassian.jira.issue.thumbnail.DefaultThumbnailManager.doGetThumbnail(DefaultThumbnailManager.java:328) at com.atlassian.jira.issue.thumbnail.DefaultThumbnailManager.getThumbnail(DefaultThumbnailManager.java:266) at com.atlassian.jira.issue.thumbnail.DefaultThumbnailManager.getThumbnail(DefaultThumbnailManager.java:256) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
1 2015-01-15 19:58:10,950 http-bio-8080-exec-18 WARN sysadmin 1198x51x1 xk7j1j 127.0.0.1 /browse/ANDROID-400 [jira.issue.attachment.FileSystemAttachmentDirectoryAccessor] Unable to make thumbnail directory /data/jirastudio/jira/home/data/attachments/ANDROID/ISSUEKEY-1/thumbs

Diagnosis

Browsing to Administration >> System >> System Info, the path for Cloud attachments is still in the application Paths:

(Auto-migrated image: description temporarily unavailable)
(Auto-migrated image: description temporarily unavailable)

Cause

Cause 1 : During the XML Import, the Attachments path was not restored to the default ones.

Cause 2 : Permissions of the directories are not configured correctly

Solution

Resolution

For Cause 1 :

  1. Try to restore the same Backup again, in a clean database, the application should restore the default paths, or advise that the path must be restored, then you can click to apply the new default path.

  2. In case the path is still the one used by Cloud instance, even after a second attempt to restore, you will have to change the path Directly in the entities.xml file:

  • Unzip the backup.zip

  • Open the entities.xml file.

  • Search for these three entries of the Cloud path in the XML file:

1 2 3 4 5 jira.option.watching : true jira.option.web.usegzip : false jira.path.attachments : /data/jirastudio/jira/home/data/attachments jira.path.attachments.use.default.directory : true jira.path.index.use.default.directory : true
1 2 3 4 5 6 ___ File Paths _____________________________ JIRA Home : /data/jirastudio/jira/home JIRA Local Home : /data/jirastudio/jira/home Location of atlassian-jira.log : unknown?? Index Path : /data/jirastudio/jira/home/caches/indexes Attachment Path : /data/jirastudio/jira/home/data/attachments
1 2 3 <OSPropertyString id="10206" value="private"/> <OSPropertyString id="10209" value="/data/jirastudio/jira/home/data/attachments"/> <OSPropertyString id="10223" value="en_US"/>
  • Update with the new absolute path of your attachments folder, eg:

1 2 3 4 5 jira.option.watching : true jira.option.web.usegzip : false jira.path.attachments : /opt/atlassian/jira/home/dataattachments jira.path.attachments.use.default.directory : true jira.path.index.use.default.directory : true
1 2 3 4 5 6 ___ File Paths _____________________________ JIRA Home : /data/jirastudio/jira/home JIRA Local Home : /data/jirastudio/jira/home Location of atlassian-jira.log : unknown?? Index Path : /data/jirastudio/jira/home/caches/indexes Attachment Path : /opt/atlassian/jira/home/dataattachments
1 2 3 <OSPropertyString id="10206" value="private"/> <OSPropertyString id="10209" value="/opt/atlassian/jira/home/dataattachments"/> <OSPropertyString id="10223" value="en_US"/>
  • Zip the entities.xml and activeobjects.xml in a single .zip file, and perform the import again.

ℹ️ It is always important to make sure that the user running JIRA has all permissions recursively on JIRA HOME and JIRA Install directories.

For Cause 2:

  1. Stop JIRA.

  2. Fix the permissions for the below directories and all of their subdirectories:

    1 2 $JIRA_HOME/ $JIRA_INSTALL/

    Expand for Linux instructions...

    These instructions refer to the default user, group & installation paths for JIRA, as if it were installed using the bundled installer. If you're unsure of what these permissions should be, please consult with your System Administrator and the user who installed JIRA.

    1 2 3 4 5 6 7 8 sudo chown -R jira:jira /var/atlassian/application-data/jira sudo chown -R jira:jira /opt/atlassian/jira/logs sudo chown -R jira:jira /opt/atlassian/jira/temp sudo chown -R jira:jira /opt/atlassian/jira/work chmod -R u=rwx,g=rx,o=rx /var/atlassian/application-data/jira chmod -R u=rwx,g=rx,o=rx /opt/atlassian/jira/logs chmod -R u=rwx,g=rx,o=rx /opt/atlassian/jira/temp chmod -R u=rwx,g=rx,o=rx /opt/atlassian/jira/work

    Expand for Windows instructions...

    Please refer to this Techotopia documentation for further information.

  3. Remove the contents of the following directory:

    1 $JIRA_INSTALL/work

    ℹ️ This will be rebuilt when JIRA is restarted.

  4. Start JIRA.

Updated on April 15, 2025

Still need help?

The Atlassian Community is here for you.