Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Selenium Grid2 - Remote Node not connecting to HUB

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!!!!!

like image 610
Amey Avatar asked Dec 30 '11 18:12

Amey


Video Answer


1 Answers

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.

like image 66
Amey Avatar answered Nov 15 '22 01:11

Amey