Attachment rendering errors following migration of Jira server

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

症状

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:

 

The following appear in the logs:

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)
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

診断

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

 

原因

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 

ソリューション

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:
     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
___ 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
    <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:
     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
___ 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
    <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.

(info)  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. Jira を停止します。

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

    $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.

    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:

    $JIRA_INSTALL/work

    (info) This will be rebuilt when JIRA is restarted.

  4. Jira を起動します。

 

 

最終更新日 2019 年 9 月 25 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.