Stash Does Not Start - No fonts found
Symptoms
The Stash UI shows the following error when trying to access http://<STASH_URL>:<PORT
>. For example:
http://localhost:7990/fatal.jsp
A fatal error has occurred
The following problem occurred which prevents Atlassian Stash from starting correctly:
The Spring WebApplicationContext could not be started
In the atlassian-stash.log the following can be seen:
Caused by: java.lang.Error: Probable fatal error:No fonts found.
at sun.font.FontManager.getDefaultPhysicalFont(FontManager.java:1089) ~[na:1.6.0_24]
at sun.font.FontManager.initialiseDeferredFont(FontManager.java:961) ~[na:1.6.0_24]
at sun.font.FontManager.findOtherDeferredFont(FontManager.java:900) ~[na:1.6.0_24]
at sun.font.FontManager.findDeferredFont(FontManager.java:917) ~[na:1.6.0_24]
Cause
Stash is using OpenJDK.
Resolution
Either register installed fonts in the Java font properties and continue using OpenJDK or set JAVA_HOME
to a currently Oracle Supported version.
In order to run Stash with OpenJDK:
- To run a java command to register installed fonts in the java font properties and continue using Open JDK:cd /usr/lib/jvm/java-6-openjdk-common/jre/libsudo java -jar compilefontconfig.jar fontconfig.config fontconfig.bfc
If command complains that it couldn't find fontconfig.config.locate fontconfig.config (e.g. if it is shown to be in /etc/java-6-openjdk/fontconfig.properties)
The other file fontconfig.bfc might also be here:sudo java -jar compilefontconfig.jar /etc/java-6-openjdk/fontconfig.properties fontconfig.bfc Set your
JAVA_HOME
From
<Stash installation directory>/bin/catalina.sh
, set the right value for this variable. Below the contents of this file:# JAVA_HOME Must point at your Java Development Kit installation. # Required to run the with the "debug" argument. # # JRE_HOME Must point at your Java Runtime installation. # Defaults to JAVA_HOME if empty. If JRE_HOME and JAVA_HOME # are both set, JRE_HOME is used.