Selenium Grid2 - Remote Node not connecting to HUB

Amey picture Amey · Dec 30, 2011 · Viewed 21.9k times · Source

My current setup is I have a selenium RC running as a hub on a windows machine(lets assume machine name is machine.name.com). I have used the following command to start it

java -jar selenium-server2.15.jar -role hub -port 5555

I have a selenium node running on the same machine which is registered to the above node. I have used the following command to start the node

java -jar selenium-server2.15.jar -role node -port 5554 -hub http://machine.name.com:5555/grid/register

This node gets registered successfully, and I am able to run tests of this node as well.

Now I have another machine (a LINUX one - lets assume the ip address of this machine is 10.123.123.123), form where I wish to run another node registered to the hub on the windows (machine.name.com) machine at port 5555. I have used the following command to start the node.

java -jar selenium-server2.15.jar -role node -port 5572 -hub http://machine.name.com:5555/grid/register -browser browserName=chrome,platform=LINUX,maxInstances=5

The problem is that this node does not get registered by the HUB.

I do know for a fact that the Hub and Node have detected each other as when i hit http://machine.name.com:5555/console on the browser both the nodes are displayed. But the Linux machine has an error message alongside it "listening on http://10.123.123.123:5572 (cannot be reached at the moment)"

and no selenium tests can be run off that node.

I read on seleniumgroups HERE that the remote node must define the -hubHost key value pair also. So I have tried the following command as well, with no success

java -jar selenium-server2.15.jar -role node -port 5572 -hub http://machine.name.com:5555/grid/register -browser browserName=chrome,platform=LINUX, maxInstances=5 -hubHost "machine.name.com"

But this does not register the node as well.

Please note no error is thrown on the console on the linux machine. all that is displayed is -

13:20:55.891 INFO - starting auto register thread. Will try to register every 5000ms
13:20:55.891 INFO - Registering the node to hub :http://machine.name.com:5555/grid/register
13:23:06.860 INFO - Registering the node to hub :http://machine.name.com:5555/grid/register
13:25:17.678 INFO - Registering the node to hub :http://machine.name.com:5555/grid/register
13:27:28.496 INFO - Registering the node to hub :http://machine.name.com:5555/grid/register
13:29:39.311 INFO - Registering the node to hub :http://machine.name.com:5555/grid/register

No error are thrown on the console running the Hub on the windows machine.

Firewalls are appropriately punctured, as well checked by telneting.

With all of this, I am sure i have done something fundamentally wrong, can someone please HELP ME!!!!!

Answer

Amey picture Amey · Jan 4, 2012

Thanks guys for helping out, but the problem was because the IP address of my node server was not routable. So i created a host entry (DNS entry as well) for the node server. and added another parameter -host

so the command now looks like

java -jar selenium-server2.15.jar -role node -port 5572 -hub http://machine.name.com:5555/grid/register -browser browserName=chrome,platform=LINUX, maxInstances=5 -hubHost "machine.name.com" -host "nodemachine.name.com"

thanks once again everyone.