Openshift RHEL Containers - Problems running google-chrome

10/1/2018

I am trying to run google chrome browser for headless testing in RHEL7 containers running in Openshift cluster. The idea is to use the browser for selenium automation.

The test runs perfectly in my local machine with Docker containers, I was able to get the screenshots - no issues. However, once I deploy them into OpenShift google chrome browser doesn't respond on time. Webdriver throws the below error.

> Webdriver error:
  > {"message":"Unexpected data in simpleCallback.","data":"<html><body><h1>504 Gateway Time-out</h1>\nThe server didn't respond in time.\n</body></html>\n"}

Based on the message I failed to figure out the problem, I did run the google-chrome through CLI and below is what I get from within the container.

google-chrome-stable --no-sandbox --headless --disable-gpu
--window-size=1920,1080 --proxy-server=http://myproxy.net:9999 --screenshot="/tmp/sc1.png" http://www.mytestingsite.com

Fontconfig warning: "/etc/fonts/fonts.conf", line 86: unknown element "blank"
[1001/164944.431186:ERROR:gpu_process_transport_factory.cc(1007)] Lost UI shared context.
[1001/164944.450572:ERROR:zygote_host_impl_linux.cc(259)] Failed to adjust OOM score of renderer with pid 117: Permission denied (13)

Couple of things I suspect could be a problem, the permission denied error thrown by the non-privileged user or it is something else. I really need chrome to throw some verbose logging to figure this out. I tried enable '--enable-logging=v=1' doesn't help.

Could someone shed some light on how to debug this issue or any ideas what could cause such a thing in OpenShift platform?

-- Sudheej
docker
google-chrome
kubernetes
openshift
selenium

0 Answers