Hello,
After upgrading to Confluence 8.3.1 the font health-check is failing:
What does this check do?
Check if system fonts are available. Adopt Open JDK does not include font configuration packages, which Confluence relies on.
Result
System fonts are not available. Please make sure correct font packages are installed.
OS: RHEL 8
In the logs I see a lot of the below errors:
2023-06-29 10:12:03,492 WARN [HealthCheck:thread-4] [troubleshooting.healthcheck.concurrent.SupportHealthCheckProcess] lambda$getCompletedStatuses$0 Health check 'Fonts' failed with severity 'warning': 'System fonts are not available. Please make sure correct font packages are installed.'
2023-06-29 10:12:03,755 WARN [http-nio-8090-exec-3] [troubleshooting.healthcheck.concurrent.SupportHealthCheckProcess] lambda$getCompletedStatuses$0 Health check 'Fonts' failed with severity 'warning': 'System fonts are not available. Please make sure correct font packages are installed.'
I've checked that the OS font-packages are installed as per https://confluence.atlassian.com/confkb/confluence-server-6-13-or-later-fails-with-fontconfiguration-error-when-installing-on-linux-operating-systems-960167204.html and another link that I can't find at the moment:
rpm -qa | egrep "freetype|fontconfig|dejavu"
dejavu-sans-mono-fonts-2.35-7.el8.noarch
dejavu-serif-fonts-2.35-7.el8.noarch
fontconfig-2.13.1-4.el8.x86_64
freetype-2.9.1-9.el8.x86_64
dejavu-sans-fonts-2.35-7.el8.noarch
dejavu-fonts-common-2.35-7.el8.noarch
My guess is that it have something to do with with the bundled JRE being updated to Java 17 but I am not certain.
Java Runtime Environment
Operating System: Linux 4.18.0-477.13.1.el8_8.x86_64OS Architecture: amd64Application Server: Apache Tomcat/9.0.73Servlet Version: 4.0Java Version: 17.0.6Java Vendor: Eclipse AdoptiumJVM Version: 17JVM Vendor: Oracle CorporationJVM Implementation Version: 17.0.6+10Java Runtime: OpenJDK Runtime EnvironmentJava VM: OpenJDK 64-Bit Server VMJava Runtime Arguments--add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED -Djava.util.logging.config.file=/opt/atlassian/confluence/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -Datlassian.plugins.startup.options= -Dorg.apache.tomcat.websocket.DEFAULT_BUFFER_SIZE=32768 -Dconfluence.context.path=/docs -Djava.locale.providers=JRE,SPI,CLDR -Dsynchrony.enable.xhr.fallback=true -Datlassian.plugins.enable.wait=300 -Djava.awt.headless=true -Xloggc:/opt/atlassian/confluence/logs/gc-2023-06-21_07-32-17.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=2M -Xlog:gc+age=debug:file=/opt/atlassian/confluence/logs/gc-2023-06-21_07-32-17.log::filecount=5,filesize=2M -XX:G1ReservePercent=20 -XX:+UseG1GC -XX:+ExplicitGCInvokesConcurrent -XX:+PrintGCDateStamps -XX:+IgnoreUnrecognizedVMOptions -XX:ReservedCodeCacheSize=256m -Xms4096m -Xmx4096m -Dignore.endorsed.dirs= -Dcatalina.base=/opt/atlassian/confluence -Dcatalina.home=/opt/atlassian/confluence -Djava.io.tmpdir=/opt/atlassian/confluence/temp
Have anyone seen this before or know what to look for?
This issue was solved. As I suspected the update to Java 17 was the culprit, or rather some missing new config-directives in confluence/bin/setenv.sh that I didn't check for. Specifically this part:
# Add various JPMS arguments to allow Confluence to work on Java 17
CATALINA_OPTS="@$CATALINA_HOME/confluence/WEB-INF/jpms-args.txt ${CATALINA_OPTS}"
In jpms-args.txt referenced above one of the directives concern fonts.
I don't understand, what did you do to fix this? I am preparing to upgrade sometime this week and our staging instance has this exact error.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Sorry for the late reply (vacation-time). To clarify, typically when updating Confluence I will just backup the file confluence/bin/setenv.sh beforehand and copy it back, overwriting the file that ships with the update, before starting Confluence again. Version 8.3.1 ships with an extra option in the new setenv.sh file that is required with Java 17 that comes bundled.
So the solution for me was:
I hope that made it clearer.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
We had the same experience after upgrading Confluence from 7.13.7 to 8.5.2.
We started getting the Font Health Check failure and the solution was found here:
Fonts health check failed in Confluence 8 with Java 17
We had to configure the Windows Service with this command:
tomcat9w //ES//<SERVICENAME>
as described in this article:
Configuring System Properties
We added all the mentioned entries in the Java 9 Options section under the Java tab:
Hope it helps...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.