We are using a docker-compose file for creating a selenium grid network and after upgrading to selenium grid version 4.0.0 we have found that the grid is not registering to the node.
In this case, we are always receiving the below error.
chrome_1 | 12:18:47.180 INFO [SelfRegisteringRemote$1.run] - Couldn't register this node: The hub is down or not responding: The hub responded with 404
We tried to revert back to the previous version and found that it is working fine. Can you help us identify why it is not working in Selenium Grid 4? Is there any additional settings required to be done? We tried to find in the Selenium Grid 4 official page, but couldn't find much.
Attaching docker-compose file for reference
version: '3.8'
services:
selenium:
image: selenium/hub
ports:
- 4444:4444
environment:
GRID_MAX_SESSION: 10
chrome:
image: selenium/node-chrome-debug
shm_size: 2gb
depends_on:
- selenium
environment:
- HUB_HOST=selenium
- NODE_MAX_INSTANCES=10
- NODE_MAX_SESSION=10
ports:
- 5901:5900
CodePudding user response:
You need to read the following about all the changes to the grid at the following link: Docker images for the Selenium Grid Server
Your docker-compose.yml file based on the above will now be:
version: '3.8'
services:
selenium:
image: selenium/hub
ports:
- 4442:4442
- 4443:4443
- 4444:4444
chrome:
image: selenium/node-chrome-debug
shm_size: 2gb
depends_on:
- selenium
environment:
- SE_EVENT_BUS_HOST=selenium
- SE_EVENT_BUS_PUBLISH_PORT=4442
- SE_EVENT_BUS_SUBSCRIBE_PORT=4443
- SE_NODE_OVERRIDE_MAX_SESSIONS=true
- SE_NODE_MAX_SESSIONS=10
ports:
- 5901:5900
However, you need to read the full details from the link to ensure you have the correct setup