无法将其他计算机连接到 Selenium 网格
Cannot Connect Other Computers to Selenium Grid
当我只在一台计算机上工作时,我可以将节点注册到集线器,但是当我尝试连接另一台计算机上 运行 的节点时,我收到超时或一条消息说集线器必须关闭或没有响应。我不知道如何解决这个问题。
启动集线器后,我收到消息:节点应注册到 http:192.168...:4444/grid register.
有教程说
"you can check if Machine B can access the hub's web interface by launching a browser there and going to where "iporhostnameofmachineA" should be the IP address or the hostname of the machine where the hub is running. Since Machine A's IP address is 192.168.1.3, then on the browser on Machine B you should type >http://192.168.1.3:4444/grid/console."
但是 chrome 给了我一个 "This site can't be reached error"。这一定是我的网络配置有问题,但我不知道应该如何解决它。
我会尝试从您的 Selenium 节点使用命令 'telnet 192.168.1.3 4444'
并查看它是否连接。在机器 运行ning 集线器上,(所以 192.168.1.3)运行 'netstat -antp | grep 4444'
(假设它是一台 linux 机器)并确保你看到一个条目显示端口正在收听。如果它是一台 windows 机器,你仍然可以使用 netstat 但我认为不能使用 grep。一旦确认hub确实在监听4444端口,并且可以ping通192.168.1.3,但是不能telnet到4444端口,就基本可以确定是防火墙的问题了。然后你需要查看两台机器上的防火墙,以及它们之间的任何防火墙。
当我只在一台计算机上工作时,我可以将节点注册到集线器,但是当我尝试连接另一台计算机上 运行 的节点时,我收到超时或一条消息说集线器必须关闭或没有响应。我不知道如何解决这个问题。
启动集线器后,我收到消息:节点应注册到 http:192.168...:4444/grid register.
有教程说
"you can check if Machine B can access the hub's web interface by launching a browser there and going to where "iporhostnameofmachineA" should be the IP address or the hostname of the machine where the hub is running. Since Machine A's IP address is 192.168.1.3, then on the browser on Machine B you should type >http://192.168.1.3:4444/grid/console."
但是 chrome 给了我一个 "This site can't be reached error"。这一定是我的网络配置有问题,但我不知道应该如何解决它。
我会尝试从您的 Selenium 节点使用命令 'telnet 192.168.1.3 4444'
并查看它是否连接。在机器 运行ning 集线器上,(所以 192.168.1.3)运行 'netstat -antp | grep 4444'
(假设它是一台 linux 机器)并确保你看到一个条目显示端口正在收听。如果它是一台 windows 机器,你仍然可以使用 netstat 但我认为不能使用 grep。一旦确认hub确实在监听4444端口,并且可以ping通192.168.1.3,但是不能telnet到4444端口,就基本可以确定是防火墙的问题了。然后你需要查看两台机器上的防火墙,以及它们之间的任何防火墙。