Confluence 6.13 or later fails with FontConfiguration error when installing on Linux OS

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

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.

*Fisheye および Crucible は除く

問題

AdoptOpenJDK をインストール済みの Linux に Confluence Server または Data Center 6.13 以降をインストールすると、次のエラーによってインストールに失敗する。 

Starting Installer ...
java.lang.NullPointerException
    at sun.awt.FontConfiguration.getVersion(FontConfiguration.java:1264)
    at sun.awt.FontConfiguration.readFontConfigFile(FontConfiguration.java:219)
    at sun.awt.FontConfiguration.init(FontConfiguration.java:107)
    at sun.awt.X11FontManager.createFontConfiguration(X11FontManager.java:774)
    at sun.font.SunFontManager$2.run(SunFontManager.java:431)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.font.SunFontManager.<init>(SunFontManager.java:376)
    at sun.awt.FcFontManager.<init>(FcFontManager.java:35)
    at sun.awt.X11FontManager.<init>(X11FontManager.java:57)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at java.lang.Class.newInstance(Class.java:442)
    at sun.font.FontManagerFactory$1.run(FontManagerFactory.java:83)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.font.FontManagerFactory.getInstance(FontManagerFactory.java:74)
    at sun.font.SunFontManager.getInstance(SunFontManager.java:250)
    at sun.font.FontDesignMetrics.getMetrics(FontDesignMetrics.java:264)
    at sun.swing.SwingUtilities2.getFontMetrics(SwingUtilities2.java:1113)
    at javax.swing.JComponent.getFontMetrics(JComponent.java:1626)
    at javax.swing.text.WrappedPlainView.updateMetrics(WrappedPlainView.java:318)
    at javax.swing.text.WrappedPlainView.updateChildren(WrappedPlainView.java:297)
    at javax.swing.text.WrappedPlainView.insertUpdate(WrappedPlainView.java:463)
    at javax.swing.plaf.basic.BasicTextUI$RootView.insertUpdate(BasicTextUI.java:1610)
    at javax.swing.plaf.basic.BasicTextUI$UpdateHandler.insertUpdate(BasicTextUI.java:1869)
    at javax.swing.text.AbstractDocument.fireInsertUpdate(AbstractDocument.java:201)
    at javax.swing.text.AbstractDocument.handleInsertString(AbstractDocument.java:748)
    at javax.swing.text.AbstractDocument.insertString(AbstractDocument.java:707)
    at javax.swing.text.PlainDocument.insertString(PlainDocument.java:130)
    at javax.swing.text.DefaultEditorKit.read(DefaultEditorKit.java:273)
    at javax.swing.JEditorPane.setText(JEditorPane.java:1416)
    at javax.swing.JEditorPane.<init>(JEditorPane.java:290)
    at com.install4j.runtime.installer.frontend.headless.AbstractHeadlessScreenExecutor.init(AbstractHeadlessScreenExecutor.java:68)
    at com.install4j.runtime.installer.frontend.headless.ConsoleScreenExecutor.<init>(ConsoleScreenExecutor.java:24)
    at com.install4j.runtime.installer.frontend.headless.InstallerConsoleScreenExecutor.<init>(InstallerConsoleScreenExecutor.java:6)
    at com.install4j.runtime.installer.Installer.getScreenExecutor(Installer.java:88)
    at com.install4j.runtime.installer.Installer.runInProcess(Installer.java:57)
    at com.install4j.runtime.installer.Installer.main(Installer.java:45)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.exe4j.runtime.LauncherEngine.launch(LauncherEngine.java:85)
    at com.install4j.runtime.launcher.UnixLauncher.main(UnixLauncher.java:62)

原因

AdoptOpenJDK does not include a font configuration package, which Confluence relies on. 

Atlassian installer has a script which will attempt to install the required font configuration package in the most common Linux distributions, however if your Linux distribution is not covered by our script, and does not include a suitable font configuration package, you will need to install one manually. 

ソリューション

To tackle this problem, a fontconfig (or an equivalent library) should be installed prior Confluence installation.  Refer to the documentation for your Linux distribution or preferred package manager for further information about how to do this.

Here are the commands to install font dependency in a number of common Linux distributions and package managers: 

Installing the below packages may need a restart of your Confluence instance

Ubuntu 

To install the fontconfig package on Ubuntu 18:

sudo apt install -y fontconfig

CentOS

CentOS 7 does not work with fontconfig . You can install dejavu-sans-fonts  as an alternative:

sudo yum install -y dejavu-sans-fonts

RHEL 

To install fontconfig on RedHat Enterprise Linux 7.5:

sudo yum install fontconfig
Later versions, including RHEL8, should also work similarly.

On RHEL 6, it might be necessary to install both the dejavu-sans-fonts  and the fontconfig  packages:

sudo yum install -y dejavu-sans-fonts

Debian 

To install the fontconfig package on Debian 9.5:

apt-get update && apt-get install -y fontconfig

Fedora

To install the fontconfig package on Fedora 28:

dnf install -y fontconfig


既知の問題

  • You can't use the Linux installer to install Confluence on OpenSUSE. You will need to install Confluence manually using the archive file. See  CONFSERVER-57895 - Getting issue details... STATUS  


最終更新日: 2023 年 10 月 12 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.