当前位置:  开发笔记 > 编程语言 > 正文

与詹金斯无头的持续整合

如何解决《与詹金斯无头的持续整合》经验,为你挑选了3个好方法。

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

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

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.(SunFontManager.java:371)
    at sun.awt.X11FontManager.(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.(ChartUtil.java:229)
    at hudson.WebAppMain.contextInitialized(WebAppMain.java:175)
    at winstone.WebAppConfiguration.(WebAppConfiguration.java:897)
    at winstone.HostConfiguration.initWebApp(HostConfiguration.java:131)
    at winstone.HostConfiguration.(HostConfiguration.java:73)
    at winstone.HostGroup.initHost(HostGroup.java:85)
    at winstone.HostGroup.(HostGroup.java:45)
    at winstone.Launcher.(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)

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

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

知道我怎么解决这个问题?我这么新......

提前致谢!



1> 小智..:

在我的fedora 17 64Bit机器上,我安装了OpenJDK 1.7并且我安装了Jenkins,它有同样的问题.设置-Djava.awt.headless = true没有帮助.

最后通过安装dejavu-sans-fonts解决了这个问题:

yum install dejavu-sans-fonts


这对我来说在CentOS上使用OpenJDK 1.7,但只有在我安装了fontconfig后才能使用.

2> Andrés Boter..:

终于找到了解决方案.

信不信由你,实际上只是安装ttf-dejavu字体的问题!

我很惭愧...



3> 小智..:

安装java-1.6.0-openjdk导致以下依赖项:

fontconfig的

libXfont

libfontenc

ttmkfdir

的xorg-X11-字体utils的

的xorg-X11的字体,类型1

在安装这些软件包并重新启动jenkis之后,一切都按设计工作.

推荐阅读
雨天是最美
这个屌丝很懒,什么也没留下!
DevBox开发工具箱 | 专业的在线开发工具网站    京公网安备 11010802040832号  |  京ICP备19059560号-6
Copyright © 1998 - 2020 DevBox.CN. All Rights Reserved devBox.cn 开发工具箱 版权所有