title: Jenkins+Docker+Grid Execution - UnreachableBrowserException: Could not start a new session
body: <p>While executing my suite dynamically on grid using Docker-compose through Jenkins, I am getting the following <strong>exception stacktrace</strong>:</p>
  <pre><code>org.openqa.selenium.remote.DesiredCapabilities firefox
  INFO: Using `new FirefoxOptions()` is preferred to `DesiredCapabilities.firefox()`
  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.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
  System info: host: '49d4c6ec544d', ip: '172.17.0.2', os.name: 'Linux', os.arch: 'amd64', os.version: '5.10.25-linuxkit', java.version: '1.8.0_292'
  Driver info: driver.version: RemoteWebDriver
      at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:573)
      at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:213)
      at org.openqa.selenium.remote.RemoteWebDriver.&lt;init&gt;(RemoteWebDriver.java:131)
      at org.openqa.selenium.remote.RemoteWebDriver.&lt;init&gt;(RemoteWebDriver.java:144)
      at WebdriverBase.GridDriverManager.setDriver(GridDriverManager.java:144)
      at WebdriverBase.GridDriverManager.getDriver(GridDriverManager.java:115)
      at stepdefinition.PurchaseWorkflow.init(PurchaseWorkflow.java:32)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  </code></pre>
  <p><strong>My docker-compose.yml file:</strong>
  <a href="https://i.stack.imgur.com/XTFtH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XTFtH.png" alt="enter image description here" /></a></p>
  <p><strong>My Hub URL</strong> : &quot;http://selenium-hub:4444/wd/hub&quot;</p>
  <p>When executing the same code on local system everything is working fine on Docker container. Problem arises only when I trigger my test from Jenkins.</p>