繁体   English   中英

将远程计算机注册为节点使网格控制台上的连接超时

[英]Register remote machine as node is giving connection timed out on Grid Console

我在物理Windows计算机上设置了一个集线器。 我正在尝试设置一个节点以连接到无头Linux Red Hat VM上的该集线器。

我使用以下命令启动节点:

java -jar selenium-server-standalone-3.4.0.jar -role 
node -hub http://<IP>:5786/grid/register

该节点使用以下堆栈跟踪在终端中成功注册

10:38:55.935 INFO - Selenium build info: version: '3.4.0', revision:  
'unknown'
10:38:55.936 INFO - Launching a Selenium Grid node
2017-07-11 10:38:56.716:INFO::main: Logging initialized @1140ms to 
org.seleniumhq.jetty9.util.log.StdErrLog
10:38:56.800 INFO - Driver provider 
org.openqa.selenium.ie.InternetExplorerDriver registration is skipped:
registration capabilities Capabilities [{ensureCleanSession=true, 
browserName=internet explorer, version=, platform=WINDOWS}] does not match 
the current platform LINUX
10:38:56.800 INFO - Driver provider org.openqa.selenium.edge.EdgeDriver 
registration is skipped:
 registration capabilities Capabilities [{browserName=MicrosoftEdge, version=, 
platform=WINDOWS}] does not match the current platform LINUX
10:38:56.800 INFO - Driver class not found: com.opera.core.systems.OperaDriver
10:38:56.800 INFO - Driver provider com.opera.core.systems.OperaDriver 
registration is skipped:
Unable to create new instances on this machine.
10:38:56.800 INFO - Driver class not found: com.opera.core.systems.OperaDriver
10:38:56.800 INFO - Driver provider com.opera.core.systems.OperaDriver is not 
registered
10:38:56.801 INFO - Driver provider org.openqa.selenium.safari.SafariDriver 
registration is skipped:
 registration capabilities Capabilities [{browserName=safari, version=, 
platform=MAC}] does not match the current platform LINUX
2017-07-11 10:38:56.860:INFO:osjs.Server:main: jetty-9.4.3.v20170317
2017-07-11 10:38:56.905:INFO:osjsh.ContextHandler:main: Started 
o.s.j.s.ServletContextHandler@96def03{/,null,AVAILABLE}
2017-07-11 10:38:56.922:INFO:osjs.AbstractConnector:main: Started 
ServerConnector@69b2283a{HTTP/1.1,[http/1.1]}{0.0.0.0:5555}
2017-07-11 10:38:56.923:INFO:osjs.Server:main: Started @1346ms
10:38:56.923 INFO - Selenium Grid node is up and ready to register to the hub
10:38:56.967 INFO - Starting auto registration thread. Will try to register 
every 
5000 ms.
10:38:56.968 INFO - Registering the node to the hub: 
http://<IP>/grid/register
10:38:57.322 INFO - The node is registered to the hub and ready to use

但是,当我进入控制台时,将显示以下消息:

DefaultRemoteProxy unknown version,Connect to <IP>:5555 [/<IP>] failed: connect timed out

此外,在我的集线器终端中,还会出现以下消息:

11:00:26.189 INFO - Unregistering the node http://<IP of NODE>:5555 because 
it's been down for 60006 milliseconds
11:00:33.615 WARN - Cleaning up stale test sessions on the unregistered node 
http://<IP of NODE>:5555

这将一遍又一遍地循环。

我已经对此进行了很多研究,但找不到任何有用的东西。

我发现最接近的是使用网桥连接而不是NAT连接,但是我处于公司设置下,无法摆弄任何这些设置。

编辑

08:53:22.664 INFO - Selenium build info: version: '3.4.0', revision: 
'unknown'
08:53:22.665 INFO - Launching a Selenium Grid node
2017-07-12 08:53:23.505:INFO::main: Logging initialized @1194ms to 
org.seleniumhq.jetty9.util.log.StdErrLog
08:53:23.590 INFO - Driver provider 
org.openqa.selenium.ie.InternetExplorerDriver registration is skipped:
registration capabilities Capabilities [{ensureCleanSession=true, 
browserName=internet explorer, version=, platform=WINDOWS}] does not match 
the current platform LINUX
08:53:23.591 INFO - Driver provider org.openqa.selenium.edge.EdgeDriver 
registration is skipped:
registration capabilities Capabilities [{browserName=MicrosoftEdge, 
version=, platform=WINDOWS}] does not match the current platform LINUX
08:53:23.591 INFO - Driver class not found: 
com.opera.core.systems.OperaDriver
08:53:23.591 INFO - Driver provider com.opera.core.systems.OperaDriver 
registration is skipped:
Unable to create new instances on this machine.
08:53:23.591 INFO - Driver class not found: 
com.opera.core.systems.OperaDriver
08:53:23.591 INFO - Driver provider com.opera.core.systems.OperaDriver is not 
registered
08:53:23.592 INFO - Driver provider org.openqa.selenium.safari.SafariDriver 
registration is skipped:
registration capabilities Capabilities [{browserName=safari, version=, 
platform=MAC}] does not match the current platform LINUX
2017-07-12 08:53:23.650:INFO:osjs.Server:main: jetty-9.4.3.v20170317
2017-07-12 08:53:23.699:INFO:osjsh.ContextHandler:main: Started 
o.s.j.s.ServletContextHandler@363ee3a2{/,null,AVAILABLE}
2017-07-12 08:53:23.715:INFO:osjs.AbstractConnector:main: Started 
ServerConnector@cd3fee8{HTTP/1.1,[http/1.1]}{0.0.0.0:8151}
2017-07-12 08:53:23.715:INFO:osjs.Server:main: Started @1404ms
08:53:23.724 INFO - Selenium Grid node is up and ready to register to the hub
08:53:23.765 INFO - Starting auto registration thread. Will try to register 
every 5000 ms.
08:53:23.765 INFO - Registering the node to the hub: 
http://10.56.130.102:5786/grid/register
08:53:24.114 INFO - The node is registered to the hub and ready to use

这是您的问题的答案:

从错误日志DefaultRemoteProxy unknown version,Connect to <IP>:5555 [/<IP>] failed: connect timed out很清楚地看出DefaultRemoteProxy unknown version,Connect to <IP>:5555 [/<IP>] failed: connect timed outSelenium Grid Node侦听的默认端口5555正在由其他应用程序使用。 因此,您可以考虑将其他一些端口用于Selenium Grid Node ,如下所示:

java -jar selenium-server-standalone-3.4.0.jar -role node -port 8143 -hub http://localhost:5786/grid/register

您可以通过以下日志确认Selenium Grid节点的注册:

11:04:40.636 INFO - Selenium Grid node is up and ready to register to the hub
11:04:40.714 INFO - Starting auto registration thread. Will try to register every 5000 ms.
11:04:40.714 INFO - Registering the node to the hub: http://localhost:5786/grid/register
11:04:40.917 INFO - The node is registered to the hub and ready to use

接下来,您可以通过http:// localhost:5786 / grid / console访问Selenium Grid Server 控制台并确认该节点。

让我知道这是否回答了您的问题。

您的问题是Windows计算机上的防火墙阻止了端口5555该节点在其上运行的默认端口)上Windows计算机的出站连接。 请查看链接是否可以帮助您在Windows上打开端口。

这也解释了为什么从节点到集线器的注册成功,但是集线器将节点标记为已关闭/过时,之后又将其删除,因为它无法为节点公开的状态URL建立HTTP GET

由于通常在机器上始终打开端口8080 ,因此您可以尝试在此端口上运行node ,以便集线器可以回送该节点以进行状态查询。

ping机器,然后触发http操作(例如HTTP GET似乎不是一回事。 请参阅以获取更多信息。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM