Giter VIP home page Giter VIP logo

selenium-openshift-templates's Introduction

Selenium OpenShift Templates

OpenShift Templates used for a Scalable Selenium infrastructure and these templates tested on OpenShift 4.5.8.

Usage

$ oc create -f selenium-hub.yaml
$ oc create -f selenium-node-chrome.yaml
$ oc create -f selenium-node-firefox.yaml
$ oc process selenium-hub | oc create -f -
$ oc process selenium-node-chrome | oc create -f -
$ oc process selenium-node-firefox | oc create -f -

Once all pods up and running and check the grid status with the following endpoint and you should see following output. Hub status url: https://OCP-ROUTE/wd/hub/status

Note: Please replace OCP-ROUTE based on your environment.

{
  "value": {
    "ready": true,
    "message": "Selenium Grid ready.",
    "nodes": [
      {
        "id": "72eaea16-1c0a-44b2-987f-c71cc36d6a77",
        "uri": "http:\u002f\u002f10.254.16.254:5555",
        "maxSessions": 1,
        "stereotypes": [
          {
            "capabilities": {
              "browserName": "chrome"
            },
            "count": 1
          }
        ],
        "sessions": [
        ]
      },
      {
        "id": "ee1d92e8-52cd-40a0-9516-cb4c424da8d8",
        "uri": "http:\u002f\u002f10.254.17.0:5555",
        "maxSessions": 1,
        "stereotypes": [
          {
            "capabilities": {
              "browserName": "firefox"
            },
            "count": 1
          }
        ],
        "sessions": [
        ]
      }
    ]
  }
}

In case you want to have VNC access to your chrome node, you need to add node chrome debug and you can follow same steps for firefox node as well.

$ oc create -f selenium-node-chrome-debug.yaml

and then to view the node via VNC, you use port forwarding to localhost.

First you get the pod of chrome debug

$ oc get pods
NAME                                 READY     STATUS      RESTARTS   AGE
selenium-hub-1-b8w96                 1/1       Running     5          4d
selenium-node-chrome-debug-1-2gcqn   1/1       Running     4          3d

Run port forwarding

$ oc port-forward -p selenium-node-chrome-debug-1-2gcqn 5900:5900
Forwarding from 127.0.0.1:5900 -> 5900
Forwarding from [::1]:5900 -> 5900
Handling connection for 5900
$ vncviewer 127.0.0.1:5900

NB: The default password to access to VNC is secret. You can change it by editing the chrome debug Dockerfile following this.

Example

openshift 1 hub 1 node hub 1 node openshift 1 hub 1 nodes hub 2 nodes

selenium-openshift-templates's People

Contributors

ddavison avatar jagraj avatar jemacom avatar jr00n avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

selenium-openshift-templates's Issues

Cannot remote to selenium grid in the server

Hello all,

I cant remote my request. I create the selenium-grid in Cloud opensift, but got error.
driver = webdriver.Remote("http://{pod ip add}/wd/hub", desired_capabilities=chrome_capabilities)
error msg :
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='XXX', port=5555): Max retries exceeded with url: /wd/hub/session (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x000002096F5D7430>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond'))

Cloud you please help me.

Request Timed Out Issue - Hub to Node (Chrome/Firefox)

Hello..

Can someone help me to check why are we getting request timed out from hub to node. I already tried to curl the remote id (http://<pod_ip>:5555) from selenium-hub pod and it was successful. Here's the logs:

org.openqa.selenium.WebDriverException: Error forwarding the new session Request timed out waiting for a node to become available.
Command duration or timeout: 380 milliseconds
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
System info: host: 'ip-10-155-52-41', ip: '10.155.52.41', os.name: 'Linux', os.arch: 'amd64', os.version: '4.14.109-80.92.amzn1.x86_64', java.version: '1.8.0_201'
Driver info: driver.version: RemoteWebDriver
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:214)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:166)
at org.openqa.selenium.remote.JsonWireProtocolResponse.lambda$new$0(JsonWireProtocolResponse.java:53)
at org.openqa.selenium.remote.JsonWireProtocolResponse.lambda$getResponseFunction$2(JsonWireProtocolResponse.java:91)
at org.openqa.selenium.remote.ProtocolHandshake.lambda$createSession$0(ProtocolHandshake.java:122)
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
at java.util.Spliterators$ArraySpliterator.tryAdvance(Spliterators.java:958)
at java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:126)
at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:498)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:485)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
at java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:152)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:464)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:125)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:73)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:136)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:548)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:212)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:130)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:143)
at com.ntuc.income.up.steps.Hook.setUpRemote(Hook.java:114)
at com.ntuc.income.up.steps.Hook.setup(Hook.java:58)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at cucumber.runtime.Utils$1.call(Utils.java:26)
at cucumber.runtime.Timeout.timeout(Timeout.java:16)
at cucumber.runtime.Utils.invoke(Utils.java:20)
at cucumber.runtime.java.JavaHookDefinition.execute(JavaHookDefinition.java:60)
at cucumber.runner.HookDefinitionMatch.runStep(HookDefinitionMatch.java:16)
at cucumber.runner.TestStep.executeStep(TestStep.java:63)
at cucumber.runner.TestStep.run(TestStep.java:49)
at cucumber.runner.TestCase.run(TestCase.java:40)
at cucumber.runner.Runner.runPickle(Runner.java:40)
at cucumber.runtime.junit.PickleRunners$NoStepDescriptions.run(PickleRunners.java:146)
at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:68)
at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:23)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at cucumber.runtime.junit.FeatureRunner.run(FeatureRunner.java:73)
at cucumber.api.junit.Cucumber.runChild(Cucumber.java:124)
at cucumber.api.junit.Cucumber.runChild(Cucumber.java:65)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at cucumber.api.junit.Cucumber$1.evaluate(Cucumber.java:133)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:365)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:273)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159)
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:384)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:345)
at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:126)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:418)
Caused by: org.openqa.grid.common.exception.GridException: Error forwarding the new session Request timed out waiting for a node to become available.
at org.openqa.grid.web.servlet.handler.RequestHandler.process(RequestHandler.java:118)
at org.openqa.grid.web.servlet.DriverServlet.process(DriverServlet.java:85)
at org.openqa.grid.web.servlet.DriverServlet.doPost(DriverServlet.java:69)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.seleniumhq.jetty9.servlet.ServletHolder.handle(ServletHolder.java:865)
at org.seleniumhq.jetty9.servlet.ServletHandler.doHandle(ServletHandler.java:535)
at org.seleniumhq.jetty9.server.handler.ScopedHandler.handle(ScopedHandler.java:146)
at org.seleniumhq.jetty9.security.SecurityHandler.handle(SecurityHandler.java:548)
at org.seleniumhq.jetty9.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
at org.seleniumhq.jetty9.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257)
at org.seleniumhq.jetty9.server.session.SessionHandler.doHandle(SessionHandler.java:1595)
at org.seleniumhq.jetty9.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255)
at org.seleniumhq.jetty9.server.handler.ContextHandler.doHandle(ContextHandler.java:1340)
at org.seleniumhq.jetty9.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203)
at org.seleniumhq.jetty9.servlet.ServletHandler.doScope(ServletHandler.java:473)
at org.seleniumhq.jetty9.server.session.SessionHandler.doScope(SessionHandler.java:1564)
at org.seleniumhq.jetty9.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201)
at org.seleniumhq.jetty9.server.handler.ContextHandler.doScope(ContextHandler.java:1242)
at org.seleniumhq.jetty9.server.handler.ScopedHandler.handle(ScopedHandler.java:144)
at org.seleniumhq.jetty9.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
at org.seleniumhq.jetty9.server.Server.handle(Server.java:503)
at org.seleniumhq.jetty9.server.HttpChannel.handle(HttpChannel.java:364)
at org.seleniumhq.jetty9.server.HttpConnection.onFillable(HttpConnection.java:260)
at org.seleniumhq.jetty9.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:305)
at org.seleniumhq.jetty9.io.FillInterest.fillable(FillInterest.java:103)
at org.seleniumhq.jetty9.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118)
at org.seleniumhq.jetty9.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333)
at org.seleniumhq.jetty9.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310)
at org.seleniumhq.jetty9.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168)
at org.seleniumhq.jetty9.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126)
at org.seleniumhq.jetty9.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366)
at org.seleniumhq.jetty9.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:765)
at org.seleniumhq.jetty9.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:683)
at java.lang.Thread.run(Thread.java:748)

Permission denied issue when starting node-chrome pod

Getting such error when starting node-chrome pod:

/opt/bin/entry_point.sh: line 4: /opt/selenium/config.json: Permission denied
No Selenium Node configuration file, the node-base image is not intended to be run directly.

Add Debug Templates

Currently there are node-chrome and node-firefox.

It'd be nice to have node-chrome-debug and node-firefox-debug.

Cannot connect to selenium hub on OpenShift

Hi @ddavison,
I followed your tutorial to configure hub and nodes on OpenShift. They are all running at the moment as in the image
image
I can access to the grid/console but when I try to connect to the hub, it raises such an error
image
My code snippet:
image
Could you show me any suggestions with this issue?

Selenium Grid not working on OpenShift

Based on instructions i have created setup the selenium-hub and selenium-node-chrome on Openshift. however i am not able to access this selenium grid from my scripts and even i am not able to navigate in browser.

Can you please refer attach document and guide me what steps i am missing or anything wrong i have done. Would be looking your reply as i have tried many times but it didn't worked.

seleniumgrid - Copy.docx

selenium/node-firefox pod error

Hi,
You did a awesome job. I got a problem when I was following your instruction.
Firefox say some messages, after run test from remote via Selenium Hub. And I can see Firefox process in the process list. However, chrome Pod works great.
How can I resolve my problem?

08:01:38.487 INFO - /status: Executing GET on /status (handler: Status)
  | (firefox:246): dconf-CRITICAL **: unable to create directory '/.cache/dconf': Permission denied. dconf will not work properly.
  | (firefox:246): dconf-CRITICAL **: unable to create directory '/.cache/dconf': Permission denied. dconf will not work properly.

OpenShift Origin:

  • OpenShift Master: v3.6.0+c4dd4cf
  • Kubernetes Master: v1.6.1+5115d708d7

Selenium:
RemoteProxy v3.5.2
WebDeriver v:55.0.3

Selenium grid chrome/firefox node timeout issue on Openshift master v3.9.31 and Kubernetes Master: v1.9.1+

First of all, thanks for the templates. Based on instructions We have created setup the selenium-hub and selenium-node-chrome/firefox nodes on Openshift. Hub can't creates sessions in nodes. Could u please let me why i am seeing this timeouts. I can post setup confing screenshots if needed

I can send requests to route i have created for the hub, for example:
http://selenium-hub-ue90-platformtest.apps.c1-ocp-dc1.dev.mycompanyname.com/wd/hub

I am seeing the following error in my console:

chrome #01-2] WebDriverError: <html><body><h1>504 Gateway Time-out</h1> [chrome #01-2] The server didn't respond in time. [chrome #01-2] </body></html> [chrome #01-2]

In selenium-hub logs, I am seeing this error.
15:50:34.404 INFO [RequestHandler.process] - Got a request to create a new session: Capabilities {browserName: chrome, chromeOptions: {args: [window-size=1900,1020]}, count: 1, idleTimeout: 3600, maxInstances: 2, shardTestFiles: true}   | 15:50:34.404 INFO [TestSlot.getNewSession] - Trying to create a new session on test slot {server:CONFIG_UUID=3ed53258-b3c8-4650-a16a-8aa9a7346a57, seleniumProtocol=WebDriver, browserName=chrome, maxInstances=1, platformName=LINUX, version=70.0.3538.110, applicationName=, platform=LINUX}   | 15:50:34.913 INFO [RequestHandler.process] - Got a request to create a new session: Capabilities {browserName: chrome, chromeOptions: {args: [window-size=1900,1020]}, count: 1, idleTimeout: 3600, maxInstances: 2, shardTestFiles: true}   | 15:50:34.914 INFO [TestSlot.getNewSession] - Trying to create a new session on test slot {server:CONFIG_UUID=7cee7486-7de8-47fd-8988-d54cb490cec3, seleniumProtocol=WebDriver, browserName=chrome, maxInstances=1, platformName=LINUX, version=70.0.3538.110, applicationName=, platform=LINUX}   | 15:51:07.572 ERROR [RequestHandler.process] - Socket timed out for session ext. key 0e71f0a138523e0a6b494ad6e51c8fa9, timeout   | 15:51:07.977 INFO [RequestHandler.process] - Got a request to create a new session: Capabilities {browserName: chrome, chromeOptions: {args: [window-size=1900,1020]}, count: 1, idleTimeout: 3600, maxInstances: 2, shardTestFiles: true}   | 15:51:07.978 INFO [TestSlot.getNewSession] - Trying to create a new session on test slot {server:CONFIG_UUID=48846111-8939-4230-9531-8784d0b316bd, seleniumProtocol=WebDriver, browserName=chrome, maxInstances=1, platformName=LINUX, version=70.0.3538.110, applicationName=, platform=LINUX}   | 15:51:08.101 ERROR [RequestHandler.process] - Socket timed out for session ext. key 227c6648bc7786be9e211a1f10e1a687, timeout   | 15:51:37.990 INFO [RequestHandler.process] - Error forwarding the new session Error forwarding the request timeout   | org.openqa.grid.internal.exception.NewSessionException: Error forwarding the request timeout   | at org.openqa.grid.web.servlet.handler.RequestHandler.forwardNewSessionRequestAndUpdateRegistry(RequestHandler.java:94)   | at org.openqa.grid.web.servlet.handler.RequestHandler.process(RequestHandler.java:114)   | at org.openqa.grid.web.servlet.DriverServlet.process(DriverServlet.java:85)   | at org.openqa.grid.web.servlet.DriverServlet.doPost(DriverServlet.java:69)   | at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)   | at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)   | at org.seleniumhq.jetty9.servlet.ServletHolder.handle(ServletHolder.java:865)   | at org.seleniumhq.jetty9.servlet.ServletHandler.doHandle(ServletHandler.java:535)   | at org.seleniumhq.jetty9.server.handler.ScopedHandler.handle(ScopedHandler.java:146)   | at org.seleniumhq.jetty9.security.SecurityHandler.handle(SecurityHandler.java:548)   | at org.seleniumhq.jetty9.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)   | at org.seleniumhq.jetty9.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257)   | at org.seleniumhq.jetty9.server.session.SessionHandler.doHandle(SessionHandler.java:1595)   | at org.seleniumhq.jetty9.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255)   | at org.seleniumhq.jetty9.server.handler.ContextHandler.doHandle(ContextHandler.java:1340)   | at org.seleniumhq.jetty9.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203)   | at org.seleniumhq.jetty9.servlet.ServletHandler.doScope(ServletHandler.java:473)   | at org.seleniumhq.jetty9.server.session.SessionHandler.doScope(SessionHandler.java:1564)   | at org.seleniumhq.jetty9.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201)   | at org.seleniumhq.jetty9.server.handler.ContextHandler.doScope(ContextHandler.java:1242)   | at org.seleniumhq.jetty9.server.handler.ScopedHandler.handle(ScopedHandler.java:144)   | at org.seleniumhq.jetty9.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)   | at org.seleniumhq.jetty9.server.Server.handle(Server.java:503)   | at org.seleniumhq.jetty9.server.HttpChannel.handle(HttpChannel.java:364)   | at org.seleniumhq.jetty9.server.HttpConnection.onFillable(HttpConnection.java:260)   | at org.seleniumhq.jetty9.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:305)   | at org.seleniumhq.jetty9.io.FillInterest.fillable(FillInterest.java:103)   | at org.seleniumhq.jetty9.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118)   | at org.seleniumhq.jetty9.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333)   | at org.seleniumhq.jetty9.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310)   | at org.seleniumhq.jetty9.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168)   | at org.seleniumhq.jetty9.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126)   | at org.seleniumhq.jetty9.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366)   | at org.seleniumhq.jetty9.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:765)   | at org.seleniumhq.jetty9.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:683)   | at java.lang.Thread.run(Thread.java:748)   | Caused by: java.net.SocketTimeoutException: timeout   | at okio.Okio$4.newTimeoutException(Okio.java:232)   | at okio.AsyncTimeout.exit(AsyncTimeout.java:285)   | at okio.AsyncTimeout$2.read(AsyncTimeout.java:241)   | at okio.RealBufferedSource.indexOf(RealBufferedSource.java:355)   | at okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:227)   | at okhttp3.internal.http1.Http1Codec.readHeaderLine(Http1Codec.java:215)   | at okhttp3.internal.http1.Http1Codec.readResponseHeaders(Http1Codec.java:189)   | at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.java:88)   | at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)   | at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)   | at org.openqa.selenium.remote.internal.OkHttpClient$Factory$1.lambda$createClient$1(OkHttpClient.java:152)   | at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)   | at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:45)   | at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)   | at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)   | at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93)   | at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)   | at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)   | at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)   | at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)   | at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:126)   | at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)   | at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)   | at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:200)   | at okhttp3.RealCall.execute(RealCall.java:77)   | at org.openqa.selenium.remote.internal.OkHttpClient.execute(OkHttpClient.java:103)   | at org.openqa.grid.internal.TestSession.sendRequestToNode(TestSession.java:422)   | at org.openqa.grid.internal.TestSession.forward(TestSession.java:229)   | at org.openqa.grid.web.servlet.handler.RequestHandler.forwardNewSessionRequestAndUpdateRegistry(RequestHandler.java:91)   | ... 35 more  

firefox cannot connect

When I use your templates in OSE 3.1 and selenium 2.53.1 encounter some problems with the node-firefox image. It needs to have access to /opt/selenium, if I relax that condition it starts up fine, registers itself in the grid but I get this error:

07:33:07.092 INFO - Launching a Selenium Grid node
2	07:33:07.795 INFO - Java: Oracle Corporation 25.91-b14
3	07:33:07.796 INFO - OS: Linux 3.10.0-514.2.2.el7.x86_64 amd64
4	07:33:07.799 INFO - v2.53.1, with Core v2.53.1. Built from revision a36b8b1
5	07:33:07.871 INFO - Driver provider org.openqa.selenium.ie.InternetExplorerDriver registration is skipped:
6	registration capabilities Capabilities [{ensureCleanSession=true, browserName=internet explorer, version=, platform=WINDOWS}] does not match the current platform LINUX
7	07:33:07.871 INFO - Driver provider org.openqa.selenium.edge.EdgeDriver registration is skipped:
8	registration capabilities Capabilities [{browserName=MicrosoftEdge, version=, platform=WINDOWS}] does not match the current platform LINUX
9	07:33:07.871 INFO - Driver class not found: com.opera.core.systems.OperaDriver
10	07:33:07.871 INFO - Driver provider com.opera.core.systems.OperaDriver is not registered
11	07:33:07.872 INFO - Driver provider org.openqa.selenium.safari.SafariDriver registration is skipped:
12	registration capabilities Capabilities [{browserName=safari, version=, platform=MAC}] does not match the current platform LINUX
13	07:33:07.872 INFO - Driver class not found: org.openqa.selenium.htmlunit.HtmlUnitDriver
14	07:33:07.873 INFO - Driver provider org.openqa.selenium.htmlunit.HtmlUnitDriver is not registered
15	07:33:07.948 INFO - Selenium Grid node is up and ready to register to the hub
16	07:33:07.993 INFO - Starting auto registration thread. Will try to register every 5000 ms.
17	07:33:07.993 INFO - Registering the node to the hub: http://172.30.218.173:4444/grid/register
18	07:33:08.011 INFO - The node is registered to the hub and ready to use
19	07:34:13.609 INFO - Executing: [new session: Capabilities [{loggingPrefs=org.openqa.selenium.logging.LoggingPreferences@2fad6c7, browserName=firefox, version=, platform=ANY}]])
20	07:34:13.628 INFO - Creating a new session for Capabilities [{loggingPrefs=org.openqa.selenium.logging.LoggingPreferences@2fad6c7, browserName=firefox, version=, platform=ANY}]
21	org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
22	
23		at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:112)
24		at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:271)
25		at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:119)
26		at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:218)
27		at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:211)
28		at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:129)
29		at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
30		at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
31		at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
32		at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
33		at org.openqa.selenium.remote.server.FirefoxDriverProvider.callConstructor(FirefoxDriverProvider.java:91)
34		at org.openqa.selenium.remote.server.FirefoxDriverProvider.newInstance(FirefoxDriverProvider.java:68)
35		at org.openqa.selenium.remote.server.DefaultDriverFactory.newInstance(DefaultDriverFactory.java:60)
36		at org.openqa.selenium.remote.server.DefaultSession$BrowserCreator.call(DefaultSession.java:222)
37		at org.openqa.selenium.remote.server.DefaultSession$BrowserCreator.call(DefaultSession.java:1)
38		at java.util.concurrent.FutureTask.run(FutureTask.java:266)
39		at org.openqa.selenium.remote.server.DefaultSession$1.run(DefaultSession.java:176)
40		at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
41		at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
42		at java.lang.Thread.run(Thread.java:745)
43	07:34:59.078 WARN - Exception thrown
44	java.util.concurrent.ExecutionException: org.openqa.selenium.WebDriverException: java.lang.reflect.InvocationTargetException
45	Build info: version: '2.53.1', revision: 'a36b8b1', time: '2016-06-30 17:37:03'
46	System info: host: 'selenium-node-firefox-hmxuq', ip: '10.127.26.113', os.name: 'Linux', os.arch: 'amd64', os.version: '3.10.0-514.2.2.el7.x86_64', java.version: '1.8.0_91'
47	Driver info: driver.version: unknown

I have the same error when I use a standalone image from either selenium, some other people or when I package my working VM config... Is there anything special on openshift? Does this container need to be priviledged?

Any suggestions are more than welcome... been fighting this thing for a week now, starts working on my system :-)

Commands not running on OCP v4.x

Hello Team,
I am a OCP cluster v 4.x. I am trying to run the commands:
$ oc create -f selenium-hub.yaml
$ oc create -f selenium-node-chrome-debug.yaml

I see that template.template.openshift.io/selenium-hub created and template.template.openshift.io/selenium-node-chrome-debug created, but then when I am running the command to check the pods (oc get pods), I see that no pods have got created.

Any idea why this is happening please.

Tnx.

selenium-openshift-templates for nodes are missing

Hello,

I just noticed that you deleted folders for the selenium nodes. When I run the Openshift, the build was failed because it can't find the folders.

This line is part of the template:

  git:   
    uri: https://github.com/ddavison/selenium-openshift-templates   
    ref: master   

Please help. Thanks!

Selenium Hub keeps crashing

Hi,

I appreciate that you are making you selenium template publicly available.

I was wondering if there are any special requirements to run to use template?
The reason I am asking is because the pod is crashing with the following output:

1   /opt/bin/entry_point.sh: line 6: /opt/selenium/config.json: Permission denied
2   starting selenium hub with configuration:
3   cat: /opt/selenium/config.json: No such file or directory
4   14:26:57.404 INFO - Launching Selenium Grid hub
5   
6   -------------------------------
7   Running as a grid hub:
8   -------------------------------
9   
10  Usage: java -jar selenium-server.jar -role hub [options]
11  
12    -host:
13      <IP | hostname> : usually not needed and determined
14        automatically. For exotic network configuration, network with
15        VPN, specifying the host might be necessary.
16  
17    -port:
18      <xxxx> : the port the remote/hub will listen on. Default to 4444.
19  
20    -throwOnCapabilityNotPresent:
21      <true | false> default to true. If true, the hub will reject test
22        requests right away if no proxy is currently registered that can
23        host that capability.Set it to false to have the request queued
24        until a node supporting the capability is added to the grid.
25  
26    -newSessionWaitTimeout:
27      <XXXX>. Default to no timeout ( -1 ) the time in ms after which a
28        new test waiting for a node to become available will time
29        out.When that happens, the test will throw an exception before
30        starting a browser.
31  
32    -capabilityMatcher:
33      a class implementing the CapabilityMatcher interface. Defaults to
34        org.openqa.grid.internal.utils.DefaultCapabilityMatcher. Specify
35        the logic the hub will follow to define if a request can be
36        assigned to a node.Change this class if you want to have the
37        matching process use regular expression instead of exact match
38        for the version of the browser for instance. All the nodes of a
39        grid instance will use the same matcher, defined by the registry.
40  
41    -prioritizer:
42      a class implementing the Prioritizer interface. Default to null (
43        no priority = FIFO ).Specify a custom prioritizer if you need the
44        grid to process the tests from the CI, or the IE tests first for
45        instance.
46  
47    -servlets:
48      <com.mycompany.MyServlet,com.mycompany.MyServlet2> to register a
49        new servlet on the hub/node. The servlet will accessible under
50        the path  /grid/admin/MyServlet /grid/admin/MyServlet2
51  
52    -grid1Yml:
53      a YML file following grid1 format.
54  
55    -hubConfig:
56      a JSON file following grid2 format that defines the hub
57        properties.
58  
59    -browserTimeout:
60      The timeout in seconds a browser can hang
61  
62  This synopsis lists options available in hub role only. To get help
63    on the command line options available for other roles run the server
64    with -help name and the corresponding -role name value.
65  org.openqa.grid.common.exception.GridConfigurationException: Error with the JSON of the config : /opt/selenium/config.json is not a valid resource.
66      at org.openqa.grid.internal.utils.GridHubConfiguration.loadFromJSON(GridHubConfiguration.java:334)
67      at org.openqa.grid.internal.utils.GridHubConfiguration.build(GridHubConfiguration.java:144)
68      at org.openqa.grid.selenium.GridLauncher$2.launch(GridLauncher.java:72)
69      at org.openqa.grid.selenium.GridLauncher.main(GridLauncher.java:127)
70  Caused by: java.lang.RuntimeException: /opt/selenium/config.json is not a valid resource.
71      at org.openqa.grid.common.JSONConfigurationUtils.loadJSON(JSONConfigurationUtils.java:54)
72      at org.openqa.grid.internal.utils.GridHubConfiguration.loadFromJSON(GridHubConfiguration.java:281)
73      ... 3 more

Any help you could provide is appreciated.

Thanks,
Minh

Selenium Grid on Openeshift 3.9 Issue

Hi All,
I'm using openshift 3.9 and I have deployed the files following the blog http://ddavison.io/2016/02/01/openshift-templates-for-selenium.html

In the deployment logs of selenium-hub I see the following error:

2018-10-09 08:49:04,990 WARN Included extra file "/etc/supervisor/conf.d/selenium-hub.conf" during parsing
2018-10-09 08:49:04,996 INFO supervisord started with pid 6
2018-10-09 08:49:05,999 INFO spawned: 'selenium-hub' with pid 9 supervisor: couldn't setuid to 1000: Can't drop privilege as nonroot user supervisor: child process was not spawned
2018-10-09 08:49:06,002 INFO success: selenium-hub entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2018-10-09 08:49:06,002 INFO exited: selenium-hub (exit status 127; not expected)

I'm not able to connect to the Selenium Web Console and the selenium-node-chrome logs tells:

08:55:31.322 WARN - error getting the parameters from the hub. The node may end up with wrong timeouts.Connect to selenium-hub:4444 [selenium-hub/172.30.129.107] failed: Connection refused (Connection refused)
2018-10-09 08:55:31.378:INFO::main: Logging initialized @1929ms to org.seleniumhq.jetty9.util.log.StdErrLog
2018-10-09 08:55:31.577:INFO:osjs.Server:main: jetty-9.4.5.v20170502 2018-10-09 08:55:31.608:WARN:osjs.SecurityHandler:main: [email protected]@245b4bdc{/,null,STARTING} has uncovered http methods for path: /
2018-10-09 08:55:31.612:INFO:osjsh.ContextHandler:main: Started o.s.j.s.ServletContextHandler@245b4bdc{/,null,AVAILABLE}
2018-10-09 08:55:31.792:INFO:osjs.AbstractConnector:main: Started ServerConnector@293a5bf6{HTTP/1.1,[http/1.1]}{0.0.0.0:5555}
2018-10-09 08:55:31.792:INFO:osjs.Server:main: Started @2343ms

Can someone help me please?
I'm stucked :(

Looking for maintainers

⭐ If you're looking at this issue and use these templates, i could use some help! ⭐

I don't use OpenShift anymore, so maintaining this project might be a problem.

Reply to this issue if you're interested in helping maintain these templates.

/cc @jr00n @jemacom

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.