最近,我将网格从旧的RHEL7服务器迁移到了新的RHEL8服务器。当我在新机器上运行对接-组合时,节点不会连接到集线器。
docker-compose.yml
version: "3"
services:
selenium-hub:
image: selenium/hub:3.141.59-20200525
container_name: selenium-hub
ports:
- "4444:4444"
chrome:
depends_on:
- selenium-hub
environment:
- HUB_HOST=selenium-hub
- HUB_PORT=4444
image: selenium/node-chrome-debug:3.141.59-20200525
volumes:
- "/dev/shm:/dev/shm"
firefox:
depends_on:
- selenium-hub
environment:
- HUB_HOST=selenium-hub
- HUB_PORT=4444
image: selenium/node-firefox-debug:3.141.59-20200525
volumes:
- "/dev/shm:/dev/shm"测试命令
$ docker-compose up --scale chrome=1 --scale firefox=0终端出
selenium-hub | 18:25:12.271 INFO [Hub.start] - Selenium Grid hub is up and running
selenium-hub | 18:25:12.272 INFO [Hub.start] - Nodes should register to http://172.18.0.2:4444/grid/register/
selenium-hub | 18:25:12.272 INFO [Hub.start] - Clients should connect to http://172.18.0.2:4444/wd/hub
chrome_1 | 2020-07-29 18:25:12,302 INFO success: fluxbox entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
chrome_1 | 18:25:12.472 INFO [GridLauncherV3.parse] - Selenium server version: 3.141.59, revision: e82be7d358
chrome_1 | 18:25:12.564 INFO [GridLauncherV3.lambda$buildLaunchers$7] - Launching a Selenium Grid node on port 5555
chrome_1 | 2020-07-29 18:25:12.632:INFO::main: Logging initialized @345ms to org.seleniumhq.jetty9.util.log.StdErrLog
chrome_1 | 18:25:12.789 INFO [WebDriverServlet.<init>] - Initialising WebDriverServlet
chrome_1 | 18:25:12.850 INFO [SeleniumServer.boot] - Selenium Server is up and running on port 5555
chrome_1 | 18:25:12.850 INFO [GridLauncherV3.lambda$buildLaunchers$7] - Selenium Grid node is up and ready to register to the hub
chrome_1 | 18:25:12.895 INFO [SelfRegisteringRemote$1.run] - Starting auto registration thread. Will try to register every 5000 ms.
chrome_1 | 18:25:14.130 WARN [SelfRegisteringRemote.registerToHub] - Error getting the parameters from the hub. The node may end up with wrong timeouts.No route to host (Host unreachable)
chrome_1 | 18:25:14.130 INFO [SelfRegisteringRemote.registerToHub] - Registering the node to the hub: http://selenium-hub:4444/grid/register
chrome_1 | 18:25:15.153 INFO [SelfRegisteringRemote$1.run] - Couldn't register this node: Error sending the registration request: No route to host (Host unreachable)
chrome_1 | 18:25:21.169 INFO [SelfRegisteringRemote$1.run] - Couldn't register this node: The hub is down or not responding: No route to host (Host unreachable)注意: RHEL8使用podman,但是它被删除了,所以我们可以继续使用docker-RHEL8。
发布于 2020-07-29 20:06:10
这需要一些时间,但我们已经发现了一个修复方法,并在第二台机器上验证了这些步骤。
安装
$ yum install iptables-services
$ systemctl start iptables
$ systemctl enable iptables$ sudo iptables -A INPUT -p tcp --dport 4444 -j ACCEPT$ systemctl stop firewalld$ systemctl restart dockerhttps://stackoverflow.com/questions/62352128
复制相似问题