本文介绍了与 Jenkins 的无头持续集成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在 RackSpace ArchLinux 云服务器上设置 Jenkins,但我一直无法做到.

I’m trying to set up Jenkins on a RackSpace ArchLinux Cloud Server, but I’ve been unable to.

每当我尝试访问 Jenkins 站点时,都会收到此错误:

Whenever I try to access Jenkins site, I get this error:

AWT is not properly configured on this server. Perhaps you need to run your container with "-Djava.awt.headless=true"?

java.lang.NullPointerException
    at sun.awt.X11FontManager.getDefaultPlatformFont(X11FontManager.java:779)
    at sun.font.SunFontManager$2.run(SunFontManager.java:428)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.font.SunFontManager.<init>(SunFontManager.java:371)
    at sun.awt.X11FontManager.<init>(X11FontManager.java:32)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
    at java.lang.Class.newInstance0(Class.java:372)
    at java.lang.Class.newInstance(Class.java:325)
    at sun.font.FontManagerFactory$1.run(FontManagerFactory.java:80)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.font.FontManagerFactory.getInstance(FontManagerFactory.java:71)
    at java.awt.Font.getFont2D(Font.java:489)
    at java.awt.Font.getFamily(Font.java:1186)
    at java.awt.Font.getFamily_NoClientCode(Font.java:1160)
    at java.awt.Font.getFamily(Font.java:1152)
    at java.awt.Font.toString(Font.java:1649)
    at hudson.util.ChartUtil.<clinit>(ChartUtil.java:229)
    at hudson.WebAppMain.contextInitialized(WebAppMain.java:175)
    at winstone.WebAppConfiguration.<init>(WebAppConfiguration.java:897)
    at winstone.HostConfiguration.initWebApp(HostConfiguration.java:131)
    at winstone.HostConfiguration.<init>(HostConfiguration.java:73)
    at winstone.HostGroup.initHost(HostGroup.java:85)
    at winstone.HostGroup.<init>(HostGroup.java:45)
    at winstone.Launcher.<init>(Launcher.java:197)
    at winstone.Launcher.main(Launcher.java:398)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at Main._main(Main.java:268)
    at Main.main(Main.java:96)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.tanukisoftware.wrapper.WrapperJarApp.run(WrapperJarApp.java:394)
    at java.lang.Thread.run(Thread.java:722)

那么,你认为它可能是什么?

So, what do you think it might be?

我已经尝试过设置 JAVA_OPTS 环境变量,但无济于事.我还尝试使用 -Djava.awt.headless=true 执行 Java,甚至在 conf/wrapper.conf 中将其设置为 wrapper.app.parameter.3=-headless.

I’ve already tried setting JAVA_OPTS environmental variable, to no avail. I also tried executing Java with -Djava.awt.headless=true, or even setting it in conf/wrapper.conf as wrapper.app.parameter.3=-headless.

知道如何解决这个问题吗?我对这个很陌生...

Any idea how may I tackle this problem? I’m so new at this...

提前致谢!

推荐答案

终于找到解决方案.

信不信由你,其实就是安装ttf-dejavu字体的问题!

Believe it or not, it was actually just a matter of installing ttf-dejavu font!

我很惭愧...

这篇关于与 Jenkins 的无头持续集成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-25 05:31