-
-
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]: Docker Container stuck at Started Selenium Standalone 4.4.0 #1677
Comments
@NicoCaldo, 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! |
requirements.txt is pretty simple as it contains only two lines
I'm running Ubuntu on a Virtual Machine on VMWare with 8Gb and quad-core.
Also, I'm using Adding I've also noticed that if I let run enough time the container, it rise the following error
|
@NicoCaldo I just tried on GitPod (x86_64 with the following docker-compose) and I got the screenshot:
Can you check without requirements.txt? |
Switched |
I'm trying to think of other things to cut out in order to simplify. What if you do try launching from the native terminal instead of VSCode? Also, is this VSCode inside the Ubuntu VM or VSCode on the host? When I launched docker compose I did so from within the VMs. Does the Ubuntu VM have a GUI? I had tried with Ubuntu LXDE desktop. |
I've tried to launch it from the native terminal using I think it could be some network configuration within Docker or the VM given the error I'll try to run the same config within Windows 10 Is there some kind of log I can share of the Selenium Grid execution? |
On another note, I've seen that the code
seems to not create any volumes. I've also tried to launch |
Can you ssh into the container and You mentioned you suspected the network. Can you change the network mode from bridged to shared or shared to NAT and see if that yields different results? Also, what do you think about creating an Ubuntu VM with VirtualBox or UTM? I use UTM and was running Debian 11.3. Also, GitPod runs Ubuntu 22.04. Even if you want or need to run VMware, we might learn something helpful by attempting to run the services via other platforms. |
Observing the same. Nothing appears in logs. Nevertheless, sessions are queued but not started. Chromedriver seems not to be spawned. After some minutes, selenium server returns timeout and remote python client receives no clue but a stacktrace from Java which says nothing meaninful (just blocked in addToQueue method). Selenium server 4.4.0, chromedriver 105.0.595.19, inside a docker container, using selenium/standalone-chrome latest, beta and dev images. But linux x86-64 arch. |
Does this happen with older versions of Selenium or just 4.4.0? Anything else you can think of that would help me replicate the issue? |
I've tried on another VM on VMware running 20.04.5 LTS with Gnome 3.36.8, Docker 20.10.18 build b40c2f6 and VSC 1.71.2 and everything went smooth. Bridge connection as well |
That seems to support your thoughts that it's some kind of network problem. In the meantime, are you able to operate with that VM instead of the one where it wasn't working? |
yeah definitely! Still troubleshooting the one that is not working maybe we can find why EDIT For some strange reason now it worked on the other VM as well. The only thing I have done has been to uninstall AppArmor with Then I restarted the machine and built again the container with Some issues with AppArmor? |
Just disabled
Hey, thanks a lot for contacting. Checked the comment below mine, checked whether it was an AppArmor issue, disabled it and now it works. At least in my case that seemed to be the root cause! |
I can confirm I had same issues, disabled AppArmor and now selenium server works fine. |
Ok. Looks like you both found the cause. I'm not sure what, if any, security implications you might be facing for completely disabling AppArmor, but Docker maintains some documentation on AppArmor Security Profiles for Docker if you want to dig into this more to ensure you balance security with usability. |
I think the best solution at this point is to disable AppArmour for the selenium-standalone Docker container or to disbale for Docker itself. I'll look into it In any case, there's to understand why AppArmour interfere with this type of container or Docker itself |
Since it sounds like the issue is with AppArmor interfering with Docker, and not an issue with docker-selenium specifically, I'll close this issue. But please so come back if you face other issues. |
This has been plaguing my life. AppArmor is required by snapd. I'm stuck. |
@hopeseekr Lots of folks have said Selenium and WebDrivers don't play nice with tools using snapd. Are there alternatives you can use? |
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'm trying to use Selenium inside a Docker container but after running the docker container the console stays stuck at
INFO [Standalone.execute] - Started Selenium Standalone 4.4.0 (revision e5c75ed026a): http://172.18.0.2:4444
How can we reproduce the issue?
The configuration is pretty simple as I'm trying to just take a screenshot of the web page. My files are
docker-compose.yml
Dockerfile
python app
Relevant log output
Operating System
Ubuntu 22.04.1 LTS
Selenium version
Python 4.4.3
What are the browser(s) and version(s) where you see this issue?
Chrome v.105.0
What are the browser driver(s) and version(s) where you see this issue?
selenium/standalone-chrome
Are you using Selenium Grid?
4.4.0
The text was updated successfully, but these errors were encountered: