Selenium网格无法连接到集线器



我正在尝试连接到我自己的硒网格中心。我用的是Windows 10。Mac为集线器。

我正在Mac上运行这个命令。

java -jar selenium-server-standalone-3.141.59.jar -role hub

,它正在准备注册节点

07:08:15.219 INFO [Hub.start] - Selenium Grid hub is up and running
07:08:15.219 INFO [Hub.start] - Nodes should register to http://192.168.1.104:4444/grid/register/
07:08:15.220 INFO [Hub.start] - Clients should connect to http://192.168.1.104:4444/wd/hub

然后我尝试用这个命令

连接到集线器
java -jar selenium-server-standalone-3.141.59.jar -role node -hub http://192.168.1.104:4444/grid/register/

它永远不会连接到集线器并且永远尝试

07:10:48.658 INFO [GridLauncherV3.parse] - Selenium server version: 3.141.59, revision: e82be7d358
07:10:48.753 INFO [GridLauncherV3.lambda$buildLaunchers$7] - Launching a Selenium Grid node on port 20519
2021-08-04 07:10:48.885:INFO::main: Logging initialized @648ms to org.seleniumhq.jetty9.util.log.StdErrLog
07:10:49.063 INFO [WebDriverServlet.<init>] - Initialising WebDriverServlet
07:10:49.149 INFO [SeleniumServer.boot] - Selenium Server is up and running on port 20519
07:10:49.150 INFO [GridLauncherV3.lambda$buildLaunchers$7] - Selenium Grid node is up and ready to register to the hub
07:10:49.178 INFO [SelfRegisteringRemote$1.run] - Starting auto registration thread. Will try to register every 5000 ms.
07:11:10.382 WARN [SelfRegisteringRemote.registerToHub] - Error getting the parameters from the hub. The node may end up with wrong timeouts.Failed to connect to /192.168.1.104:4444
07:11:10.383 INFO [SelfRegisteringRemote.registerToHub] - Registering the node to the hub: http://192.168.1.104:4444/grid/register
07:11:31.415 INFO [SelfRegisteringRemote$1.run] - Couldn't register this node: Error sending the registration request: Failed to connect to /192.168.1.104:4444
07:11:57.463 INFO [SelfRegisteringRemote$1.run] - Couldn't register this node: The hub is down or not responding: Failed to connect to /192.168.1.104:4444
07:12:23.513 INFO [SelfRegisteringRemote$1.run] - Couldn't register this node: The hub is down or not responding: Failed to connect to /192.168.1.104:4444
07:12:49.556 INFO [SelfRegisteringRemote$1.run] - Couldn't register this node: The hub is down or not responding: Failed to connect to /192.168.1.104:4444
07:13:15.600 INFO [SelfRegisteringRemote$1.run] - Couldn't register this node: The hub is down or not responding: Failed to connect to /192.168.1.104:4444

我的Mac还在运行,但是显示没有响应…

我该如何解决这个问题?

您需要在服务器端口之后启动节点,而不需要任何附加路径。看到文档。

所以你的命令是:

java -jar selenium-server-standalone-3.141.59.jar -role node -hub http://192.168.1.104:4444

最新更新