selenium grid: 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.


[TestNG] Running:
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: '2.41.0', revision: '3192d8a', time: '2014-03-27 17:17:32'
System info: host: 'ksehgal', ip: '', 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.6.0_43'
Driver info: driver.version: RemoteWebDriver
at org.openqa.selenium.remote.RemoteWebDriver.execute(
at org.openqa.selenium.remote.RemoteWebDriver.startSession(
at org.openqa.selenium.remote.RemoteWebDriver.<init>(
at org.openqa.selenium.remote.RemoteWebDriver.<init>(
at blogExample.TestingBot.setUp(
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
at java.lang.reflect.Method.invoke(
at org.testng.internal.MethodInvocationHelper.invokeMethod(
at org.testng.internal.Invoker.invokeConfigurationMethod(
at org.testng.internal.Invoker.invokeConfigurations(
at org.testng.internal.Invoker.invokeConfigurations(
at org.testng.internal.TestMethodWorker.invokeBeforeClassMethods(
at org.testng.TestRunner.privateRun(
at org.testng.SuiteRunner.runTest(
at org.testng.SuiteRunner.runSequentially(
at org.testng.SuiteRunner.privateRun(
at org.testng.SuiteRunnerWorker.runSuite(
at org.testng.TestNG.runSuitesSequentially(
at org.testng.TestNG.runSuitesLocally(
at org.testng.remote.RemoteTestNG.initAndRun(
at org.testng.remote.RemoteTestNG.main(
Caused by: Connection timed out: connect
at Method)
at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(
at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(
at org.apache.http.impl.client.DefaultRequestDirector.execute(
at org.apache.http.impl.client.AbstractHttpClient.doExecute(
at org.apache.http.impl.client.CloseableHttpClient.execute(
at org.apache.http.impl.client.CloseableHttpClient.execute(
at org.openqa.selenium.remote.HttpCommandExecutor.fallBackExecute(
at org.openqa.selenium.remote.HttpCommandExecutor.execute(
at org.openqa.selenium.remote.RemoteWebDriver.execute(
... 28 more

Console Output

SKIPPED: testSimple

Default test
Tests run: 1, Failures: 0, Skips: 1
Configuration Failures: 1, Skips: 1
Default suite
Total tests run: 1, Failures: 0, Skips: 1
Configuration Failures: 1, Skips: 1

[TestNG] Time taken by org.testng.reporters.JUnitReportReporter@20c1f10e: 22 ms
[TestNG] Time taken by org.testng.reporters.EmailableReporter2@1b016632: 8 ms
[TestNG] Time taken by org.testng.reporters.jq.Main@288051: 35 ms
[TestNG] Time taken by org.testng.reporters.XMLReporter@16ba8602: 9 ms
[TestNG] Time taken by org.testng.reporters.SuiteHTMLReporter@1572e449: 11 ms
[TestNG] Time taken by [FailedReporter passed=0 failed=0 skipped=0]: 5 ms

First let us understand what this problem is, and what all I have done when I got this error. Lets start from the very beginning.

Step1: I started a Selenium hub by this command:

F:\Selenium>java -jar selenium-server-standalone-2.41.0.jar -role hub -port 1111

Step2: I made a project in Eclipse IDE with the below code.
Code Snippet used

public class TestingSeleniumGrid {
private WebDriver driver;
public void setUp() throws Exception {
DesiredCapabilities capabilities = DesiredCapabilities.firefox();
capabilities.setCapability("platform", Platform.WINDOWS);
driver = new RemoteWebDriver(new URL("http://localhost:4444/wd/hub"),capabilities);

public void testSimple() throws Exception {

public void tearDown() throws Exception {

Step 3: I made this program run via TestNG. And I got the above ERROR which I mentioned in the starting of this post.


Before I start discussing the fix for the above error, lets try to start from the end. This is a general tip which we all should follow while coding or working with any sort of Programming language. You should read the error stack trace very deeply and again-and-again till you get some clue from it.
Now coming back to the ERROR.
1. Check the port which you have mentioned while starting the hub , its 1111.
2. Now verify the same IP in your code its 4444.
And thats where you are wrong. You have to make sure you have entered the same port and configuration in code and console while making the set up.
You have to correct it, try changing the port in program like

driver = new RemoteWebDriver(new URL("http://localhost:1111/wd/hub"),capabilities);

OR change the command to

F:\Selenium>java -jar selenium-server-standalone-2.41.0.jar -role hub -port 4444

Happy Testing 🙂


8 thoughts on “selenium grid: 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.

    • Hi,

      Can you kindly recheck the below points;-
      Have you taken the latest selenium jar?
      The path of the localhost server with port.
      While running the executable jar, have you given the correct path, port, jar name?

      P.S. It would be of great help if you can share your code snippet so that I can also recheck the same.



  1. Hi,
    Iam trying to run selenium scripts on remote machine using selenium grid.I have written the code for 2 devices one device registered from my virtual machine and other is the remote machine my script runs on virtual machine node but not on remote machine .I see no activity on remote terminal.And in eclipse it throws similar exception as above.Iam stuck here can u help out?


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s