-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Description
What happened?
I have to use a poverty spec machine so need to conserve resources. I do not need VNC so I want to disable that to save memory etc. I set the following environment variables:
SE_START_VNC=false
SE_START_NO_VNC=false
This does seem to disable VNC in the sense that I can longer connect using my VNC client. However if I look at the Selenium Grid web UI at http://localhost:4444/ui/# this doesn't appear to reflect this properly.
Hovering over the '1' icon for my Chrome Node I can see the following:
{"browserName":"chrome","browserVersion":"127.0","goog:chromeOptions":{"binary":"/usr/bin/google-chrome"},"platformName":"linux","se:containerName":"","se:noVncPort":7900,"se:vncEnabled":true}
Why is it saying "se:vncEnabled":true
? And also why is it saying "se:noVncPort":7900
for that matter?
Furthermore if I go to the sessions page (http://localhost:4444/ui/#/sessions) then I can see a camera/video icon next to my session to launch the VNC viewer. If I click this it doesn't work but I would expect that this icon/button should not be there at all.
Have I managed to disable VNC or not? Am I saving resources or not? Do I need to set START_VNC and START__NO_VNC too? Its just unclear and doesn't fill me with confidence that it is doing what I want it to.
As well as the variables above do I also need to set SE_START_XVFB=false? If I do then I get catastrophic issues so assume not.
Command used to start Selenium Grid with Docker (or Kubernetes)
# To execute this docker-compose yml file use `docker-compose -f docker-compose.yml up`
# Add the `-d` flag at the end for detached execution
# To stop the execution, hit Ctrl+C, and then `docker-compose -f docker-compose.yml down`
version: "3"
services:
chrome:
image: selenium/node-chrome:4.23.0-20240727
container_name: chrome-node
shm_size: 2gb
privileged: true
depends_on:
- selenium-hub
environment:
- HUB_HOST=selenium-hub
- SE_EVENT_BUS_HOST=selenium-hub
- SE_START_VNC=false
- SE_START_NO_VNC=false
- SE_EVENT_BUS_PUBLISH_PORT=4442
- SE_EVENT_BUS_SUBSCRIBE_PORT=4443
- SE_NODE_MAX_SESSIONS=1
- SE_NODE_GRID_URL=http://localhost:4444
- SE_NODE_SESSION_TIMEOUT=180
ports:
- "6900:5900"
networks:
- selenium_grid_internal
chrome_video:
image: selenium/video:ffmpeg-7.0.1-20240727
container_name: chrome-video
privileged: true
volumes:
- ${VIDEOS_DIRECTORY:-./videos}:/videos
depends_on:
- chrome
environment:
- DISPLAY_CONTAINER_NAME=chrome
- FILE_NAME=chrome_video.mp4
networks:
- selenium_grid_internal
selenium-hub:
image: selenium/hub:4.23.0-20240727
privileged: true
container_name: selenium-hub
hostname: selenium-hub
ports:
- "4442:4442"
- "4443:4443"
- "4444:4444"
environment:
- GRID_TIMEOUT=120000
- GRID_BROWSER_TIMEOUT=120000
networks:
- selenium_grid_internal
networks:
selenium_grid_internal:
Relevant log output
2024-12-10 19:14:29,438 INFO spawned: 'vnc' with pid 1412
2024-12-10 19:14:29,439 INFO spawned: 'novnc' with pid 1413
2024-12-10 19:14:29,441 WARN exited: vnc (exit status 0; not expected)
2024-12-10 19:14:29,442 WARN exited: novnc (exit status 0; not expected)
2024-12-10 19:14:32,446 INFO spawned: 'vnc' with pid 1425
2024-12-10 19:14:32,447 INFO spawned: 'novnc' with pid 1426
2024-12-10 19:14:32,449 WARN exited: vnc (exit status 0; not expected)
2024-12-10 19:14:32,449 INFO gave up: vnc entered FATAL state, too many start retries too quickly
2024-12-10 19:14:32,450 WARN exited: novnc (exit status 0; not expected)
2024-12-10 19:14:33,451 INFO gave up: novnc entered FATAL state, too many start retries too quickly
Operating System
Ubuntu 20.04
Docker Selenium version (image tag)
4.23.0-20240727
Selenium Grid chart version (chart version)
No response