Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Selenium by (7k points)
edited by

I recently migrated our grid RHEL7 server to RHEL8 server. While running run docker-compose on machine, the nodes do not connect to the hub.

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"

  

test command:

$ docker-compose up --scale chrome=1 --scale firefox=0

terminal out:

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)

1 Answer

0 votes
by (31.9k points)

Follow these steps:

  Install IpTables

$ yum install iptables-services

$ systemctl start iptables

$ systemctl enable iptables

Then, configure IpTables to allow the hub's port

$ sudo iptables -A INPUT -p tcp --dport 4444 -j ACCEPT

Now,shut down the firewall daemon

$ systemctl stop firewalld

Start or restart the docker daemon

$ systemctl restart docker

Want to learn Selenium, checkout our Selenium training.

Welcome to Intellipaat Community. Get your technical queries answered by top developers!

30.5k questions

32.5k answers

500 comments

108k users

Browse Categories

...