Run docker-browser on gui-less server

19 views
Skip to first unread message

Jeremy Seal

unread,
Mar 8, 2020, 6:45:02 PM3/8/20
to docker-dev
Hi,

First of all, I'll explain the setup.
We have a Jenkins server with a Jenkins slave where selenium GUI tests are checked out and ran against a remote application (deployed on another server).
I want to use the docker browser on the Jenkins slave. This Jenkins slave has no GUI. The test fails with following stacktrace:


No X11 DISPLAY variable was set, but this program performed an operation which requires it.
15:34:41 	at sun.awt.HeadlessToolkit.getScreenSize(HeadlessToolkit.java:284)
15:34:41 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
15:34:41 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
15:34:41 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
15:34:41 	at java.lang.reflect.Method.invoke(Method.java:498)
15:34:41 	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
15:34:41 	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
15:34:41 	at org.codehaus.groovy.runtime.metaclass.MethodMetaProperty$GetBeanMethodMetaProperty.getProperty(MethodMetaProperty.java:76)
15:34:41 	at org.codehaus.groovy.runtime.callsite.GetEffectivePojoPropertySite.getProperty(GetEffectivePojoPropertySite.java:64)
15:34:41 	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:296)
15:34:41 	at com.trax.test.BrowserFunctions.resize(BrowserFunctions.groovy:203)
15:34:41 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
15:34:41 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
15:34:41 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
15:34:41 	at java.lang.reflect.Method.invoke(Method.java:498)
15:34:41 	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
15:34:41 	at


I thought the docker browser doesn't need a GUI on the server. What am I doing wrong?
Reply all
Reply to author
Forward
0 new messages