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: 'unknown', revision: 'f233563', time: '2016-07-28 17:11:26 -0700' System info: host: 'CHQ-TSTDTP012', ip: '10.12.20.120', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_101' Driver info: driver.version: FirefoxDriver

Samebug tips9

To restart the Selenium Webdriver mock browser in a testcase, first use 'driver.close()' and then reinstantiate the driver.

host port isnt set

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web2698

  • via GitHub by santoshchk
    ,
  • Stack trace

    • 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: 'unknown', revision: 'f233563', time: '2016-07-28 17:11:26 -0700' System info: host: 'CHQ-TSTDTP012', ip: '10.12.20.120', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_101' Driver info: driver.version: FirefoxDriver at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:670) at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:247) at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:130) at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:231) at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:219) at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:214) at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:131) at ffdrive.main(ffdrive.java:12) Caused by: org.openqa.selenium.WebDriverException: org.apache.http.conn.HttpHostConnectException: Connect to localhost:8126 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connect Build info: version: 'unknown', revision: 'f233563', time: '2016-07-28 17:11:26 -0700' System info: host: 'CHQ-TSTDTP012', ip: '10.12.20.120', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_101' Driver info: driver.version: FirefoxDriver at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:91) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:649) ... 7 more Caused by: org.apache.http.conn.HttpHostConnectException: Connect to localhost:8126 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connect at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:158) at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353) at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380) at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236) at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184) at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88) at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:71) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:55) at org.openqa.selenium.remote.internal.ApacheHttpClient.fallBackExecute(ApacheHttpClient.java:142) at org.openqa.selenium.remote.internal.ApacheHttpClient.execute(ApacheHttpClient.java:88) at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:142) at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:82) ... 8 more Caused by: java.net.ConnectException: Connection refused: connect at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method) at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source) at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source) at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source) at java.net.AbstractPlainSocketImpl.connect(Unknown Source) at java.net.PlainSocketImpl.connect(Unknown Source) at java.net.SocksSocketImpl.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at org.apache.http.conn.socket.PlainConnectionSocketFactory.connectSocket(PlainConnectionSocketFactory.java:74) at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:141) ... 21 more

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitor2 times, last one
    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    399 more bugmates