Bitbucket Server Does Not Start - No fonts found

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Symptoms

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

1 2 3 4 5 6 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:

1 2 3 4 5 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/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

  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:

    1 2 3 4 5 6 # 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.
Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.