0

I have this docker-compose.yml file from here that I am using to open selenium hub and node on mac OS . I changed host port to 65299 , as I got error that 4444 is being used. I have docker desktop 3.5.1 installed

 version: "3"
services:
  selenium-hub:
    image: selenium/hub
    container_name: selenium-hub
    ports:
      - "65299:4444"

  chrome:
    image: selenium/node-chrome
    depends_on:
      - selenium-hub
    environment:
      - HUB_HOST=selenium-hub
      - HUB_PORT=65299


  firefox:
    image: selenium/node-firefox
    depends_on:
      - selenium-hub
    environment:
      - HUB_HOST=selenium-hub
      - HUB_PORT=65299

When I look here - http://localhost:65299/grid/console , I dont see any node registered

Also, on terminal I get this

firefox_1       | 20:27:22.110 INFO [SelfRegisteringRemote$1.run] - Couldn't register this node: The hub is down or not responding: Failed to connect to selenium-hub/172.26.0.2:65299

Also , in logs it says

 Nodes should register to http://172.27.0.2:4444/grid/register/

so why is system even trying 172.26.0.2:65299 or may be I am missing something here ?

1 Answer 1

1

The HUB_PORT variable of nodes are wrong. 65299 port is the port for accessing hub from outside of docker network. For example you are using this port the access hub from browser.

You need to set 4444 to that variable. That port available to docker network. So nodes can connect hub.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks. That was it. HUB_PORT is hub container port (4444) that is mapped to 65299

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.