Question

I've got a local machine with ip: 192.168.1.x. Windows 7 I've got a VM with NAT ip; 10.0.2.15 and host-only ip: 192.168.70.64 Windows 7

My hub setup is simple: java -jar selenium-server-standalone-2.41.0.jar -role hub

My node setup is as follows:

java -jar c:\selenium\selenium-server-standalone-2.41.0.jar -role node -hub http://192.168.1.x:4444/grid/register -browser browserName="internet explorer",version=9,platform=WINDOWS -Dwebdriver.ie.driver=c:\selenium\IEDriverServer.exe -remoteHost http://192.168.70.64:5555

My hub goes up, but when I start my node I get the output:

Node:

jar -role node -hub http://192.168.1.178:4444/grid/register -browser browserName="internet explorer",version=9,platform=WINDOWS -Dwebdriver.ie.driver=c:\selenium\IEDriverServer.exe -remoteHost http://192.168.70.64:5555
May 07, 2014 8:09:08 PM org.openqa.grid.selenium.GridLauncher main
INFO: Launching a selenium grid node
May 07, 2014 8:09:08 PM org.openqa.grid.common.RegistrationRequest addCapabilityFromString
INFO: Adding browserName=internet explorer,version=9,platform=WINDOWS
Setting system property webdriver.ie.driver to c:\selenium\IEDriverServer.exe
20:09:10.049 INFO - Java: Oracle Corporation 24.55-b03
20:09:10.049 INFO - OS: Windows 7 6.1 x86
20:09:10.063 INFO - v2.41.0, with Core v2.41.0. Built from revision 3192d8a
20:09:10.311 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:5555/wd/hub
20:09:10.311 INFO - Version Jetty/5.1.x
20:09:10.325 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
20:09:10.325 INFO - Started HttpContext[/selenium-server,/selenium-server]
20:09:10.325 INFO - Started HttpContext[/,/]
20:09:10.325 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler@152dbbf
20:09:10.325 INFO - Started HttpContext[/wd,/wd]
20:09:10.339 INFO - Started SocketListener on 0.0.0.0:5555
20:09:10.339 INFO - Started org.openqa.jetty.jetty.Server@5c0f8f
20:09:10.339 INFO - using the json request : {"class":"org.openqa.grid.common.RegistrationRequest","capabilities":[{"seleniumProtocol":"WebDriver","platform":"WINDOWS","browserName":"internet explorer","version":"9"}],"configuration":{"port":5555,"register":true,"host":"10.0.2.15","Dwebdriver.ie.driver=c:\\selenium\\IEDriverServer.exe":"","proxy":"org.openqa.grid.selenium.proxy.DefaultRemoteProxy","browser":"browserName=internet explorer,version=9,platform=WINDOWS","maxSession":5,"role":"node","hubHost":"192.168.1.178","registerCycle":5000,"hub":"http://192.168.1.178:4444/grid/register","hubPort":4444,"url":"http://192.168.70.64:5555","remoteHost":"http://192.168.70.64:5555"}}
20:09:10.352 INFO - Starting auto register thread. Will try to register every 5000 ms.
20:09:10.352 INFO - Registering the node to hub :http://192.168.1.178:4444/grid/register

Hub:

$ java -jar selenium-server-standalone-2.41.0.jar -role hub
May 07, 2014 10:08:38 PM org.openqa.grid.selenium.GridLauncher main
INFO: Launching a selenium grid server
2014-05-07 22:08:39.272:INFO:osjs.Server:jetty-7.x.y-SNAPSHOT
2014-05-07 22:08:39.303:INFO:osjsh.ContextHandler:started o.s.j.s.ServletContextHandler{/,null}
2014-05-07 22:08:39.310:INFO:osjs.AbstractConnector:Started SocketConnector@0.0.0.0:4444
May 07, 2014 10:09:09 PM org.openqa.grid.internal.BaseRemoteProxy <init>
WARNING: Max instance not specified. Using default = 1 instance
May 07, 2014 10:09:35 PM org.openqa.grid.selenium.proxy.DefaultRemoteProxy isAlive
WARNING: Failed to check status of node: Connection timed out: connect

I don't know why the node is not connecting. Thanks in advanced.

Was it helpful?

Solution

It was a difference in the way my network was setup at home vs at work.

This is a communication issue between the host and the VM and not grid specific. Resolve this first so you can communicate both ways (ping / access network shares etc); suggestions are to change network settings for the VM (Bridged, internal network etc), disable firewall, real-time protection etc - Faiz

OTHER TIPS

You will have this issue when your Host and Node are in two different Domains. You may be able to Ping to nodes from server and vice-versa but if you are not set you machines to talk to each other over n/w then this problem will arise. We had this problem when our Grid Server was in Domain A and the node was not in domain at all. We had to pull the nodes as will into the same domain for Grid to talk to the nodes.

I have both Windows 7 machines

I have removed windows firewall on node machine

This solved my problem

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top