SeleniumHQ / docker-selenium

Provides a simple way to run Selenium Grid with Chrome, Firefox, and Edge using Docker, making it easier to perform browser automation
http://www.selenium.dev/docker-selenium/
Other
7.91k stars 2.51k forks source link

latest (3.141.59-zirconium) version of hub cannot reach the node #1015

Closed burtsevyg closed 4 years ago

burtsevyg commented 4 years ago

🐛 Bug Report

latest (3.141.59-zirconium) version of hub cannot reach the node. 3.141.59-yttrium version work perfect.

To Reproduce

Run docker stack: (see instructions on https://dockerswarm.rocks/traefik/)

<!--
Please be sure to include an SSCCE (Short, Self Contained, Correct [compilable] example) http://sscce.org/
If you can't provide a link to the page, consider creating a reproducible page on https://jsfiddle.net/
-->

version: '3.7'

services:
  hub:
    image: selenium/hub:latest
    networks:
      - default
      - traefik-public
    deploy:
      labels:
        - traefik.frontend.rule=Host:selenium-${DOMAIN?Variable DOMAIN not set}
        - traefik.enable=true
        - traefik.port=4444
        - traefik.tags=${TRAEFIK_PUBLIC_TAG:-traefik-public}
        - traefik.docker.network=traefik-public
        # Traefik service that listens to HTTP
        - traefik.redirectorservice.frontend.entryPoints=http
        - traefik.redirectorservice.frontend.redirect.entryPoint=https
        # Traefik service that listens to HTTPS
        - traefik.webservice.frontend.entryPoints=https

  chrome:
    image: selenium/node-chrome:latest
    volumes:
      - /dev/shm:/dev/shm
    networks:
      - default
      - traefik-public
    environment:
      HUB_HOST: hub
      HUB_PORT: 4444
    deploy:
      mode: global
    entrypoint: bash -c 'SE_OPTS="-host $$HOSTNAME" /opt/bin/entry_point.sh'

networks:
  traefik-public:
    external: true

Expected behavior

There are no error in the logs

Test script or set of commands reproducing this issue

Please, see reproduce section.

Environment

OS: docker 19.03.5 Browser: latest (see docker-compose file) Browser version: latest (see docker-compose file) Browser Driver version: latest (see docker-compose file) Language Bindings version: latest (see docker-compose file) Selenium Grid version (if applicable): latest (see docker-compose file)

Log errors:

12:54:09.713 INFO [Hub.start] - Nodes should register to http://172.18.0.7:4444/grid/register/
12:54:09.713 INFO [Hub.start] - Clients should connect to http://172.18.0.7:4444/wd/hub
12:54:22.684 INFO [DefaultGridRegistry.add] - Registered a node http://47be09a43cfa:5555
12:54:33.010 INFO [DefaultRemoteProxy.onEvent] - Marking the node http://47be09a43cfa:5555 as down: cannot reach the node for 2 tries
12:55:33.036 INFO [DefaultRemoteProxy.onEvent] - Unregistering the node http://47be09a43cfa:5555 because it's been down for 60027 milliseconds
12:55:33.037 WARN [DefaultGridRegistry.removeIfPresent] - Cleaning up stale test sessions on the unregistered node http://47be09a43cfa:5555
diemol commented 4 years ago

@burtsevyg the only difference between the container versions are the browser versions, Selenium still has the same version. Is there something else we are missing in the report?

burtsevyg commented 4 years ago

When I set image selenium/hub to 3.141.59-yttrium and image selenium/node-chrome to 3.141.59-yttrium test passed without errors and without warnings in the log.

diemol commented 4 years ago

Yes, because the 3.141.59-yttrium has Chrome 79.0.3945.79 and has 3.141.59-zirconium has Chrome 80.0.3987.106. So can you please reproduce it directly to these Chrome versions? We want to see if this is a Chrome/ChromeDriver issue or a Selenium issue?

diemol commented 4 years ago

Also, have you tried https://github.com/SeleniumHQ/docker-selenium/releases/tag/3.141.59-20200409, which has Chrome 81?

burtsevyg commented 4 years ago

If I set image selenium/node-chrome to 3.141.59-zirconium and image selenium/hub stay at 3.141.59-yttrium I get:

org.openqa.selenium.WebDriverException: 
Error forwarding the new session Error forwarding the request Failed to connect to 8e7f2b83de98/10.0.6.9:5555
Command duration or timeout: 6.80 seconds
Caused by: org.openqa.selenium.WebDriverException: 
Error forwarding the new session Error forwarding the request Failed to connect to 8e7f2b83de98/10.0.6.9:5555
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: '580ae5cf8869', ip: '172.17.0.3', os.name: 'Linux', os.arch: 'amd64', os.version: '4.15.0-91-generic', java.version: '1.8.0_242'
Driver info: driver.version: unknown

I don't know where is 5555 port from but I don't have it in my configuration.

diemol commented 4 years ago

@burtsevyg I am not following, sorry. I don't understand why we are mixing tags... Could you please reply to my questions/suggestions above? So:

burtsevyg commented 4 years ago

Ok, I retested with same version for hub and chrome browser:

diemol commented 4 years ago

OK, that shows that the problem was related to Chrome 80, since it works with the images that have Chrome 79 and Chrome 81. I'll close this issue since it was related to Chrome and not to docker-selenium.

lock[bot] commented 4 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

lock[bot] commented 4 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.