Selenium-Jupiter 2.1.0最低Docker版本要求及容器未找到问题咨询
Let’s work through your problems with practical fixes and clarity:
1. Resolving the ContainerNotFoundException
The error Container not found: c222d04fa9726606939b34... usually pops up when Selenium-Jupiter tries to interact with a Docker container that’s no longer present—either it was cleaned up by a prior test, deleted manually, or the Docker daemon lost track of its state. Here’s what to try:
- Check the container’s status: Run
docker ps -ato see if the container IDc222d04fa9726606939b34...exists. If it doesn’t, clear all stopped containers withdocker rm $(docker ps -aq)to eliminate stale references, then re-run your test. - Restart the Docker daemon: Sometimes Docker gets into an inconsistent state. Restart it (e.g.,
sudo systemctl restart dockeron Linux, or restart Docker Desktop on Windows/macOS) and retry the Gradle build. - Disable test parallelization: If your Gradle tests run in parallel, this can cause conflicts in container management. Temporarily set
maxParallelForks = 1in yourbuild.gradleto rule out parallel execution as the culprit. - Verify Docker permissions: Make sure your user has proper access to the Docker daemon (e.g., is part of the
dockergroup on Linux). Missing permissions can block Selenium-Jupiter from creating or tracking containers correctly.
2. Minimum Docker Version for Selenium-Jupiter 2.1.0
According to the official docs for Selenium-Jupiter 2.1.0, the minimum required Docker version is 1.12+—which aligns exactly with your Docker API version 1.24 (Docker 1.12 uses API 1.24). So your Docker setup meets the minimum requirement, meaning the container error isn’t caused by a version mismatch.
That said, Selenium-Jupiter 2.1.0 is a fairly old release (from 2018). Many Docker-related bugs and compatibility improvements have been added in newer 3.x and 4.x versions. If possible, consider upgrading Selenium-Jupiter to a more recent build—most 3.x versions should work fine with Gradle 4.6.
内容的提问来源于stack exchange,提问作者jhoglin

