Starting Selenium GRID on Amazon EC2 instance - node register to http://172.17.42.1:4444/grid/register/

514 Views Asked by At

I'm trying to launch the Selemium Grid on an EC2 instance but when I start up the grid I'm getting the following warning in the logs saying the nodes should register to http://172.17.42.1:4444/grid/register/

The hub isn't running on the ip address 172.17.42.1 so I'm not sure whats going on. Where is the hub getting this ip from?

[ec2-user@ip-11-111-11-125 stf]$ java -jar "selenium-server-standalone-3.12.0.jar" -role hub -port 4444
02:50:53.458 INFO [GridLauncherV3.launch] - Selenium build info: version: '3.12.0', revision: '7c6e0b3'
02:50:53.463 INFO [GridLauncherV3$2.launch] - Launching Selenium Grid hub on port 4444
2018-06-06 02:50:53.956:iNFO::main: Logging initialized @1345ms to org.seleniumhq.jetty9.util.log.StdErrLog
02:50:54.280 INFO [Hub.start] - Selenium Grid hub is up and running
02:50:54.281 INFO [Hub.start] - Nodes should register to http://172.17.42.1:4444/grid/register/
02:50:54.282 INFO [Hub.start] -Clients should connect to http://172.17.42.1:4444/wd/hub
2

There are 2 best solutions below

0
On

You need to add your port number i.e 4444 to the EC2 security group. You can add Custom TCP rule to 0.0.0.0/0 but I will suggest just add your IP.

0
On

You need to use the public ip of your hub , node to connect to the hub on your ec2 instance.

Please see my answer to this question - Unable to connect to Selenium Grid running on AWS EC2

Please feel free to comment if this does not work for you.