java.io.FileNotFoundException: \JIRA\data\avatars

Phil Wade August 30, 2018

java.io.FileNotFoundException: C:\Program Files\Atlassian\Application Data\JIRA\data\avatars\

I've set up Jira to run through a reverse proxy using IIS, and applied SLL, following: https://confluence.atlassian.com/kb/proxying-atlassian-server-applications-with-microsoft-internet-information-services-iis-833931378.html

(I also have Confluence on the same server, and it has a problem displaying pages. Icons are fine)

In Jira, icons for issue types are not showing.

2018-08-31_11-13-22.jpg

error log:

2018-08-30 08:09:32,090 http-nio-8080-exec-34 ERROR [o.a.c.c.C.[.[localhost].[/].[viewUniversalAvatarServlet]] Servlet.service() for servlet [viewUniversalAvatarServlet] in context with path [] threw exception
java.io.FileNotFoundException: C:\Program Files\Atlassian\Application Data\JIRA\data\avatars\10512_xsmall_ecbf9dac-6ba1-4e0f-a6a7-2ddb8b23acac.png (The system cannot find the path specified)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
at com.atlassian.jira.avatar.AvatarManagerImpl.getAvatarInputStream(AvatarManagerImpl.java:392)
at com.atlassian.jira.avatar.AvatarManagerImpl.lambda$processAvatarData$0(AvatarManagerImpl.java:367)
at com.atlassian.jira.avatar.OriginalAvatarFormatPolicy.getData(OriginalAvatarFormatPolicy.java:22)
at com.atlassian.jira.avatar.AvatarManagerImpl.processAvatarData(AvatarManagerImpl.java:365)
at com.atlassian.jira.avatar.AvatarManagerImpl.readAvatarData(AvatarManagerImpl.java:473)
at com.atlassian.jira.web.servlet.AvatarToStream.sendAvatar(AvatarToStream.java:29)
at com.atlassian.jira.web.servlet.ViewUniversalAvatarServletImpl.doGet(ViewUniversalAvatarServletImpl.java:42)
at com.atlassian.jira.web.servlet.ViewUniversalAvatarServlet.doGet(ViewUniversalAvatarServlet.java:20)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:635)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
... 44 filtered
at com.atlassian.servicedesk.internal.web.ExternalCustomerLockoutFilter.doFilter(ExternalCustomerLockoutFilter.java:56)
... 4 filtered
at com.atlassian.greenhopper.jira.filters.ClassicBoardRouter.doFilter(ClassicBoardRouter.java:62)
... 12 filtered
at com.atlassian.web.servlet.plugin.request.RedirectInterceptingFilter.doFilter(RedirectInterceptingFilter.java:21)
... 58 filtered
at com.atlassian.jira.security.JiraSecurityFilter.lambda$doFilter$0(JiraSecurityFilter.java:66)
... 1 filtered
at com.atlassian.jira.security.JiraSecurityFilter.doFilter(JiraSecurityFilter.java:64)
... 32 filtered
at com.atlassian.jira.servermetrics.CorrelationIdPopulatorFilter.doFilter(CorrelationIdPopulatorFilter.java:30)
... 5 filtered
at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.lambda$invokeFilterChain$0(CustomerContextSettingFilter.java:181)
at com.atlassian.servicedesk.internal.api.util.context.ReentrantThreadLocalBasedCodeContext.rteInvoke(ReentrantThreadLocalBasedCodeContext.java:137)
at com.atlassian.servicedesk.internal.api.util.context.ReentrantThreadLocalBasedCodeContext.runOutOfContext(ReentrantThreadLocalBasedCodeContext.java:90)
at com.atlassian.servicedesk.internal.utils.context.CustomerContextServiceImpl.runOutOfCustomerContext(CustomerContextServiceImpl.java:47)
at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.outOfCustomerContext(CustomerContextSettingFilter.java:174)
at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.doFilterImpl(CustomerContextSettingFilter.java:130)
at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.doFilter(CustomerContextSettingFilter.java:121)
... 4 filtered
at com.atlassian.jwt.internal.servlet.JwtAuthFilter.doFilter(JwtAuthFilter.java:32)
... 8 filtered
at com.atlassian.web.servlet.plugin.request.RedirectInterceptingFilter.doFilter(RedirectInterceptingFilter.java:21)
... 4 filtered
at com.atlassian.web.servlet.plugin.LocationCleanerFilter.doFilter(LocationCleanerFilter.java:36)
... 26 filtered
at com.atlassian.jira.servermetrics.MetricsCollectorFilter.doFilter(MetricsCollectorFilter.java:25)
... 24 filtered
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)

1 answer

1 accepted

0 votes
Answer accepted
Bastian Stehmann
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 30, 2018

Hi @Phil Wade,

welcome to this community.

Did you already check, if the path, where Jira is looking for the file (C:\Program Files\Atlassian\Application Data\JIRA\data\avatars\) , is correct and accessible?

Phil Wade August 30, 2018

Thanks for looking it to this Bastian. The folder doesn't exist

Bastian Stehmann
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 30, 2018

But you did choose "C:\Program Files\Atlassian\Application Data" as your Application Home? Is the complete home-folder missing or only the avatars folder?

Phil Wade August 30, 2018

Other folders and files are there2018-08-31_12-52-45.jpg

Bastian Stehmann
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 30, 2018

Hmm, that's weird. Usually the avatars folder is created with all other folders.

Was this a new clean install or did you migrate data from another instance?

Phil Wade August 30, 2018

I installed Jira, and later restored a backup from Jira Software+Jira Service Desk Cloud.

Bastian Stehmann
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 30, 2018

Ok, I think that will be the problem. 

You should have the avatars folder withing your cloud backup.

As Andrew wrote here (https://community.atlassian.com/t5/Jira-questions/Missing-avatars-and-attachment-issues-when-migrating-from-Cloud/qaq-p/670422), the folder should be there before restoring the backup, but as you already did the restore, I think you can try to add the folder and test if it works. If yes, it's fine, if not, I think you will have to restore the backup once again.

Phil Wade August 30, 2018

I extracted the backup zip, and copied the folders into

"C:\Program Files\Atlassian\Application Data\JIRA\data\attachments"
"C:\Program Files\Atlassian\Application Data\JIRA\data\avatars"

I saw attachments was missing the backed up data, so copies that too.

Some avatars work, however, "bug" and "new feature" do not.

Bastian Stehmann
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 30, 2018

Hmm, I suggest to do the restore of the backup again with all that data in place if that is possible, but maybe @Andy Heinzer has another idea.

Phil Wade August 31, 2018

Also, images like this

"C:\Program Files\Atlassian\Application Data\JIRA\data\attachments\SUP\10000\SUP-134\10503"

Are not showing in the Jira Service desk portal, where the web page is looking for: https://support.mycompany.com/servicedesk/customershim/secure/attachment/10503/10503_image-2018-08-31-10-31-13-227.png?fromIssue=10201

Phil Wade September 2, 2018

It was easy to pick new images for the service desk, Project settings > Request types

Suggest an answer

Log in or Sign up to answer