Closed nidhintleo closed 1 month ago
@nidhintleo, thank you for creating this issue. We will troubleshoot it as soon as we can.
Triage this issue by using labels.
If information is missing, add a helpful comment and then I-issue-template
label.
If the issue is a question, add the I-question
label.
If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted
label.
If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C),
add the applicable G-*
label, and it will provide the correct link and auto-close the
issue.
After troubleshooting the issue, please add the R-awaiting answer
label.
Thank you!
But that error comes directly from your host environment. The container cannot start because the ports are busy. What have you checked to troubleshoot that?
@diemol in my setup it will spin up only 8 containers maximum at a time but there is lot of free ports, even if the targeting port is used then why it is not find an other free port.?
Does this happen in every host you try? Does it also happen if you launch any other type of container that binds to a port?
@diemol
I have four nodes. One node has the Selenium Hub, and the remaining three nodes have Selenium nodes (selenium/node-docker:4.20.0-20240425). These setups are with Kubernetes. Additionally, the same three worker nodes have Docker installed, and the browser containers are started by the Docker engine.
The Selenium node refers to the config.toml file to get the Docker daemon URL and the browser image. Below is the configuration:
config.toml
[docker]
configs = [ "selenium/standalone-firefox:4.20.0-20240425", '{"browserName": "firefox", "platformName": "linux"}', "selenium/standalone-chrome:4.20.0-20240425", '{"browserName": "chrome", "platformName": "linux"}', "selenium/standalone-edge:4.20.0-20240425", '{"browserName": "MicrosoftEdge", "platformName": "linux"}' ]
url = "http://172.17.0.1:2375"
video-image = "selenium/video:latest" assets-path = "/opt/selenium/assets"
from this three machines am getting the same port conflict issues randomly. there is no other services are running on this nodes, also these nodes have 8vcpu and 32gb memory.
The issue have there is no port conflict patterns or a specific port range.
"Does it also happen if you launch any other type of container that binds to a port? "
No, if i start any other containers manually the docker will allot any free port to that containers the issue is getting only with the selenium.
Wait, are you using Dynamic Grid inside Kubernetes?
@diemol
My application is running on Kubernetes so my selenium hub, Selenium nodes are in Kubernetes but both are static it is not scaling dynamically. only the browser containers are dynamic.
No, then why do you have these configs:
video-image = "selenium/video:latest"
assets-path = "/opt/selenium/assets"
url = "http://172.17.0.1:2375/"
That is for Dynamic Grid.
That's right, we are using this config but the hub and nodes are on kubernetes and the browsers are spinning with docker.
So you are using Dynamic Grid on k8s, which we do not support. We recommend using the Keda integration seen in the Helm chart.
@diemol
means this session not created issue is due to we are using Dynamic grid on k8s right ?
It means that we do not know how Dynamic Grid will behave in Kubernetes, which is why we offer the Keda integration with the helm chart.
I am closing this because there is no action item for us.
This issue has been automatically locked since there has not been any recent activity since it was closed. Please open a new issue for related bugs.
What happened?
I have a test automation setup with selenium in k8s version v1.28.3 and Have a Selenium hub(selenium/hub:4.20.0-20240425) , selenium node (selenium/node-docker:4.20.0-20240425) and when a test the hub send request to selenium node to spin up a browser container (selenium/standalone-chrome:4.20.0-20240425) by communicating with the docker daemon by using the config.toml file of selenium node.
i have already tried with new version of chrome image (126) but the issue is still there.
the tests will work smoothly but my issue is some times i got below error for random test cases
message": "Could not start a new session. Could not start a new session. Unable to start container: 1f3a8280424b0d3e23216b0d3be9059732ee5e7f096b04439611694099cbf9bc\ndriver failed programming external connectivity on endpoint optimistic_curie (89fffaa21818af9547dcae3b2b2e822769b5efcc02ead9008c9084821600acb1): failed to bind port 0.0.0.0:7946\u002ftcp: Error starting userland proxy: listen tcp4 0.0.0.0:7946: bind: address already in use \nHost info: host: 'node-docker1-6d6f5dc48-kgps7', ip: '10.233.125.187'\nBuild info: version: '4.20.0', revision: '866c76ca80'\nSystem info: os.name: 'Linux', os.arch: 'amd64', os.version: '5.15.0-113-generic', java.version: '17.0.11'\nDriver info: driver.version: unknown\nBuild info: version: '4.20.0', revision: '866c76ca80'\nSystem info: os.name: 'Linux', os.arch: 'amd64', os.version: '5.15.0-113-generic', java.version: '17.0.11'\nDriver info: driver.version: unknown"
the docker version is 27.0.3
in my knowledge the docker will pick a random free port to avoid conflicts then why its not picking the used port.? and how to fix this issue.?
How can we reproduce the issue?
Relevant log output
Operating System
Ubuntu 22.04
Selenium version
4.20
What are the browser(s) and version(s) where you see this issue?
selenium/standalone-chrome:4.20.0-20240425
What are the browser driver(s) and version(s) where you see this issue?
ChromeDriver 124.0.6367.78, Google Chrome 124.0.6367.78
Are you using Selenium Grid?
selenium/hub:4.20.0-20240425