Selenium Grid2 - Remote Node not connecting to HUB

情到浓时终转凉″ 提交于 2019-12-03 01:33:05

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.

To me it seems like you're doing it correctly. Have you tried the -debug flag when launching the node? Maybe you'll find something there.

And you probably want browserName=googlechrome instead of browserName=chrome

I faced a similar problem when hosting both node and hub on the local machine while I was on the VPN. I was able to get around this problem by launching both the hub and the node with the parameters -host and -port

For launching the hub the command looks something like this

java -jar selenium-server-standalone-2.32.0.jar -role hub -host <hubipaddress> -port 4444

For Launching the node the command looks something like this

java -jar selenium-server-standalone-2.32.0.jar -role node -host <nodeipaddress> -port 5555 -hub http://<hubipaddress>:4444/grid/register

In my case both hubipaddress and nodeipaddress are the same and they are the ip address assigned to me over the VPN

IF you are using a virtual machine you need to check your entropy. Selenium used urandom and if you don't have enough entropy it will take 1hour+ (if at all) for the node to come up.

On CentOS (and other distros) install:

yum install haveged
chkconfig haveged on
systemctl start haveged

Restart both services and Selenium should boot properly.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!