SeleniumHQ / SeleniumHQ/docker-selenium
[🐛 Bug]: Dynamic Selenium Grid is not working on Podman
Open
Nobody has claimed this yet.
R-awaiting-answer
- Dominant language
- Go
- Stars
- 8.7k
- Forks
- 2.5k
- Avg merge
- 10h 16m
- Merged PRs (30d)
- 20
Description
What happened?
The selenium hub and node shows up and running but when a UI test case is executed it shows error in logs
Command used to start Selenium Grid with Docker (or Kubernetes)
---- Docker File
FROM selenium/node-docker:4.9.1-20230508
### Subsequent Arguments
ARG UID \
GID \
mount_home
### Run as root
USER root
ENV mount_home=${mount_home}
### Change Root password
RUN mkdir -p /home/app \
&& echo "root:root123" | chpasswd \
### Create app user/group
&& groupadd --gid ${GID} app \
&& mkdir -m 777 -p /ext \
&& mkdir -m 777 -p /ext/app \
&& useradd -d /ext/app -m -s /bin/bash app --uid ${UID} --gid ${GID} \
&& echo "app:app" | chpasswd \
&& chown -R app:app /opt \
&& groupadd -g ${GID} appgroup || true
USER app
-----------------------
Docker run commands
podman run -d --name selenium-hub --network psnet -p 4444:4444 -p 4442:4442 -p 4443:4443 --user 1001:1001 -v selenium:/selenium:rw -v selenium/assets:/opt/selenium/assets:rw -v .selenium:/home/seluser/Downloads goldensource/selenium-hub:4.24.0-20240830
podman run -d --name selenium-node --network psnet --shm-size 2g --user 1001:1001 -e SE_EVENT_BUS_HOST=selenium-hub -e SE_EVENT_BUS_PUBLISH_PORT=4442 -e SE_EVENT_BUS_SUBSCRIBE_PORT=4443 -e mount_home=selenium -e SE_OPTS=--enable-managed-downloads\ true -v selenium:/selenium:rw -v selenium/assets:/opt/selenium/assets:rw -v .selenium:/home/seluser/Downloads -v /var/run/docker.sock:/var/run/docker.sock goldensource/selenium-node:4.24.0-20240830
Relevant log output
04:32:35.096 INFO [DockerSessionFactory.apply] - Waiting for server to start (container id: 60a29e9590740034e5c8e4deb74557a7d6d8081849e94f6a07ac2584d5fbb326, url http://10.89.0.162:4444/wd/hub)
04:32:45.602 INFO [Container.stop] - Stopping container 60a29e9590740034e5c8e4deb74557a7d6d8081849e94f6a07ac2584d5fbb326
04:32:45.604 WARN [DockerMessages.throwIfNecessary] - Unable to stop container: 60a29e9590740034e5c8e4deb74557a7d6d8081849e94f6a07ac2584d5fbb326
no container with name or ID "60a29e9590740034e5c8e4deb74557a7d6d8081849e94f6a07ac2584d5fbb326" found: no such container
04:32:45.604 WARN [Container.stop] - Unable to stop container: Unable to stop container: 60a29e9590740034e5c8e4deb74557a7d6d8081849e94f6a07ac2584d5fbb326
no container with name or ID "60a29e9590740034e5c8e4deb74557a7d6d8081849e94f6a07ac2584d5fbb326" found: no such container
org.openqa.selenium.docker.DockerException: Unable to stop container: 60a29e9590740034e5c8e4deb74557a7d6d8081849e94f6a07ac2584d5fbb326
no container with name or ID "60a29e9590740034e5c8e4deb74557a7d6d8081849e94f6a07ac2584d5fbb326" found: no such container
at org.openqa.selenium.docker.v1_41.DockerMessages.throwIfNecessary(DockerMessages.java:59)
at org.openqa.selenium.docker.v1_41.StopContainer.apply(StopContainer.java:49)
at org.openqa.selenium.docker.v1_41.V141Docker.stopContainer(V141Docker.java:125)
at org.openqa.selenium.docker.Container.stop(Container.java:57)
at org.openqa.selenium.grid.node.docker.DockerSessionFactory.apply(DockerSessionFactory.java:194)
at org.openqa.selenium.grid.node.docker.DockerSessionFactory.apply(DockerSessionFactory.java:90)
at org.openqa.selenium.grid.node.local.SessionSlot.apply(SessionSlot.java:147)
at org.openqa.selenium.grid.node.local.LocalNode.newSession(LocalNode.java:441)
at org.openqa.selenium.grid.node.NewNodeSession.execute(NewNodeSession.java:52)
at org.openqa.selenium.remote.http.Route$TemplatizedRoute.handle(Route.java:192)
at org.openqa.selenium.remote.http.Route.execute(Route.java:68)
at org.openqa.selenium.grid.security.RequiresSecretFilter.lambda$apply$0(RequiresSecretFilter.java:64)
at org.openqa.selenium.remote.tracing.SpanWrappedHttpHandler.execute(SpanWrappedHttpHandler.java:86)
at org.openqa.selenium.remote.http.Filter$1.execute(Filter.java:64)
at org.openqa.selenium.remote.http.Route$CombinedRoute.handle(Route.java:336)
at org.openqa.selenium.remote.http.Route.execute(Route.java:68)
at org.openqa.selenium.grid.node.Node.execute(Node.java:255)
at org.openqa.selenium.remote.http.Route$CombinedRoute.handle(Route.java:336)
at org.openqa.selenium.remote.http.Route.execute(Route.java:68)
at org.openqa.selenium.remote.AddWebDriverSpecHeaders.lambda$apply$0(AddWebDriverSpecHeaders.java:35)
at org.openqa.selenium.remote.ErrorFilter.lambda$apply$0(ErrorFilter.java:44)
at org.openqa.selenium.remote.http.Filter$1.execute(Filter.java:64)
at org.openqa.selenium.remote.ErrorFilter.lambda$apply$0(ErrorFilter.java:44)
at org.openqa.selenium.remote.http.Filter$1.execute(Filter.java:64)
at org.openqa.selenium.netty.server.SeleniumHandler.lambda$channelRead0$0(SeleniumHandler.java:44)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
04:32:45.604 WARN [DockerSessionFactory.apply] - Unable to connect to docker server (container id: 60a29e9590740034e5c8e4deb74557a7d6d8081849e94f6a07ac2584d5fbb326)
04:32:45.604 WARN [SeleniumSpanExporter$1.lambda$export$1] - Unable to connect to docker server. Stopping container: java.net.http.HttpConnectTimeoutException: HTTP connect timed out
Build info: version: '4.9.1', revision: 'eb2032df7f'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '4.18.0-553.58.1.el8_10.x86_64', java.version: '11.0.18'
Driver info: driver.version: unknown ..
Operating System
Redhat Enterprise Linux 8.10(Ootpa) - Fedora
Docker Selenium version (image tag)
4.9.1-20230508
Selenium Grid chart version (chart version)
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the Podman setup using the posted Docker run commands and inspect the DockerSessionFactory, Container.stop, and V141Docker paths shown in the stack trace. Compare the container lifecycle and server connection behavior in the logs; done means a UI session starts and the container can be reached and stopped without the reported errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, java, linux
- Domain
- devops, infrastructure, testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100