Jenkins Deployment: Awt Is Not Properly Configured on This Server. -Djava. Awt. Headless=True"?

Hi Stackoverflow friends

I've recently configured Jenkins Server into Apache Tomcat 7.0.42 The procedure that I make was deploy the jenkins.war file into tomcat servlet container.

Here I make reference some important considerations:

  • My machine is a CentOS 6.4 Server:

    [root@safe2school srv]# cat /etc/redhat-release CentOS release 6.4 (Final) [root@safe2school srv]#

  • My JDK version is JDK 1.7 UPDATE 45, this is the official Oracle JDK

    [root@safe2school srv]# java -version java version "1.7.0_45" Java(TM) SE Runtime Environment (build 1.7.0_45-b18) Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode) [root@safe2school srv]#

I've tried with the installation of dejavu-sans-fonts (yum install dejavu-sans-fonts ) and set the envoronment variable export JAVA_OPTS="$JAVA_OPTS -Djava.awt.headless=true" in the file /etc/bashrc but all these options doesn't work.

The output for this error is in the following image ():

There is some alternative that you can support me in these task?

I appreciate your help. Thanks :)

3

2 Answers

I just ran into these messages switching from OpenJDK 8 to OpenJDK 11. None of these steps helped. But make sure "fontconfig" is installed, which solved my issue!

2

Try locating the file:

 /etc/sysconfig/jenkins

and inside it, the line: JENKINS_JAVA_OPTIONS=...

Make sure it has the headless option, e.g. :

JENKINS_JAVA_OPTIONS="-Xmx2048m -XX:MaxPermSize=512m -Djava.awt.headless=true"

Otherwise, please indicate more specifically how you start your Jenkins instance.

3

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Sophia Al-Mansoor

Sophia Al-Mansoor

Global Business & E-Commerce Reporter

Sophia analyzes international trade, startup ecosystems, retail transformation, and supply chain logistics for modern digital publications.

Share this article
Twitter Facebook Pinterest