Open davidnortonjr opened 7 years ago
Can you also share logs from the /var/logs/supervisor
folder?
Rob - attached. xvfb.log
and tinywm.log
were empty.
@davidnortonjr Sorry it has taken so long for me to respond. I have been unable to reproduce in my stack... Something you could try to help debug would be adding --verbose
to the chromedriver command (you would need to modify /etc/supervisor/conf.d/chromedriver.conf
) and see if you get any additional logging output to indicate what the failure may be.
Example Dockerfile:
FROM robcherry/docker-chromedriver:latest
ADD your-custom-chromedriver.conf /etc/supervisor/conf.d/chromedriver.conf
Then you can run it just like anything else...
docker build -t chromedriver:testing .
docker run --rm --name chromedriver -p 127.0.0.1:4444:4444 -e CHROMEDRIVER_WHITELISTED_IPS='' chromedriver:testing
Let me know if that helps.
Also, what version of WebDriver are you using?
Thanks for that. I got an updated chromedriver.log file which contains more detail.
we're using Polymer Web Component Tester, which uses the Node wd
library.
Hm, what OS and Kernel are you running? Based on your logs it looks like this is your problem:
Failed to move to new namespace: PID namespaces supported, Network namespace supported, but failed: errno = Operation not permitted
I am not experiencing any issues, but I am running Ubuntu Trusty (64-bit) w/ Kernel 3.13.0-71 in a VM. Also not experiencing issues running on CoreOS 1185.5.0 (Stable Channel).
There may be some useful info in this issue https://github.com/jessfraz/dockerfiles/issues/65, or you could attempt to run as a privileged container and see if that fixes the issue.
I also encountered this issue. Running with privileged fixed it. Thanks @RobCherry
@International Could you provide more information about what operating environment you were in when you experienced the issue? I would love to know what triggers it so I can reproduce and try to find a better work-around than running privileged.
Sure, I'm running OSX 10.11.6 El Capitan
. The docker version I'm running is:
Version 1.12.5 (14777) Channel: Stable 3e6f00c1dc
Do you need other program versions?
No, that is good information. I haven't tried with Docker for Mac, so I will have to give it a whirl and see how that impacts the container.
We're running on a Linux host. For a second or so there's a Chrome log at /tmp/.org.chromium.Chromium.*/chrome_debug.log:
root@467d88022e0d:/tmp# tail -F .*/chrome_debug.log [10542:10542:0123/163945:FATAL:zygote_host_impl_linux.cc(107)] No usable sandbox! Update your kernel or see https://chromium.googlesource.com/chromium/src/+/master/docs/linux_suid_sandbox_development.md for more information on developing with the SUID sandbox. If you want to live dangerously and need an immediate workaround, you can try using --no-sandbox.
root@467d88022e0d:/tmp# google-chrome --version
Google Chrome 54.0.2840.59
$ docker inspect -f '{{.Id}}' robcherry/docker-chromedriver
sha256:f7a799398d7e3b545a4ec37d0460d44121626484b209504b3f2bc0fccb7fc82c
Maybe 84d8a7e50c369a5a5a52f6d834bc701b5b03f964 broke it?
What linux host (distro, kernel version, etc)? At the very lease please provide the output of uname -a
.
$ uname -a
Linux runner-f775b9ab-1485857266-60965ead 4.7.3-coreos-r2 #1 SMP Sun Jan 8 00:32:25 UTC 2017 x86_64 Intel(R) Xeon(R) CPU @ 2.50GHz GenuineIntel GNU/Linux
$ cat /etc/os-release
NAME="Container Linux by CoreOS"
ID=coreos
VERSION=1235.6.0
VERSION_ID=1235.6.0
BUILD_ID=2017-01-10-0545
PRETTY_NAME="Container Linux by CoreOS 1235.6.0 (Ladybug)"
ANSI_COLOR="38;5;75"
HOME_URL="https://coreos.com/"
BUG_REPORT_URL="https://github.com/coreos/bugs/issues"
That's the current coreos-stable image on GCE.
Hi all,
having the same issue that Chrome is crashing:
org.openqa.selenium.WebDriverException: unknown error: Chrome failed to start: crashed (Driver info: chromedriver=2.30.477691 (6ee44a7247c639c0703f291d320bdf05c1531b57),platform=Linux 4.9.27-14.33.amzn1.x86_64 x86_64) (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 60.12 seconds Build info: version: '3.4.0', revision: 'unknown', time: 'unknown' System info: host: '4d71782b5c7a', ip: '172.17.0.3', os.name: 'Linux', os.arch: 'amd64', os.version: '4.9.27-14.33.amzn1.x86_64', java.version: '1.8.0_121'
I was trying to access to the chromedriver.conf file but I didn't properly understand how to do it :(
FROM robcherry/docker-chromedriver:latest ADD your-custom-chromedriver.conf /etc/supervisor/conf.d/chromedriver.conf
What should I do with this docker file?
Thanks a lot,
Mattia
You can either create a new image with your own config file, or supply it at runtime. To build the image, using the Dockerfile you pasted:
docker build -t my-docker-chromedriver .
To supply it runtime use the -v flag:
docker run \
-v /path/to/your-custom-chromedriver.conf:/etc/supervisor/conf.d/chromedriver.conf:ro \
robcherry/docker-chromedriver:latest
See docker run and docker build for details.
Same cause:
Failed to move to new namespace: PID namespaces supported, Network namespace supported, but failed: errno = Operation not permitted
Adding --privileged
solved the issue.
Was executing containers without privileges until now, don't understand why I have to consider them now.
Thanks again,
Mattia
OMG... this took a really long time for me to figure out... adding privileged
fixed for me too... Which makes me think what's here that makes this necessary...
If someone wants to test with https://github.com/RobCherry/docker-chromedriver/commit/84d8a7e50c369a5a5a52f6d834bc701b5b03f964 reverted and let me know if it works please let me know and I can revert that change.
Yeah, IIRC the FATAL in that log was why it originally had the --disable-setuid-sandbox
wrapper (the code removed in https://github.com/RobCherry/docker-chromedriver/commit/84d8a7e50c369a5a5a52f6d834bc701b5b03f964).
[964:964:0803/150525.178831:FATAL:zygote_host_impl_linux.cc(107)] No usable sandbox! Update your kernel or see https://chromium.googlesource.com/chromium/src/+/master/docs/linux_suid_sandbox_development.md for more information on developing with the SUID sandbox. If you want to live dangerously and need an immediate workaround, you can try using --no-sandbox.
If anyone is interested in some light reading:
https://bugs.chromium.org/p/chromium/issues/detail?id=598454
https://chromium.googlesource.com/chromium/src/+/lkcr/docs/linux_suid_sandbox_development.md
https://bugs.chromium.org/p/chromium/issues/detail?id=312380
Feel free to figure out what works and submit a pull request.
I found this was only an issue on Mac OS. I tested this on a server running ubuntu 16.04 with the exact same docker files and it worked just fine. I'm guessing its a very weird problem in OSX docker.
I tested this container
and it works fine on OSX. Please note that #13 is required.
Those having issues on MacOS may want to edit /etc/docker/daemon.json
or using the Docker app and going into Settings > Daemon
and set
"default-shm-size":"2g"
Is there a way to run it without --privileged
?
I am using bitbucket pipelines and there this flag is restricted.
https://confluence.atlassian.com/bitbucket/run-docker-commands-in-bitbucket-pipelines-879254331.html
https://bitbucket.org/site/master/issues/13420/allow-docker-image-privileged-flag
With the most recent update to the
latest
tag, our tests started failing:These are the logs on the Chromedriver: