zalando / zalenium

A flexible and scalable container based Selenium Grid with video recording, live preview, basic auth & dashboard.
https://opensource.zalando.com/zalenium/
Other
2.38k stars 575 forks source link

Using --gridUser and --gridPassword on Kubernetes crashes after ~1 minute #216

Closed joostvanwollingen closed 7 years ago

joostvanwollingen commented 7 years ago

When starting zalenium:3.3.1q with the --gridUser and --gridPassword options specified, after approximately 1 minute the error below occurs in the log. If started without these 2 parameters the container runs fine, on the same Kubernetes cluster.

Gist of Kubernetes yaml to reproduce https://gist.github.com/joostvanwollingen/2dc201d2a830071ed52d692b3d028bed

kubectl create -f zalenium-deployment.yaml

Trapped SIGTERM/SIGINT so shutting down Zalenium gracefully...
Stopping Hub...
Stopping DockerSeleniumStarter node...
14:49:12.504 INFO - About to clean up any left over selenium pods created by zalenium
-- LOG 14:49:12:532534458 Ensuring no stale Zalenium related containers are still around...
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

Full log

Kubernetes service account found.
-- LOG 14:50:42:996886350 Running additional checks...
Copying files for Dashboard...
cp: cannot create regular file '/home/seluser/videos/index.html': No such file or directory
Enabling basic auth via startup script...
Adding password for user myUser
Starting Nginx reverse proxy...
Starting Selenium Hub...
14:50:43.825 INFO - Selenium build info: version: '3.3.1', revision: '5234b32'
14:50:43.826 INFO - Launching Selenium Grid hub
14:50:44.902 INFO - binding de.zalando.ep.zalenium.servlet.LivePreviewServlet to /grid/admin/LivePreviewServlet/*
14:50:44.903 INFO - binding de.zalando.ep.zalenium.servlet.ZaleniumConsoleServlet to /grid/admin/ZaleniumConsoleServlet/*
14:50:44.904 INFO - binding de.zalando.ep.zalenium.servlet.ZaleniumResourceServlet to /grid/admin/ZaleniumResourceServlet/*
14:50:44.909 INFO - binding de.zalando.ep.zalenium.dashboard.DashboardCleanupServlet to /grid/admin/DashboardCleanupServlet/*
14:50:45.121 INFO - Will listen on 4445
14:50:45.549 INFO - Nodes should register to http://10.240.0.223:4445/grid/register/
14:50:45.550 INFO - Selenium Grid hub is up and running
..........Selenium Hub started!
Starting DockerSeleniumStarter node...
14:50:46.409 INFO - Selenium build info: version: '3.3.1', revision: '5234b32'
14:50:46.410 INFO - Launching a Selenium Grid node
2017-08-24 14:50:47.539:INFO::main: Logging initialized @1687ms to org.seleniumhq.jetty9.util.log.StdErrLog
14:50:47.704 INFO - Driver provider org.openqa.selenium.ie.InternetExplorerDriver registration is skipped:
 registration capabilities Capabilities [{ensureCleanSession=true, browserName=internet explorer, version=, platform=WINDOWS}] does not match the current platform LINUX
14:50:47.704 INFO - Driver provider org.openqa.selenium.edge.EdgeDriver registration is skipped:
 registration capabilities Capabilities [{browserName=MicrosoftEdge, version=, platform=WINDOWS}] does not match the current platform LINUX
14:50:47.705 INFO - Driver class not found: com.opera.core.systems.OperaDriver
14:50:47.709 INFO - Driver provider com.opera.core.systems.OperaDriver registration is skipped:
Unable to create new instances on this machine.
14:50:47.710 INFO - Driver class not found: com.opera.core.systems.OperaDriver
14:50:47.711 INFO - Driver provider com.opera.core.systems.OperaDriver is not registered
14:50:47.713 INFO - Driver provider org.openqa.selenium.safari.SafariDriver registration is skipped:
 registration capabilities Capabilities [{browserName=safari, version=, platform=MAC}] does not match the current platform LINUX
2017-08-24 14:50:47.822:INFO:osjs.Server:main: jetty-9.2.20.v20161216
2017-08-24 14:50:47.930:INFO:osjsh.ContextHandler:main: Started o.s.j.s.ServletContextHandler@4b5d6a01{/,null,AVAILABLE}
2017-08-24 14:50:47.969:INFO:osjs.AbstractConnector:main: Started ServerConnector@d16762e{HTTP/1.1,[http/1.1]}{0.0.0.0:30000}
2017-08-24 14:50:47.969:INFO:osjs.Server:main: Started @2117ms
14:50:47.970 INFO - Selenium Grid node is up and ready to register to the hub
14:50:48.010 INFO - Registering the node to the hub: http://localhost:4444/grid/register
14:50:48.593 INFO - Initialising Kubernetes support
14:50:48.787 INFO - SessionCleaner initialized with insideBrowserTimeout 0 and clientGoneTimeout 1800000 polling every 180000
14:50:50.727 INFO - Kubernetes support initialised.
    Pod name: zalenium-2641019763-q8fhz
    app label: zalenium
    zalenium service name: zalenium
    Kubernetes flavour: Vanilla Kubernetes
    Selenium Pod Resource Limits: {}
    Selenium Pod Resource Requests: {}
14:50:50.745 INFO - [DS] Capabilities grabbed from the docker-selenium image
14:50:50.758 INFO - The node is registered to the hub and ready to use
14:50:50.764 INFO - Registered a node http://10.240.0.223:30000
14:50:50.766 INFO - About to clean up any left over selenium pods created by zalenium
14:50:50.888 INFO - [DS]  Setting up 0 nodes...
14:50:50.890 INFO - 0 containers were created, it will take a bit more until all get registered.
.................DockerSeleniumStarter node started!
Sauce Labs not enabled...
Browser Stack not enabled...
TestingBot not enabled...
Zalenium is now ready!
*************************************** Data Processing Agreement ***************************************
By using this software you agree that the following non-PII (non personally identifiable information)
data will be collected, processed and used by Zalando SE for the purpose of improving our test
infrastructure tools. Anonymisation with respect of the IP address means that only the first two octets
of the IP address are collected.

See the complete license at https://github.com/zalando/zalenium/blob/master/LICENSE.md
*************************************** Data Processing Agreement ***************************************
Trapped SIGTERM/SIGINT so shutting down Zalenium gracefully...
Stopping Hub...
Stopping DockerSeleniumStarter node...
14:51:12.504 INFO - About to clean up any left over selenium pods created by zalenium
-- LOG 14:51:12:537885716 Ensuring no stale Zalenium related containers are still around...
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
diemol commented 7 years ago

Hi @joostvanwollingen,

Sorry for replying so late. Is this still an issue? I am using the feature to protect the grid and is works for me without problems.

joostvanwollingen commented 7 years ago

Will re-test soon and let you know the results.

joostvanwollingen commented 7 years ago

@diemol retested with dosel/zalenium:3 ==> appears to be working!