Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to Register Node when dployed on Docker Swarm on AWS #2082

Open
gitissuepost opened this issue Jan 3, 2024 · 9 comments
Open

Unable to Register Node when dployed on Docker Swarm on AWS #2082

gitissuepost opened this issue Jan 3, 2024 · 9 comments

Comments

@gitissuepost
Copy link

gitissuepost commented Jan 3, 2024

What happened?

While configuring Selenium Grid 4 on AWS using docker swarm, the node is unable to connect the HUB for registration. The docker logs show Sending Registration Event... and I don't see any node registeredon to hub.

Also, it shows an warning Invalid option shm_size

Command used to start Selenium Grid with Docker (or Kubernetes)

`
# To deploy the Grid, `docker stack deploy -c docker-compose-v3-swarm.yml grid`
# Stop with `docker stack rm grid`

version: '3.8'

networks:
  main:
    driver: overlay

services:
  swarm-visualizer:
    image: dockersamples/visualizer
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    ports:
      - "5000:8080"
    networks:
      - main
    deploy:
      mode: replicated
      replicas: 1
      restart_policy:
        condition: none
      placement:
        constraints: [node.role == manager]

  jaegar:
    image: jaegertracing/all-in-one:latest
    ports:
      - "16686:16686"
      - "14250:14250"
    networks:
      - main
    deploy:
      mode: replicated
      replicas: 1
      restart_policy:
        condition: none
      placement:
        constraints: [node.role == manager]

  selenium-hub:
    image: selenium/hub:latest
    ports:
      - "4442:4442"
      - "4443:4443"
      - "4444:4444"
    networks:
      - main
    depends_on:
      - jaegar
    deploy:
      mode: replicated
      replicas: 1
      labels:
        selenium.grid.type: "selenium-hub"
        selenium.grid.hub: "true"
      restart_policy:
        condition: none
      placement:
        constraints: [node.role == manager]

  chrome:
    image: selenium/node-chrome
    shm_size: 2gb
    entrypoint: bash -c 'SE_OPTS="--log-level FINEST --host $$HOSTNAME" /opt/bin/entry_point.sh'
    volumes:
      - /dev/urandom:/dev/random
      - /dev/shm:/dev/shm
    environment:
      - SE_EVENT_BUS_HOST=<<HUB IP ADDRESS>>
      - SE_EVENT_BUS_PUBLISH_PORT=4442
      - SE_EVENT_BUS_SUBSCRIBE_PORT=4443
    networks:
      - main
    depends_on:
      - selenium-hub
    deploy:
      mode: replicated
      replicas: 2
      labels:
        selenium.grid.type: "node"
        selenium.grid.node: "true"
        selenium.grid.node.type: "chrome"
      restart_policy:
        condition: on-failure
        delay: 5s
        max_attempts: 3
        window: 120s
      placement:
        constraints: [node.role == worker]

`

Relevant log output

AWS - Swarm Worker Node Log

Operating System

RHEL 8.9

Docker Selenium version (image tag)

4.16.1-20231219

Selenium Grid chart version (chart version)

No response

Copy link

github-actions bot commented Jan 3, 2024

@gitissuepost, thank you for creating this issue. We will troubleshoot it as soon as we can.


Info for maintainers

Triage this issue by using labels.

If information is missing, add a helpful comment and then I-issue-template label.

If the issue is a question, add the I-question label.

If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted label.

If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C), add the applicable G-* label, and it will provide the correct link and auto-close the issue.

After troubleshooting the issue, please add the R-awaiting answer label.

Thank you!

@VietND96
Copy link
Member

VietND96 commented Jan 3, 2024

There are some suggestions

  1. Append --log-level FINE (or FINEST) to SE_OPTS to get more info about that registration event
  2. I saw --host $$HOSTNAME need to check what is the actual value of this option, also needs to consider there is ENV SE_BIND_HOST with default value false, it passes value to the option --bind-host

@gitissuepost
Copy link
Author

The Yaml file I had taken from docker-compose-v3-full-grid-swarm.yml
I have added the deployment details to this

@VietND96
Copy link
Member

VietND96 commented Jan 4, 2024

Ah ok, I saw you already attached AWS - Swarm Worker Node Log.
Can you also attach Hub log together?

@gitissuepost
Copy link
Author

I see it's working fine when being configured in Amazon Linux AMI, but was getting blocked in RHEL AMI only. Not sure if there is any restriction in the custom RHEL AMI we have. The instances have been terminated as we have migrated the grid arch into Amazon Linux. I will configure RHEL swarm again and will share the hub log. For time being, we can close this ticket as it may take some time for me to setup the RHEL swarm

@gitissuepost
Copy link
Author

gitissuepost commented Jan 10, 2024

@VietND96 - It re-appeared.. latest hub log is available here. The latest node log has been updated in the gist AWS - Swarm Worker Node Log

@diemol
Copy link
Member

diemol commented Jan 10, 2024

So it is failing again with your RHEL AMI?

@gitissuepost
Copy link
Author

It’s failing for RHEL AMI. Also, it is failing on CentOS virtual machine using VirtualBox

@diemol
Copy link
Member

diemol commented Jan 10, 2024

Then you should research how to enable the traffic properly in those OS versions, because there is not much we can change for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants