0

If I use case when hub and node are on the same network - here is how I do this: launch hub: java -jar selenium-server-standalone-2.45.0.jar -role hub -port 4444

launch node:

java -jar selenium-server-standalone-2.45.0.jar -role webdriver
-port 5555 -hub http://MY_IP:4444/grid/register -nodeTimeout 960 
-nodePolling 5 -unregistIfStillDownAfter 20000 
-browser browserName="chrome,version=42,maxInstances=1,platform=WINDOWS" 

so it works fine, but if node is in other network - lets say - at my home PC, I can't connect that node to my hub that is located at my work PC. For this purpose I've got from my admin an external IP, this time I could access hub from other network - in my http://localhost:4444/grid/console now I can see that remote node as failed: Operation timed out

So what should be done more to configure and to establish connection? Appreciate you help!

3

Normally both your home and the company networks are fire-walled, letting no external traffic in.

There are two possible solutions:

  • Poke holes in the company firewall for Selenium traffic back and forth
  • Create a VPN-tunnel between both

Poking holes

  • Make sure the firewall and routers forward any traffic on port 4444 to the company internal Selenium hub OR the HUB computer has a external ip and is not blocking traffic on port 444
  • Make sure only the home IP can connect to these rules. You don't want the whole internet to connect to your Selenium hub.

VPN tunnel

  • Your home systems makes a VPN connection to the company network, now the home computer acts if it is on the company network.
  • Connect to the hub with the internal IP address, just like you would

I would prefer the VPN solution, its more secure, better to maintain and easier to understand.

Also keep in mind, firewalls have dozens of possible rules which could interfere with the traffic going back and forth. This is not really a testing question since its about connecting a client and a server from a home to an company network. Using selenium does not really matter, since it uses a basic client/server model.

For analysing network issues its better to post a question on one of the other SE network sites. Or just ask your network administrator to assist you in more detail, he/she should be able to get this working.

Also have a look at Sauce-Connect, instead of using your own home-computer utilize the machines of SauceLabs over a tunnel.

  • I think advice about sauce-connect is really good idea. In my sauce labs profile I can see a data like: ID: 186.. Status: running Automatic Tunnel: All jobs will proxy through this tunnel by... Host: maki... Launched: Tue Apr 28 2015 15:34:59 GMT... UpTime: ... Local Host: d.metadata.hostname So, could you please at least briefly describe how to establish the connection using sauce labs - where should I go next ? I see that sauce labs is also commercial stuff but probably it will be possible to use their node this time to connect to my hub ? Thank you in advance! – user1829657 Apr 28 '15 at 13:00
  • Great answer. VPN strikes me as the preferred solution as well. – Lucas Schwarz Apr 28 '15 at 19:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.