Skip to content

[🐛 Bug]: Using Healthchecks to monitor nodes causes "Binding additional locator mechanisms: relative" #2705

Open
@vcc-ehemdal

Description

@vcc-ehemdal

What happened?

We added basic healthchecks since we've been experiencing issues with Selenium lately.

The healthchecks added on the node

healthcheck:
  test: ["CMD", "/opt/bin/check-grid.sh", "--host", "selenium-hub"]
  start_period: 30s
  interval: 15s
  timeout: 5s
  retries: 4

With the healthcheck we get issues with connectivity (or something) between the node and hub.

Without the healthcheck everything works as expected.

What could cause this issue?

The setup is three machines connected on a docker stack deployed with

docker stack deploy -c docker-compose.yml grid --detach=true

Running docker exec NODE_ID /opt/bin/check-grid.sh --host selenium-hub works.

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

services:
  chrome:
    image: selenium/node-chrome:134.0
    shm_size: 2gb
    depends_on:
      - selenium-hub
    environment:
      - SE_EVENT_BUS_HOST=selenium-hub
      - SE_EVENT_BUS_PUBLISH_PORT=4442
      - SE_EVENT_BUS_SUBSCRIBE_PORT=4443
      - SE_VNC_NO_PASSWORD=true
      - SE_BROWSER_ARGS_DISABLE_SEARCH_ENGINE=--disable-search-engine-choice-screen
      - SE_BROWSER_ARGS_DISABLE_SHM=--disable-dev-shm-usage
      - SE_BROWSER_ARGS_START_MAXIMIZED=--start-maximized
      - SE_BROWSER_ARGS_DISABLE_BREAKPAD=--disable-breakpad
    deploy:
      replicas: 15
      restart_policy:
        condition: any
      placement:
        max_replicas_per_node: 5
      resources:
        limits:
          memory: 2000M
    healthcheck:
      test: ["CMD", "/opt/bin/check-grid.sh", "--host", "selenium-hub"]
      start_period: 30s
      interval: 15s
      timeout: 5s
      retries: 4
    entrypoint: bash -c 'SE_OPTS="--host $$HOSTNAME" /opt/bin/entry_point.sh'

  selenium-hub:
    image: selenium/hub:4.29
    ports:
      - "4442:4442"
      - "4443:4443"
      - "8080:4444"
    deploy:
      replicas: 1
      restart_policy:
        condition: any

Relevant log output

2025-03-11 18:37:13,099 INFO Included extra file "/etc/supervisor/conf.d/selenium-grid-hub.conf" during parsing
2025-03-11 18:37:13,102 INFO RPC interface 'supervisor' initialized
2025-03-11 18:37:13,102 INFO supervisord started with pid 8
2025-03-11 18:37:14,105 INFO spawned: 'selenium-grid-hub' with pid 9
Starting Selenium Grid Hub...
2025-03-11 18:37:14,109 INFO success: selenium-grid-hub entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
Appending Selenium option: --port 4444
Appending Selenium option: --log-level INFO
Appending Selenium option: --http-logs false
Appending Selenium option: --structured-logs false
Appending Selenium option: --reject-unsupported-caps false
Appending Selenium option: --session-request-timeout 300
Appending Selenium option: --session-retry-interval 15
Appending Selenium option: --healthcheck-interval 120
Appending Selenium option: --relax-checks true
Appending Selenium option: --bind-host false
Appending Selenium option: --config /opt/selenium/config.toml
Appending Selenium option: --tracing false
Tracing is disabled
Using JAVA_OPTS: -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/opt/selenium/logs  -Dwebdriver.remote.enableTracing=false -Dwebdriver.httpclient.version=HTTP_1_1
18:37:14.488 INFO [LoggingOptions.configureLogEncoding] - Using the system default encoding
18:37:14.492 INFO [LoggingOptions.getTracer] - Using null tracer
18:37:14.524 INFO [BoundZmqEventBus.<init>] - XPUB binding to [binding to tcp://*:4442, advertising as tcp://10.0.2.118:4442], XSUB binding to [binding to tcp://*:4443, advertising as tcp://10.0.2.118:4443]
18:37:14.571 INFO [UnboundZmqEventBus.<init>] - Connecting to tcp://10.0.2.118:4442 and tcp://10.0.2.118:4443
18:37:14.585 INFO [UnboundZmqEventBus.<init>] - Sockets created
18:37:15.586 INFO [UnboundZmqEventBus.<init>] - Event bus ready
18:37:16.140 INFO [Hub.execute] - Started Selenium Hub 4.29.0 (revision 18ae989): http://10.0.2.118:4444
18:37:18.971 INFO [Node.<init>] - Binding additional locator mechanisms: relative
18:37:19.342 INFO [Node.<init>] - Binding additional locator mechanisms: relative
18:37:19.413 INFO [Node.<init>] - Binding additional locator mechanisms: relative
18:37:19.484 INFO [Node.<init>] - Binding additional locator mechanisms: relative
18:37:19.551 INFO [Node.<init>] - Binding additional locator mechanisms: relative
---SNIP---

Operating System

Ubuntu 24.04 with Docker CE 28.0.1

Docker Selenium version (image tag)

4.29

Selenium Grid chart version (chart version)

No response

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions