-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[🐛 Bug]: I can't mount the volume in dynamic gird for browser node #2143
Comments
@barkep, thank you for creating this issue. We will troubleshoot it as soon as we can. Info for maintainersTriage this issue by using labels.
If information is missing, add a helpful comment and then
If the issue is a question, add the
If the issue is valid but there is no time to troubleshoot it, consider adding the
If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C),
add the applicable
After troubleshooting the issue, please add the Thank you! |
Yes. It is the same. Why do you need this? |
I've already tried setting "devices" and "volumes" in toml and it doesn't work. Maybe I'm configuring something wrong. Below is an example of the code from the test and the stacktrace I get.
|
I don't know if you had a look at the linked issue, but it is not possible to mount volumes to the child containers. I would like to better understand your use case. There is probably an alternative way of doing it. |
This change is part of the upstream repo: SeleniumHQ/selenium#13804, a trick can help in this case, based on a generic way to share the node-docker container The configuration looks like
[node]
max-sessions = 2
[docker]
configs = [
"selenium/standalone-chrome:nightly", '{"browserName": "chrome"}'
]
url = "http://127.0.0.1:2375/"
video-image = "selenium/video:ffmpeg-7.0-nightly"
host-config-keys = ["Binds"]
version: "3"
services:
node-docker:
image: selenium/node-docker:nightly
volumes:
- ./assets:/opt/selenium/assets
- ./attachments:/opt/selenium/attachments
- ./config.toml:/opt/bin/config.toml
- /var/run/docker.sock:/var/run/docker.sock
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=1
selenium-hub:
image: selenium/hub:nightly
container_name: selenium-hub
ports:
- "4442:4442"
- "4443:4443"
- "4444:4444" With that config, host path |
When i use this configuration i get a WebDriverCurlException
Prior to that it usually failed after 47 secs., because it can't find the file it's looking for.
version: "3.7"
services:
chrome:
image: selenium/node-docker:latest
volumes:
- "/root/docker/ImportDateinenSeleniumGrid:/home/seluser/ImportDateinenSeleniumGrid"
- sel-imp-dat:/home/seluser/
- ./config.toml:/opt/bin/config.toml
- /var/run/docker.sock:/var/run/docker.sock
shm_size: '2gb'
depends_on:
- selenium-hub
environment:
- SE_VNC_NO_PASSWORD=1
- SE_EVENT_BUS_HOST=selenium-hub
- SE_EVENT_BUS_PUBLISH_PORT=4442
- SE_EVENT_BUS_SUBSCRIBE_PORT=4443
- SE_NODE_MAX_SESSIONS=4
- SE_START_VNC=true
ports:
- "7900:7900"
selenium-hub:
image: selenium/hub:latest
container_name: selenium-hub
environment:
ports:
- "4442:4442"
- "4443:4443"
- "4444:4444"
volumes:
sel-imp-dat:
external: true
[node]
max-sessions = 4
[docker]
configs = [
"selenium/standalone-chrome:nightly", '{"browserName": "chrome"}'
]
url = "http://127.0.0.1:2375/"
video-image = "selenium/video:ffmpeg-7.0-nightly"
host-config-keys = ["Binds"] Also interesting is => I started only one Test and there are 2 nodes created |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
What happened?
I am setting up an environment for selenium grid. I want to use selenium dynamic grid.
My test case is loading an attachment on a web page.
I tried to attach the volume in docker compose, but the attachments are only visible in node docker. Not in dynamically created browser containers.
I also tried using the configuration in config.toml and it still doesn't work:
[node]
max-sessions = 2
[docker]
configs = [
"selenium/standalone-chrome:4.18.0", "{"browserName": "chrome"}"
]
url = "http://127.0.0.1:2375"
video-image = "selenium/video:ffmpeg-6.1-20231219"
volumes = ["path_on_disk:/opt/selenium/attachments"]
Command used to start Selenium Grid with Docker (or Kubernetes)
Relevant log output
.
Operating System
Windows 11
Docker Selenium version (image tag)
4.18.0
Selenium Grid chart version (chart version)
No response
The text was updated successfully, but these errors were encountered: