Bitbucket Server Does Not Start - No fonts found

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

The Bitbucket Server UI shows the following error when trying to access http://<BITBUCKET_URL>:<PORT>. For example:

http://localhost:7990/fatal.jsp
  
A fatal error has occurred
 
The following problem occurred which prevents Atlassian Bitbucket Server from starting correctly:
The Spring WebApplicationContext could not be started

In the atlassian-bitbucket.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

Bitbucket Server 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 Bitbucket Server with OpenJDK:

  1.  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/lib
    sudo 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

  2. Set your JAVA_HOME

    From <Bitbucket Server 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.
Last modified on Feb 26, 2016

Was this helpful?

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