You are not logged in.

#1 2021-01-07 12:56:02

schard
Member
From: Hannover
Registered: 2016-05-06
Posts: 1,086
Website

[SOLVED] Jenkins fails to start due to NullPointerException

I am trying to setup Jenkins as per the wiki.
When I access the web-frontend, I get presented with the following error message:

AWT ist auf diesem Server nicht vollständig konfiguriert. Eventuell sollten Sie Ihren Servlet-Container mit der Option -Djava.awt.headless=true starten.

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 java.awt.Font.getFont2D(Font.java:491)
	at java.awt.Font.getFamily(Font.java:1220)
	at java.awt.Font.getFamily_NoClientCode(Font.java:1194)
	at java.awt.Font.getFamily(Font.java:1186)
	at java.awt.Font.toString(Font.java:1683)
	at hudson.util.ChartUtil.<clinit>(ChartUtil.java:260)
	at hudson.WebAppMain.contextInitialized(WebAppMain.java:248)
	at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:1068)
	at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:572)
	at org.eclipse.jetty.server.handler.ContextHandler.contextInitialized(ContextHandler.java:997)
	at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:746)
	at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:379)
	at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1457)
	at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1422)
	at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:911)
	at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:288)
	at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:524)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
	at org.eclipse.jetty.server.Server.start(Server.java:423)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:110)
	at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97)
	at org.eclipse.jetty.server.Server.doStart(Server.java:387)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73)
	at winstone.Launcher.<init>(Launcher.java:192)
	at winstone.Launcher.main(Launcher.java:369)
	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 Main._main(Main.java:375)
	at Main.main(Main.java:151)

Googling for this error yielded several issues that suggest installing ttf-dejavu fixes this issue.
But it is installed:

$ pacman -Q
acl 2.2.53-3
adobe-source-code-pro-fonts 2.032ro+1.052it+1.012var-1
apache 2.4.46-3
apr 1.7.0-3
apr-util 1.6.1-8
arch-install-scripts 23-2
archlinux-keyring 20201210-1
argon2 20190702-3
asp 6-2
attr 2.4.48-3
audit 2.8.5-9
avahi 0.8+15+ge8a3dd0-3
bash 5.1.004-1
bash-completion 2.11-1
bind 9.16.10-1
binutils 2.35.1-1
boost-libs 1.75.0-2
breezy 3.1.0.8-1
brotli 1.0.9-4
btrfs-progs 5.9-3
bzip2 1.0.8-4
ca-certificates 20181109-4
ca-certificates-mozilla 3.60-1
ca-certificates-utils 20181109-4
cantarell-fonts 1:0.301-1
ceph-libs 15.2.6-4
certbot 1.11.0-1
certbot-nginx 1.11.0-1
cifs-utils 6.11-3
clamav 0.103.0-1
confuse 3.3-3
coreutils 8.32-1
cryptsetup 2.3.4-1
curl 7.74.0-1
db 5.3.28-5
dbus 1.12.20-1
dconf 0.38.0-1
device-mapper 2.02.187-3
devtools 20200407-1
diffutils 3.7-3
dmraid 1.0.0.rc16.3-12
dnssec-anchors 20190629-3
dos2unix 7.4.2-1
dosfstools 4.1-3
e2fsprogs 1.45.6-3
efibootmgr 17-2
efivar 37-4
elfutils 0.182-1
expat 2.2.10-2
fakeroot 1.25.3-1
file 5.39-1
filesystem 2020.09.03-1
findutils 4.7.0-2
flake8 1:3.8.4-3
flashrom 1.2-2
fortune-mod 2.12.0-1
freetype2 2.10.4-1
fwupd 1.5.4-1
gawk 5.1.0-1
gcab 1.4-1
gcc-libs 10.2.0-4
gdbm 1.19-1
geoip 1.6.12-2
geoip-database 20201222-1
gettext 0.21-1
ghc-libs 8.10.3-1
git 2.30.0-1
glib-networking 2.66.0-1
glib2 2.66.4-1
glibc 2.32-5
gmp 6.2.1-1
gnupg 2.2.25-1
gnutls 3.7.0-1
gobject-introspection-runtime 1.66.1-3
gpgme 1.15.0-2
gpm 1.20.7.r38.ge82d1a6-3
gptfdisk 1.0.5-1
graphite 1:1.3.14-1
grep 3.6-1
groff 1.22.4-3
gsettings-desktop-schemas 3.38.0-1
gzip 1.10-3
harfbuzz 2.7.4-1
haskell-aeson 1.5.5.1-1
haskell-assoc 1.0.2-41
haskell-attoparsec 0.13.2.4-50
haskell-base-compat 0.11.2-3
haskell-base-compat-batteries 0.11.2-37
haskell-base-orphans 0.8.4-27
haskell-bifunctors 5.5.8-49
haskell-comonad 5.0.8-4
haskell-data-fix 0.3.0-41
haskell-diff 0.4.0-8
haskell-distributive 0.6.2.1-5
haskell-dlist 1.0-37
haskell-erf 2.0.0.0-20
haskell-hashable 1.3.0.0-63
haskell-indexed-traversable 0.1.1-2
haskell-integer-logarithms 1.0.3.1-2
haskell-primitive 0.7.1.0-56
haskell-quickcheck 2.14.2-53
haskell-random 1.2.0-98
haskell-regex-base 0.94.0.0-7
haskell-regex-tdfa 1.3.1.0-7
haskell-scientific 0.3.6.2-67
haskell-splitmix 0.1.0.3-32
haskell-strict 0.4.0.1-15
haskell-tagged 0.8.6.1-1
haskell-th-abstraction 0.4.2.0-1
haskell-these 1.1.1.1-42
haskell-time-compat 1.9.5-15
haskell-transformers-compat 0.6.6-2
haskell-unordered-containers 0.2.13.0-25
haskell-uuid-types 1.0.3-72
haskell-vector 0.12.1.2-96
haveged 1.9.14-1
hicolor-icon-theme 0.17-2
hwids 20200813.1-1
hwinfo 21.71-1
iana-etc 20201229-1
icu 68.2-1
inetutils 1.9.4-8
iniparser 4.1-3
intel-ucode 20201118-1
iproute2 5.10.0-2
iptables 1:1.8.6-1
iputils 20200821-1
jansson 2.13.1-1
java-runtime-common 3-3
jenkins 2.274-1
jq 1.6-4
jre-openjdk-headless 14.0.2.u12-1
jre8-openjdk 8.u265-1
jre8-openjdk-headless 8.u265-1
js78 78.6.0-1
json-c 0.15-1
json-glib 1.6.0-1
kbd 2.3.0-2
keyutils 1.6.3-1
kmod 27-2
krb5 1.18.2-1
lcms2 2.11-2
ldb 1:2.2.0-3
ldns 1.7.1-2
less 563-1
lib32-gcc-libs 10.2.0-4
lib32-glibc 2.32-5
libaio 0.3.112-2
libarchive 3.5.1-1
libassuan 2.5.4-1
libatasmart 0.19-5
libblockdev 2.24-3
libbsd 0.10.0-2
libbytesize 2.4-3
libcap 2.45-2
libcap-ng 0.8.2-1
libconfig 1.7.2-3
libcroco 0.6.13-2
libcups 1:2.3.3op1-1
libdaemon 0.14-5
libedit 20191231_3.1-2
libelf 0.182-1
libffi 3.3-4
libftdi 1.5-1
libgcrypt 1.8.7-1
libgpg-error 1.41-1
libgudev 234-1
libgusb 0.3.5-1
libice 1.0.10-3
libidn2 2.3.0-1
libimobiledevice 1.3.0-3
libjcat 0.1.4-1
libjpeg-turbo 2.0.6-1
libksba 1.4.0-2
libldap 2.4.56-1
libmaxminddb 1.5.0-1
libmbim 1.24.4-1
libmicrohttpd 0.9.72-1
libmm-glib 1.14.8-1
libmnl 1.0.4-3
libmspack 1:0.10.1alpha-3
libnet 1:1.1.6-1
libnetfilter_conntrack 1.0.8-1
libnfnetlink 1.0.1-4
libnftnl 1.1.8-1
libnghttp2 1.41.0-1
libnl 3.5.0-2
libnsl 1.3.0-1
libp11-kit 0.23.22-1
libpcap 1.9.1-4
libpipeline 1.5.3-1
libplist 2.2.0-3
libpng 1.6.37-3
libproxy 0.4.17-1
libpsl 0.21.1-1
libqmi 1.26.6-1
libsasl 2.1.27-3
libseccomp 2.5.1-2
libsecret 0.20.4-1
libsm 1.2.3-2
libsmbios 2.4.3-3
libsoup 2.72.0+5+g0b094bff-3
libssh2 1.9.0-2
libstemmer 0+713-2
libtasn1 4.16.0-1
libtiff 4.1.0-2
libtirpc 1.3.1-1
libtool 2.4.6+42+gb88cebd5-14
libunistring 0.9.10-3
liburing 0.7-2
libusb 1.0.23-3
libusb-compat 0.1.7-1
libusbmuxd 2.0.2-1
libutf8proc 2.6.1-1
libuv 1.40.0-1
libx11 1.7.0-2
libx86emu 3.1-1
libxau 1.0.9-3
libxcb 1.14-1
libxcrypt 4.4.17-1
libxdmcp 1.1.3-3
libxext 1.3.4-3
libxml2 2.9.10-8
libxmlb 0.2.1-1
libxmu 1.1.3-2
libxslt 1.1.34-5
libxt 1.2.0-2
libyaml 0.2.5-1
licenses 20200427-1
linux 5.10.4.arch2-1
linux-api-headers 5.8-1
linux-firmware 20201218.646f159-1
lm_sensors 3.6.0-2
lmdb 0.9.27-1
lsof 4.94.0-1
lua 5.4.2-1
lua53 5.3.6-1
lvm2 2.02.187-3
lz4 1:1.9.3-1
lzo 2.10-3
mailcap 2.1.49-1
man-db 2.9.3-1
mbedtls 2.25.0-1
mdadm 4.1-2
mercurial 5.6.1-1
mkinitcpio 29-1
mkinitcpio-busybox 1.32.1-1
mobile-broadband-provider-info 20201225-1
modemmanager 1.14.8-1
mollyguardctl 1.3.4-2
mpfr 4.1.0-1
ncrack 0.7-2
ncurses 6.2-1
ndctl 71.1-1
nettle 3.7-1
nftables 1:0.9.7-3
nginx 1.18.0-2
nmap 7.91-1
npth 1.6-2
nspr 4.29-1
nss 3.60-1
oath-toolkit 2.6.5-1
oniguruma 6.9.6-1
openbsd-netcat 1.217_2-1
openssh 8.4p1-2
openssl 1.1.1.i-2
p11-kit 0.23.22-1
pacman 5.2.2-1
pacman-contrib 1.4.0-1
pacman-mirrorlist 20201205-1
pam 1.5.0-2
pambase 20200721.1-2
parted 3.3-2
pciutils 3.7.0-1
pcre 8.44-1
pcre2 10.36-1
perl 5.32.0-3
perl-clone 0.45-2
perl-encode-locale 1.05-7
perl-error 0.17029-2
perl-file-listing 6.14-1
perl-html-parser 3.75-1
perl-html-tagset 3.20-10
perl-http-cookies 6.10-1
perl-http-daemon 6.06-2
perl-http-date 6.05-3
perl-http-message 6.27-1
perl-http-negotiate 6.01-8
perl-io-html 1.004-1
perl-libwww 6.51-1
perl-lwp-mediatypes 6.02-8
perl-mailtools 2.21-4
perl-net-http 6.19-4
perl-parse-yapp 1.21-3
perl-timedate 2.33-2
perl-try-tiny 0.30-5
perl-uri 5.05-1
perl-www-robotrules 6.02-8
perl-xml-parser 2.46-2
perl-xml-writer 0.625-6
pinentry 1.1.0-5
polkit 0.118-1
popt 1.18-1
ppp 2.4.7-7
procps-ng 3.3.16-2
protobuf 3.12.4-3
protobuf-c 1.3.3-2
psmisc 23.3-4
pwgen 2.08-2
python 3.9.1-1
python-acme 1.11.0-1
python-appdirs 1.4.4-3
python-asn1crypto 1.4.0-3
python-astroid 2.4.2-4
python-cachecontrol 0.12.6-3
python-certifi 2020.6.20-3
python-cffi 1.14.4-1
python-chardet 3.0.4-7
python-colorama 0.4.4-3
python-configargparse 1.2.3-3
python-configobj 5.0.6.r110.g3e2f4cc-1
python-contextlib2 0.6.0.post1-3
python-cryptography 3.3.1-1
python-ddnss 1.0.4-1
python-distlib 0.3.1-2
python-distro 1.5.0-3
python-dulwich 0.20.15-1
python-entrypoints 0.3-5
python-fastimport 0.9.8-3
python-future 0.18.2-5
python-html5lib 1.1-5
python-idna 2.10-3
python-isort 5.7.0-1
python-josepy 1.5.0-3
python-lazy-object-proxy 1.5.2-2
python-lockfile 0.12.2-8
python-mccabe 0.6.1-7
python-mcipc 2.3.0-1
python-mock 3.0.5-5
python-msgpack 1.0.2-2
python-ordered-set 4.0.2-3
python-packaging 20.8-2
python-parsedatetime 2.6-3
python-patiencediff 0.2.1-3
python-pbr 5.5.1-3
python-pep517 0.9.1-3
python-pip 20.2.4-1
python-ply 3.11-7
python-progress 1.5-5
python-pycodestyle 2.6.0-3
python-pycparser 2.20-3
python-pyflakes 2.2.0-3
python-pylint 2.6.0-3
python-pyopenssl 20.0.1-1
python-pyparsing 2.4.7-3
python-pyrfc3339 1.1-7
python-pytz 2020.5-1
python-rcon 1.2.2-1
python-requests 2.25.1-1
python-requests-toolbelt 0.9.1-5
python-resolvelib 0.5.4-1
python-retrying 1.3.3-9
python-setuptools 1:51.1.1-1
python-six 1.15.0-3
python-toml 0.10.2-3
python-urllib3 1.26.1-1
python-webencodings 0.5.1-6
python-wrapt 1.12.1-4
python-zope-component 4.6.2-3
python-zope-deferredimport 4.3.1-6
python-zope-deprecation 4.4.0-5
python-zope-event 4.5.0-3
python-zope-hookable 5.0.1-3
python-zope-interface 5.2.0-3
python-zope-proxy 4.3.5-3
python2 2.7.18-2
quota-tools 1:4.06-1
readline 8.1.0-2
recode 3.7.8-1
reiserfsprogs 3.6.27-3
repotool 1.2.7-2
rsync 3.2.3-3
samba 4.13.3-2
sed 4.8-1
serf 1.3.9-5
shadow 4.8.1-4
shared-mime-info 2.0+57+gc1d1c70-1
shellcheck 0.7.1-235
sl 5.02-6
smartmontools 7.2-1
smbclient 4.13.3-2
snappy 1.1.8-2
speculum 1.6.8-1
speedtest-cli 2.1.2-3
sqlite 3.34.0-1
steamcmd latest-3
subversion 1.14.0-4
sudo 1.9.4.p2-2
systemd 247.2-1
systemd-libs 247.2-1
talloc 2.3.1-5
tar 1.32-3
tdb 1.4.3-4
tevent 1:0.10.2-3
thin-provisioning-tools 0.9.0-1
tpm2-tss 3.0.3-1
traceroute 2.1.0-5
ttf-dejavu 2.37+18+g9b5d1b2f-2
tzdata 2020f-1
udisks2 2.9.1-1
umurmur 0.2.17-19
unzip 6.0-14
upower 0.99.11-3
usbmuxd 1.1.1-1
usbutils 013-1
util-linux 2.36.1-4
util-linux-libs 2.36.1-4
vim 8.2.1989-3
vim-runtime 8.2.1989-3
volume_key 0.3.12-5
wget 1.20.3-3
which 2.21-5
wireguard-tools 1.0.20200827-1
xcb-proto 1.14.1-3
xdg-utils 1.1.3+19+g9816ebb-1
xfsprogs 5.8.0-2
xmlsec 1.2.31-1
xorg-xprop 1.2.5-1
xorg-xset 1.2.4-2
xorgproto 2020.1-1
xxhash 0.8.0-1
xz 5.2.5-1
zip 3.0-9
zlib 1:1.2.11-4
zstd 1.4.5-1

I also tried to inject the suggested parameter into Jenkin's config file:

$ cat /etc/conf.d/jenkins 
JAVA=/usr/lib/jvm/java-8-openjdk/jre/bin/java
JAVA_ARGS=-Xmx512m
JAVA_OPTS=-Djava.awt.headless=true
JENKINS_USER=jenkins
JENKINS_HOME=/var/lib/jenkins
JENKINS_WAR=/usr/share/java/jenkins/jenkins.war
JENKINS_WEBROOT=--webroot=/var/cache/jenkins
JENKINS_PORT=--httpPort=8090
JENKINS_AJPPORT=--ajp13Port=-1
JENKINS_OPTS=-Djava.awt.headless=true
JENKINS_COMMAND_LINE="$JAVA $JAVA_ARGS $JAVA_OPTS -jar $JENKINS_WAR $JENKINS_WEBROOT $JENKINS_PORT $JENKINS_AJPPORT $JENKINS_OPTS"

# vim:set ts=2 sw=2 et:

I tried it with both, as JAVA_ARGS and JENKINS_OPTS as well as with only one of those set.
However, after a restart, these params don't seem to have an effect on the error message.
Did anybody else encounter this and has found a solution?

Solution
Yet again, I was too impatient.
Installing fontconfig fixed the issue.

Last edited by schard (2021-01-07 13:03:04)

Offline

Board footer

Powered by FluxBB