-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
standalone-chrome-debug hangs because DBUS_SESSION_BUS_ADDRESS is lost with sudo #358
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
Comments
+1 for this issue. I was hitting #87 repeatedly even after the fix seemed to have been merged. Thanks @Sovetnikov for finding the root cause. I've made an attempt to fix this issue in #381. |
Add DBUS_SESSION_BUS_ADDRESS to /etc/environment (Fixes #358)
…rsion args WIP on firefox-: 46: 46: Updated makefile, generate.sh scripts, and Dockerfile.txt so that maintianer is supplied in one place. Updated config to be 2x compatible. Updated Makefile with new name of fl-selenium Updated generate to take namespace as argument. Changed firefox version to 46.0.1 and selenium version to 2.53.1 3 hours ago Added selenium version args updated usage example 12 hours ago Some fixes...sort of working Finished build scripts (for now) Improved build.sh Added build script Added selenium version args yesterday Merge pull request SeleniumHQ#394 from wheleph/master 2 days ago edit dockerfiletxt for SeleniumHQ#386 Merge pull request SeleniumHQ#386 from a-k-g/add-dbus-to-etc-environment update to selenium v3.1.0 4 days ago Add comment about time units used in environment variables 6 days ago Set proper GRID TIMEOUT value Add DBUS_SESSION_BUS_ADDRESS to /etc/environment (Fixes SeleniumHQ#358) a week ago update chromedriver/geckodriver. closes SeleniumHQ#384 Updated ChromeDriver to latest (2017-02-06; v2.27) Merge pull request SeleniumHQ#377 from alexgibson/firefox-51 2 weeks ago Update NodeFirefox to use 51.0.1 Merge pull request SeleniumHQ#374 from ryneeverett/tighten-readme Fix heading hierarchy consistency. Delete unnecessary code blocks. Merge branch 'master' of github.com:seleniumhq/docker-selenium 3 weeks ago add TZ to Base image to propegate to all. default timezone to UTC rather than US/Pacific. closes SeleniumHQ#70; fermium release Merge pull request SeleniumHQ#366 from atlassian/geckodriver-v0.13.0 erbium release ignore iml files Upgrade to firefox 50.1.0, geckodriver v0.13.0 Updated makefile, generate.sh scripts, and Dockerfile.txt so that maintianer is supplied in one place.
…n args WIP on firefox-: 46: 46: Updated makefile, generate.sh scripts, and Dockerfile.txt so that maintianer is supplied in one place. Updated config to be 2x compatible. Updated Makefile with new name of fl-selenium Updated generate to take namespace as argument. Changed firefox version to 46.0.1 and selenium version to 2.53.1 3 hours ago Added selenium version args updated usage example 12 hours ago Some fixes...sort of working Finished build scripts (for now) Improved build.sh Added build script Added selenium version args yesterday Merge pull request SeleniumHQ#394 from wheleph/master 2 days ago edit dockerfiletxt for SeleniumHQ#386 Merge pull request SeleniumHQ#386 from a-k-g/add-dbus-to-etc-environment update to selenium v3.1.0 4 days ago Add comment about time units used in environment variables 6 days ago Set proper GRID TIMEOUT value Add DBUS_SESSION_BUS_ADDRESS to /etc/environment (Fixes SeleniumHQ#358) a week ago update chromedriver/geckodriver. closes SeleniumHQ#384 Updated ChromeDriver to latest (2017-02-06; v2.27) Merge pull request SeleniumHQ#377 from alexgibson/firefox-51 2 weeks ago Update NodeFirefox to use 51.0.1 Merge pull request SeleniumHQ#374 from ryneeverett/tighten-readme Fix heading hierarchy consistency. Delete unnecessary code blocks. Merge branch 'master' of github.com:seleniumhq/docker-selenium 3 weeks ago add TZ to Base image to propegate to all. default timezone to UTC rather than US/Pacific. closes SeleniumHQ#70; fermium release Merge pull request SeleniumHQ#366 from atlassian/geckodriver-v0.13.0 erbium release ignore iml files Upgrade to firefox 50.1.0, geckodriver v0.13.0 Updated makefile, generate.sh scripts, and Dockerfile.txt so that maintianer is supplied in one place.
6 months later this issue still exists |
How can we reproduce it with the latest images @Sovetnikov? Can you please provide a script that we can use? |
As in initial issue description: Two weeks ago i made update to 3.4.0-dysprosium image and again getting timeouts on new selenium sessions. |
3.1.0-astatine works fine: |
Two lines in custom Dockerfile fixed it for my: |
If I do this:
But if I do this:
The processes in the container are not running as |
Can you see DBUS_SESSION_BUS_ADDRESS in your output? I'm not ... this is a problem But this command shows that DBUS_SESSION_BUS_ADDRESS is NOT in env anymore with latest docker image: docker run --rm selenium/standalone-chrome sudo -E -i -u seluser env | grep DBUS About root... you can see that i'm aware of seluser and running test with sudo -u seluser |
The When I do What I see for all containers is that the That is why I was asking for a script (Selenium code running a test), that I could execute and reproduce the issue of getting timeouts when asking for a new session. Perhaps we need to improve something else. |
This issue about debug image that runs selenium with sudo: Seems that initial issue was fixed in selenium/standalone-chrome image and it passed to debug image. |
I think I found the problem, but please help me check... Try the same command you tried in the previous command, but using the tag I think we made a mistake when we put the tag to the most recent images. That is why you might see something different, I created #508 |
this command returns empty result on clean server without pulled earlier selenium images: docker run --rm selenium/standalone-chrome:3.4.0-dysprosium sudo -E -i -u seluser env | grep DBUS |
@Sovetnikov, for that, I wrote this comment. So, maybe you can help us to reproduce the issue as I mentioned in the last part of the comment?
|
Just read my first message about this issue, all as described there. Just add: |
@Sovetnikov if you want, try your hand at a pull request and we'll review! |
When selenium is started via "sudo -E -i seluser" on -debug standalone, DBUS_SESSION_BUS_ADDRESS=/dev/null variable is lost and chrome hangs periodically on startup.
Just test it:
root:# docker run --rm selenium/standalone-chrome-debug env | grep DBUS
DBUS_SESSION_BUS_ADDRESS=/dev/null
root:# docker run --rm selenium/standalone-chrome-debug sudo -E -i -u seluser env | grep DBUS
Please fix this in entry_point.sh by adding "sudo -E -i seluser DBUS_SESSION_BUS_ADDRESS=/dev/null"
It's very annoying bug.
https://github.com/SeleniumHQ/docker-selenium/blob/aabd14c0b8bebdef1e492ffde927b7815ee2b19a/StandaloneDebug/entry_point.sh
The text was updated successfully, but these errors were encountered: