"Java.lang.InternalError: Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable" in jenkins.

0 votes

Hi Guys,

I am getting this below error, when I am trying to build one job in jenkins.

 java.lang.InternalError: Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable.
	at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)

	at sun.awt.X11GraphicsEnvironment.access$100(X11GraphicsEnvironment.java:52)
	at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:155)
	at java.security.AccessController.doPrivileged(Native Method)

	at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:131)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:169)
	at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:68)

	at org.lobobrowser.util.gui.FontFactory.<init>(FontFactory.java:50)
	at org.lobobrowser.util.gui.FontFactory.<clinit>(FontFactory.java:41)
	at org.lobobrowser.html.style.StyleSheetRenderState.<clinit>(StyleSheetRenderState.java:39)

	at org.lobobrowser.html.domimpl.NodeImpl.<clinit>(NodeImpl.java:39)
	at org.lobobrowser.html.parser.DocumentBuilderImpl.createDocument(DocumentBuilderImpl.java:143)
	at org.lobobrowser.html.parser.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:97)

How can I solve this error.

Thank You

 

Apr 3 in Jenkins by akhtar
• 10,580 points
152 views

1 answer to this question.

0 votes

Hi@akhtar,

I guess you are trying to use your screen for GUI program. But jenkins not able to run your GUI program.

To use that you have to export your display first.

export DISPLAY=:1

Thank You

answered Apr 3 by MD
• 22,970 points

Related Questions In Jenkins

0 votes
1 answer

How do I pass value from my Fake # script to the host build server (Jenkins)

You can use the EnvInject plugin to pass environment ...READ MORE

answered Jul 11, 2018 in Jenkins by Kalgi
• 2,620 points
216 views
0 votes
3 answers

How to get the Maven Version of a project in Jenkins?

Here is a snippet from our Jenkins ...READ MORE

answered Oct 4, 2019 in Jenkins by Petr Doležal
5,534 views
0 votes
1 answer

unable to compile java code in Jenkins

If the code is compiling and running ...READ MORE

answered Apr 25, 2018 in Jenkins by DareDev
• 6,850 points
614 views
+2 votes
5 answers
+13 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,420 points
495 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer