attachments returning a 404 error

Good evening,

I am having an issue with attachments all of a sudden yeilding a 404 error when someone tries to download them. Looking at the attachment dirctory most of the issues in question to not a folder created, though the link is present when viewing the issue in the UI. This doesn't appear to be a universal issue, as some of the attachments are working correctly. I did run a retoriation of data earlier today, but these issues had been created prior to the back up being taken, and its my understandng that the automated back up process doesn't have an impact on the attachments. Any one have any ideas?

Thanks

3 answers

1 accepted

So there you go Andrew. Your files do not exist in the attachments folder. So when you try to access them you are returned a 404 error.

Did you perform a migration recently? Did you change the location of your jira-home directory? Did you perform a re-install and choose a new location for the jira-home directory?

jira-home directories are not backed up when you backup JIRA using JIRA's xml backup utility. You need to backup your data directories externally.

Refer https://confluence.atlassian.com/display/JIRA/Backing+Up+Data#BackingUpData-2.Backingupthedatadirectory

Hope you do have a backup of your jira-home directory to a point at which you had all the attachments. If you did do a re-install and change the location of your jira-home directory, and you still haven't deleted the old location, you should still be able to copy all the files from the old attachements directory to the new location.

Here is another scenario. You restored from a backup which was taken last week. And in the past 5 days users have deleted the attachments which you are now trying to access.

Ok, We haven't changed anything in regards to the layout. I did run a restore recently. It seems odd to me that it would create the record for the link but not the actual file location in the home directory.

I'm not sure why you expect "a restore" to include any attachments - all the documentation I can find is very clear that the xml export does not include the physical attachments.

I never said that I had that expectation, I was merely including the fact that a restore for a back up had been run/ The backup was from a few hours earlier in the day, and none of the attachements had been removed by users. We are still beta testing the application, so its not a major loss, just something to pay attention to I guess.

Hi Andrew,

Can you check if the files that are returning a 404 error exist in your jira-home directory? Are you saying some of them actually work and some don't?

Back-up tasks do not backup your attachment folders in your jira-home directory.

Can you please clarify your statement you made

"Looking at the attachment dirctory most of the issues in question to not a folder created, though the link is present when viewing the issue in the UI. "

Hi, Thanks for the response.

Yes, some of them do work, most don't.

looking in /var/atlassian/application-data/jira/data/attachments, I see folders for each of our projects, under that I have folders for the various tickets, most of the tickets with attachements do not have folders here, and I do not see any random file either(sorry , I should have read my earler statement before posting). I do see folders, and files for those issues whose attachements do work.

Thanks again.

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,310 views 14 20
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot