Reputation: 1897
Marking the node http://169.254.80.80:5566 as down: cannot reach the node for 2 tries.
I thought this might be a security/port issue so I opened the ports 4444 and 5566 and told the firewall to allow connections from selenium-server-standalone-3.141.59.jar. However, Selenium Grid hub still "marks the node as down: cannot reach the node for 2 tries".
This happens for both selenium-server-standalone-3.141.59.jar and selenium-server-standalone-3.12.0.jar.
Question: Why is Selenium Grid Hub producing the "Marks the node as down: cannot reach the node for 2 tries"? I am running both the Hub and Node on the same machine. I am guessing this is okay.
I did find a similar post but not exactly the same error message and the answer looks like it was a typo. Similar Stack Overflow post
Figure 1: Messages from Selenium Grid Hub and Selenium Server Node
Figure 2: Allowing connections to/from port 4444
Figure 3: Allowing Selenium Server through firewall
Figure 4: Allowing connections to/from port 5566
Upvotes: 0
Views: 2092
Reputation: 1897
I was using an old version of Selenium Server.
Lastest Versions of Selenium Projects/Products can be found here: lastest version of Selenium Projects
Was eventually able to find a similar post about the issue here: node not registering in earlier versions of Selenium Server
Description of Complete Fix (that worked for me):
Note-1: I did NOT have to create any inbound or outbound firewall rules (as described in the original question) since the node connected to the hub using 'http://localhost:4444/..'.
Note-2: Was not able to get node to connect to hub with the actual IP address as suggested by DebanjanB. Will need to figure this out eventually. Will post if figure out.
Upvotes: 1
Reputation: 193058
A bit more about your usecase and the commands which you have used along with the trace logs in text format would have helped to analyze the issue in a better way. However on my localhost (Windows 10) when I initiate the Selenium Grid Hub through the command:
C:\selenium-server-standalone>java -jar selenium-server-standalone-3.141.59.jar -role hub
The resultant log messages are as follows:
02:40:05.385 INFO [GridLauncherV3.parse] - Selenium server version: 3.141.59, revision: e82be7d358
02:40:06.025 INFO [GridLauncherV3.lambda$buildLaunchers$5] - Launching Selenium Grid hub on port 4444
2019-08-03 02:40:07.963:INFO::main: Logging initialized @4684ms to org.seleniumhq.jetty9.util.log.StdErrLog
02:40:10.538 INFO [Hub.start] - Selenium Grid hub is up and running
02:40:10.554 INFO [Hub.start] - Nodes should register to http://192.168.43.186:4444/grid/register/
02:40:10.554 INFO [Hub.start] - Clients should connect to http://192.168.43.186:4444/wd/hub
Accordingly, the Selenium Grid Node should register to http://192.168.43.186:4444/grid/register/
(instead of http://localhost:4444/grid/register/
) as follows:
C:\selenium-server-standalone>java -jar selenium-server-standalone-3.141.59.jar -role node -port 5566 -hub http://192.168.43.186:4444/grid/register
02:45:55.856 INFO [GridLauncherV3.parse] - Selenium server version: 3.141.59, revision: e82be7d358
02:45:56.216 INFO [GridLauncherV3.lambda$buildLaunchers$7] - Launching a Selenium Grid node on port 5566
2019-08-03 02:45:57.638:INFO::main: Logging initialized @2866ms to org.seleniumhq.jetty9.util.log.StdErrLog
02:45:58.747 INFO [WebDriverServlet.<init>] - Initialising WebDriverServlet
02:45:59.153 INFO [SeleniumServer.boot] - Selenium Server is up and running on port 5566
02:45:59.153 INFO [GridLauncherV3.lambda$buildLaunchers$7] - Selenium Grid node is up and ready to register to the hub
02:45:59.669 INFO [SelfRegisteringRemote$1.run] - Starting auto registration thread. Will try to register every 5000 ms.
02:46:01.731 INFO [SelfRegisteringRemote.registerToHub] - Registering the node to the hub: http://192.168.43.186:4444/grid/register
02:46:02.278 INFO [SelfRegisteringRemote.registerToHub] - The node is registered to the hub and ready to use
The following log message is generated by the Selenium Grid Hub:
02:46:02.278 INFO [DefaultGridRegistry.add] - Registered a node http://192.168.43.186:5566
Upvotes: 2