Attempting to Download all Attachments Displays a Not Found 404

Still need help?

The Atlassian Community is here for you.

Ask the community


Using the Download All Attachments functionality displays a Not Found (404) with the error "Could not create zip file for issue", as in the below screen shot:

The following appears in the atlassian-jira.log:

2013-01-11 10:44:29,353 http-bio-60524-exec-12 ERROR admin 644x508x1 12ast9r /secure/attachmentzip/ [jira.web.servlet.AttachmentZipServlet] Can not create temporary zip file : / /var/atlassian/application-data/jira/data/attachments/LLAMA/LLAMA-31/10502 (No such file or directory) /var/atlassian/application-data/jira/data/attachments/LLAMA/LLAMA-31/10502 (No such file or directory)
	at Method)
	at com.atlassian.jira.issue.attachment.AttachmentZipFileCreator.toZipFile(
	at com.atlassian.jira.web.servlet.AttachmentZipServlet.createAttachmentsZipFile(


One or more of the attachments is missing from the file system. The missing attachment(s) can be identified from the stack trace in atlassian-jira.log. In the above example, this is /var/atlassian/application-data/jira/data/attachments/LLAMA/LLAMA-31/10502.


This can be resolved by either adding the attachment back on to the filesystem or deleting the reference to it within the JIRA GUI. The problematic attachment can be identified with either of the following methods:

Identifying it with the URL
  1. Access the JIRA Issue.
  2. Mouse over the attachments. The URL of the attachment will contain the ID. For example:
  3. The server.xml URL is http://optimus-prime:60524/jira524/secure/attachment/10502/server.xml which matches the ID of the missing attachment (10502).
  4. Delete the attachment using the trashcan icon.
Querying the Database
  1. Execute the below query against the database, replacing the pkey with the Issue Key of the problematic issue.

    JIRA 6.0 and below
    select, a.filename from fileattachment a join jiraissue i on = a.issueid where pkey = 'LLAMA-31';
    JIRA 6.1 and above
    select, a.filename from fileattachment a join jiraissue i on = a.issueid where = (select from project p,jiraissue j where and j.issuenum=<ISSUENUMBER> and p.pkey='<PROJECTKEY>'); 

    (info) Replace the <ISSUENUMBER> and <PROJECTKEY> with there respective values
    (warning) This SQL syntax may need to be modified depending upon the DBMS used.

  2. Identify the filename by matching it to the id. In this example, the problematic file is server.xml as it has the id 10502.

  3. Delete the attachment using the trashcan icon on the View Issue screen.

Last modified on Mar 30, 2016

Was this helpful?

Provide feedback about this article
Powered by Confluence and Scroll Viewport.