Actions in Jira server fails with FileNotFoundException in the Jira logs
Symptoms
When attempting certain actions within a JIRA application, it will fail within a FileNotFoundException in the Jira logs.
Additionally, it might be impossible to perform any search Jira, and the following error will be thrown in the Jira UI from the search page:
An unknown error occurred while trying to perform a search
The following appears in the atlassian-jira.log;
this example was generated when attempting to delete a work log:
2012-08-02 19:08:02,012 http-7777-3 ERROR [500ErrorPage.jsp] Exception caught in 500 page /opt/atlassian/jira/work/Catalina/localhost/_/org/apache/jsp/secure/views/issue/deleteworklog_jsp.java (Permission denied)
java.io.FileNotFoundException: /opt/atlassian/jira/work/Catalina/localhost/_/org/apache/jsp/secure/views/issue/deleteworklog_jsp.java (Permission denied)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(Unknown Source)
at java.io.FileOutputStream.<init>(Unknown Source)
at org.apache.jasper.compiler.Compiler.setupContextWriter(Compiler.java:291)
at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:230)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:347)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:327)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:314)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:592)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:326)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
Cause
JIRA applications don't have the appropriate read/write permissions to the directory or file specified in the exception. This is commonly caused by starting JIRA applications with a different user than is not the same as the one who installed the application, such as root
(the default user installed on in Linux is jira
). Running it as a different user can modify the permissions of certain directories and files that JIRA applications requires access to run.
Resolution
Stop your JIRA application.
Fix the permissions for the below directories and all of their subdirectories:
$JIRA_HOME/ $JIRA_INSTALL/logs $JIRA_INSTALL/temp $JIRA_INSTALL/work
If you're using JIRA applications Data Center, ensure that every node has access to the shared home directory.
- Start JIRA application.