I can run every test locally just fine

if I run my test on jenkins, on a docker file, I get this error

org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
System info: host: 'ip-172-31-10-102.eu-central-1.compute.internal', ip: '', os.name: 'Linux', os.arch: 'amd64', os.version: '3.10.0-693.21.1.el7.x86_64', java.version: '1.8.0_221'
Driver info: driver.version: RemoteWebDriver
Caused by: java.net.ConnectException: Failed to connect to localhost/0:0:0:0:0:0:0:1:4444

This is my maven run config for docker

-B -f /data/workspace/workspace/testing/web-full-suite/pom.xml -B -ntp clean verify -fae -P genericSuite -Denv=zalenium -DcucumberTag=full -DtestEnv=staging -Dthreads=2 -DaccessKey=xyz

I am not sure why I can run locally but not on Docker.


  • 1
    Looks similar to this thread stackoverflow.com/questions/60039641/… Does that solve your problem?
    – pavelsaman
    Commented Oct 1, 2021 at 7:59
  • Can you provide minimal representative example?
    – Alexey R.
    Commented Oct 1, 2021 at 10:31
  • Are you using xfvb or Any other virtual display ? When saying works locally, does mean by running the docker file locally ? Or just running the test locally
    – PDHide
    Commented Oct 5, 2021 at 22:08
  • Can you provide more clarification? First can we see your code for initiating the bowser driver? What is your setup? Jenkins node is a docker agent? Is maven installed on the docker agent? You seem to imply that your maven command is on the Dockerfile, so where is mvn? Your mvn command is batching twice(-B)? Your browser instance is on a separate docker instance (hence RemoteWebDriver and Zalenium)? Where have you declared the remote selenium grid url, it seems to think it is localhost (i.e. your jenkins agent)? Too many questions, as more info is required to be able to help you
    – djmonki
    Commented Nov 15, 2021 at 2:28


Your Answer

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