SeleniumHQ / SeleniumHQ/docker-selenium

Unable to Register Node when dployed on Docker Swarm on AWS

Open
#2,082 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

R-awaiting-answer
Dominant language
Go
Stars
8.7k
Forks
2.5k
Avg merge
10h 16m
Merged PRs (30d)
20

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the supplied Docker Swarm compose file and AWS worker-node log, focusing on the node’s event-bus settings and the reported shm_size warning. Reproduce the deployment if possible and establish whether the node registers with the hub; done means the registration failure is explained and the warning is addressed or documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, docker
Domain
devops, distributed-systems, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.