Folders missing execute permission causing Jira Server startup and class loading error

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform Notice: Server and Data Center Only - This article only applies to Atlassian products on the server and data center platforms.

Problem

Folders missing execute permission causes class loading errors in Jira. Execute permission allows operating system user to enter the directory and access to any of its files. When the permission does not exist, Jira can throw exceptions in Tomcat logs while starting like the following example. This exception will also fail Jira to write any log4j logs.

08-Jul-2021 18:13:34.682 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.5.57
log4j:ERROR Could not instantiate class [com.atlassian.jira.logging.JiraHomeAppender].
java.lang.ClassNotFoundException: com.atlassian.jira.logging.JiraHomeAppender
	at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:419)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:352)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:264)
	at org.apache.log4j.helpers.Loader.loadClass(Loader.java:188)
	at org.apache.log4j.helpers.OptionConverter.instantiateByClassName(OptionConverter.java:327)
	at org.apache.log4j.helpers.OptionConverter.instantiateByKey(OptionConverter.java:124)
	at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:785)
	at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:768)
	at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:648)
	at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:514)
	at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:580)
	at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:526)
	at org.apache.log4j.LogManager.<clinit>(LogManager.java:127)
	at org.apache.log4j.Logger.getLogger(Logger.java:104)
	at com.atlassian.logging.log4j.juli.JuliToLog4jHandler.publish(JuliToLog4jHandler.java:51)
	at java.util.logging.Logger.log(Logger.java:738)
	at java.util.logging.Logger.doLog(Logger.java:765)
	at java.util.logging.Logger.logp(Logger.java:931)
	at org.apache.juli.logging.DirectJDKLog.log(DirectJDKLog.java:173)
	at org.apache.juli.logging.DirectJDKLog.info(DirectJDKLog.java:116)
	at org.apache.jasper.servlet.TldScanner.scanJars(TldScanner.java:264)
	at org.apache.jasper.servlet.TldScanner.scan(TldScanner.java:104)
	at org.apache.jasper.servlet.JasperInitializer.onStartup(JasperInitializer.java:101)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5144)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1412)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1402)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
log4j:ERROR Could not instantiate appender named "filelog".
log4j:ERROR Could not instantiate class [com.atlassian.jira.logging.JiraHomeAppender].

If the execute permission on directories removed while Jira was already started, warnings may occur in atlassian-jira.log files.

Unable to run plugin code because of 'org.apache.velocity.exception.VelocityException - Could not find template 'jira.footer:standard-footer/templates/plugins/footer/license-link.vm' ensure it is in the classpath.'.


Diagnosis

In order to quickly identify folders that does not have execute permissions at owner level, execute the following commands.

find <Installation-Directory> -type d -not -perm /100
find <Home-Directory> -type d -not -perm /100


Cause

Any action that would change permission of files/directories like chmod command might cause this issue. 

Solution

Execute the following command on folders with permission problem.

chmod -R u=rwx,g=rx,o=rx /path/to/folder

Last modified on Jul 15, 2021

Was this helpful?

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