docker-selenium icon indicating copy to clipboard operation
docker-selenium copied to clipboard

[🐛 Bug]: Could not start a new session -intermittently

Open himani-dangwal opened this issue 11 months ago • 19 comments

What happened?

I have around 5 threads running concurrently But during execution of testcases in between I am getting error of session not created. The issue is very intermittent

Command used to start Selenium Grid with Docker (or Kubernetes)

apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
  name: selenium-grid
  namespace: selenium-grid
spec:
  chart:
    spec:
      chart: selenium-grid
      version: 0.38.1
      sourceRef:
        kind: HelmRepository
        name: selenium-grid
        namespace: selenium-grid
  interval: 5m
  targetNamespace: selenium-grid
  releaseName: selenium-grid
  values:
    videoRecorder:
      enabled: true
      extraVolumeMounts:
        - name: selenium-grid-videodir
          mountPath: /videos
      extraVolumes:
        - name: selenium-grid-videodir
          persistentVolumeClaim:
            claimName: selenium-video-pvc
    basicAuth:
      enabled: false
    isolateComponents: true
    firefoxNode:
      resources:
        limits:
          memory: "2Gi"
          cpu: "1"
    chromeNode:
      enabled: false
    edgeNode:
      enabled: false

Relevant log output

org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: Could not start a new session. Could not start a new session. Build info: version: '4.27.0', revision: 'd6e718d'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '6.1.115', java.version: '17.0.13'
Driver info: driver.version: unknown 
Host info: host: 'selenium-grid-selenium-distributor-76ff4c5987-pfkjm', ip: '172.22.10.42'
Build info: version: '4.27.0', revision: 'd6e718d'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '6.1.115', java.version: '17.0.13'
Driver info: driver.version: unknown
Build info: version: '4.25.0', revision: '8a8aea2337'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '6.1.115', java.version: '11.0.24'
Driver info: org.openqa.selenium.remote.RemoteWebDriver
Command: [null, newSession {capabilities=[Capabilities {acceptInsecureCerts: true, browserName: firefox, moz:debuggerAddress: true, moz:firefoxOptions: {prefs: {remote.active-protocols: 3}, profile: UEsDBBQACAgIAMI4l1kAAAAAAAA...}}]}]
Capabilities {acceptInsecureCerts: true, browserName: firefox, moz:debuggerAddress: true, moz:firefoxOptions: {prefs: {remote.active-protocols: 3}, profile: UEsDBBQACAgIAMI4l1kAAAAAAAA...}}
	at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:114)
	at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:75)
	at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:61)
	at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:162)
	at org.openqa.selenium.remote.TracedCommandExecutor.execute(TracedCommandExecutor.java:53)
	at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:545)
	at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:245)
	at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:174)
	at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:152)
	at com.umantis.test.framework.webdriver.LocalDriverFactory.createInstance(LocalDriverFactory.java:79)
	at com.umantis.test.framework.webdriver.LocalWebDriver.create(LocalWebDriver.java:68)
	at com.umantis.test.framework.configuration.TestBase.methodSetup(TestBase.java:80)
	at jdk.internal.reflect.GeneratedMethodAccessor258.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:141)
	at org.testng.internal.invokers.MethodInvocationHelper.invokeMethodConsideringTimeout(MethodInvocationHelper.java:71)
	at org.testng.internal.invokers.ConfigInvoker.invokeConfigurationMethod(ConfigInvoker.java:400)
	at org.testng.internal.invokers.ConfigInvoker.invokeConfigurations(ConfigInvoker.java:333)
	at org.testng.internal.invokers.TestInvoker.runConfigMethods(TestInvoker.java:833)
	at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:600)
	at org.testng.internal.invokers.TestInvoker.invokeTestMethod(TestInvoker.java:230)
	at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:63)
	at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:992)
	at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:203)
	at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:154)
	at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:134)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at org.testng.internal.thread.graph.TestNGFutureTask.run(TestNGFutureTask.java:22)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)

Operating System

Kubernetes EKS

Docker Selenium version (image tag)

latest

Selenium Grid chart version (chart version)

0.38.1

himani-dangwal avatar Dec 23 '24 08:12 himani-dangwal

@himani-dangwal, thank you for creating this issue. We will troubleshoot it as soon as we can.


Info for maintainers

Triage this issue by using labels.

If information is missing, add a helpful comment and then I-issue-template label.

If the issue is a question, add the I-question label.

If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted label.

If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C), add the applicable G-* label, and it will provide the correct link and auto-close the issue.

After troubleshooting the issue, please add the R-awaiting answer label.

Thank you!

github-actions[bot] avatar Dec 23 '24 08:12 github-actions[bot]

Do you have multiple Node build version are connecting to the same Hub? Since I can see Hub is 4.27.0, and looks like the Node get an issue with 4.25.0

VietND96 avatar Dec 23 '24 09:12 VietND96

No I only have single node version

himani-dangwal avatar Dec 23 '24 09:12 himani-dangwal

In values, can you set global.seleniumGrid.logLevel is FINE to get more debug logs around Node or Distributor?

VietND96 avatar Dec 23 '24 09:12 VietND96

Hi please find the log of distributor pod distributor.txt

himani-dangwal avatar Dec 23 '24 09:12 himani-dangwal

and could you pelase suggest the most stable vesrion that can be used. I tried withfew older version. in one autoscaling was not working while in other secret name is missing

himani-dangwal avatar Dec 23 '24 10:12 himani-dangwal

For autoscaling, recently there were lots of changes. To answer your question, might I know which existing KEDA core version/image tag that you are using? Or you are using sub-chart KEDA to be installed together with Grid?

VietND96 avatar Dec 23 '24 12:12 VietND96

Can you try chart 0.38.3 and confirm.

VietND96 avatar Jan 03 '25 10:01 VietND96

Hi @VietND96 I updated the chart to the latest version 0.38.4 still got the issue. there is one difference that I saw. in my selenium test threadcount is 5 but when the execution takes places in the grid only 3 firefox node are created. Is there any value that I am missing to update for new chart version values: basicAuth: enabled: false isolateComponents: true firefoxNode: resources: limits: memory: "2Gi" cpu: "1" chromeNode: enabled: false edgeNode: enabled: false autoscaling: enabled: true scalingType: deployment scaledOptions: maxReplicaCount: 30 pollingInterval: 10

Log- Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure. Host info: host: 'runner-ajw42zxos-project-294-concurrent-0-vl7abav7', ip: '172.22.9.58' org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure. Host info: host: 'runner-ajw42zxos-project-294-concurrent-0-vl7abav7', ip: '172.22.9.58' at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:563) at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:245) at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:174) at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:152) at com.umantis.test.framework.webdriver.LocalDriverFactory.createInstance(LocalDriverFactory.java:79) at com.umantis.test.framework.webdriver.LocalWebDriver.create(LocalWebDriver.java:69) at com.umantis.test.framework.configuration.TestBase.methodSetup(TestBase.java:80) at jdk.internal.reflect.GeneratedMethodAccessor113.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:141) at org.testng.internal.invokers.MethodInvocationHelper.invokeMethodConsideringTimeout(MethodInvocationHelper.java:71) at org.testng.internal.invokers.ConfigInvoker.invokeConfigurationMethod(ConfigInvoker.java:400) at org.testng.internal.invokers.ConfigInvoker.invokeConfigurations(ConfigInvoker.java:333) at org.testng.internal.invokers.TestInvoker.runConfigMethods(TestInvoker.java:833) at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:600) at org.testng.internal.invokers.TestInvoker.invokeTestMethod(TestInvoker.java:230) at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:63) at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:992) at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:203) at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:154) at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:134) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at org.testng.internal.thread.graph.TestNGFutureTask.run(TestNGFutureTask.java:22) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:829) Caused by: org.openqa.selenium.TimeoutException: java.util.concurrent.TimeoutException Build info: version: '4.25.0', revision: '8a8aea2337' System info: os.name: 'Linux', os.arch: 'amd64', os.version: '6.1.119', java.version: '11.0.24' Driver info: driver.version: LocalWebDriver at org.openqa.selenium.remote.http.jdk.JdkHttpClient.execute0(JdkHttpClient.java:418) at org.openqa.selenium.remote.http.AddSeleniumUserAgent.lambda$apply$0(AddSeleniumUserAgent.java:42) at org.openqa.selenium.remote.http.Filter.lambda$andFinally$1(Filter.java:55) at org.openqa.selenium.remote.http.jdk.JdkHttpClient.execute(JdkHttpClient.java:374) at org.openqa.selenium.remote.tracing.TracedHttpClient.execute(TracedHttpClient.java:54) at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:89) at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:75) at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:61) at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:162) at org.openqa.selenium.remote.TracedCommandExecutor.execute(TracedCommandExecutor.java:53) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:545) ... 27 more Caused by: java.util.concurrent.TimeoutException at java.base/java.util.concurrent.CompletableFuture.timedGet(CompletableFuture.java:1892) at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2027) at org.openqa.selenium.remote.http.jdk.JdkHttpClient.execute0(JdkHttpClient.java:401) ... 37 more

himani-dangwal avatar Jan 15 '25 06:01 himani-dangwal

Hi, at the time that you saw 5 request queue but only 3 Node scaled up. Can you get response from GraphQL endpoint with below curl command? curl -k -X POST -H "Content-Type: application/json" --data '{"query":"{ grid { sessionCount, maxSession, totalSlots }, nodesInfo { nodes { id, status, sessionCount, maxSession, slotCount, stereotypes, sessions { id, capabilities, slot { id, stereotype } } } }, sessionsInfo { sessionQueueRequests } }"}' -s http://your.grid.public.ip/graphql

VietND96 avatar Jan 15 '25 09:01 VietND96

Hey @VietND96 with the thread count 5 it reached 3 or 4 but never 5 /# curl -k -X POST -H "Content-Type: application/json" --data '{"query":"{ gid { sessionCount, maxSession, totalSlots }, nodesInfo { nodes { id, status, sessionCount, maxSession, slotCount, stereotypes, sessions { id, capabilities, slot { id, stereotype } } } }, sessionsInfo { sessionQueueRequests } }"}' -s http://selenium-grid-selenium-router.selenium-grid.svc.cluster.local:4444/graphql { "data": { "grid": { "sessionCount": 3, "maxSession": 4, "totalSlots": 4 }, "nodesInfo": { "nodes": [ { "id": "cd1f87be-8adf-4c8e-8f56-8372d299a9b8", "status": "UP", "sessionCount": 1, "maxSession": 1, "slotCount": 1, "stereotypes": "[\n {\n "slots": 1,\n "stereotype": {\n "browserName": "firefox",\n "browserVersion": "",\n "moz:firefoxOptions": {\n "binary": "\u002fusr\u002fbin\u002ffirefox"\n },\n "platformName": "windows",\n "se:containerName": "selenium-grid-selenium-node-firefox-54445b5fdb-zzczd",\n "se:noVncPort": 7900,\n "se:vncEnabled": true\n }\n }\n]", "sessions": [ { "id": "2902e2c4-e59f-4cd5-b265-b813a1cffa2e", "capabilities": "{\n "acceptInsecureCerts": true,\n "browserName": "firefox",\n "browserVersion": "133.0.3",\n "moz:accessibilityChecks": false,\n "moz:buildID": "20241209150345",\n "moz:debuggerAddress": "127.0.0.1:3547",\n "moz:firefoxOptions": {\n "prefs": {\n "remote.active-protocols": 3\n },\n "profile": "UEsDBBQACAgIAFdlL1oAAAAAAAAAAAAAAAAHAAAAdXNlci5qc52QQQpCMQxE955CulKQ4loPU9I2arG2JU3s9X8+CErRjbvM8F4WIx3JNcLLzniqQ5PtDMTS7K0+sMEVzWFrwFfhk89Q7mZ\u002f3sjbmmk3MAe9nVC2EGPiVAvk\u002f5+s5oQP9JHSUzP0LitWmKQzRpe0QFJHC\u002fxphYCNP6yAxP2rNI\u002fyGuSo1AJQSwcIUBpck4UAAAA7AQAAUEsBAhQAFAAICAgAV2UvWlAaXJOFAAAAOwEAAAcAAAAAAAAAAAAAAAAAAAAAAHVzZXIuanNQSwUGAAAAAAEAAQA1AAAAugAAAAAA"\n },\n "moz:geckodriverVersion": "0.35.0",\n "moz:headless": false,\n "moz:platformVersion": "6.1.119",\n "moz:processID": 3051,\n "moz:profile": "\u002ftmp\u002frust_mozprofile4rstc1",\n "moz:shutdownTimeout": 60000,\n "moz:webdriverClick": true,\n "moz:windowless": false,\n "pageLoadStrategy": "normal",\n "platformName": "windows",\n "proxy": {\n },\n "se:bidiEnabled": false,\n "se:cdp": "wss:\u002f\u002fselenium-grid.XXX\u002fsession\u002f2902e2c4-e59f-4cd5-b265-b813a1cffa2e\u002fse\u002fcdp",\n "se:cdpVersion": "85.0",\n "se:containerName": "selenium-grid-selenium-node-firefox-54445b5fdb-zzczd",\n "se:noVncPort": 7900,\n "se:vnc": "wss:\u002f\u002fselenium-grid.XXX\u002fsession\u002f2902e2c4-e59f-4cd5-b265-b813a1cffa2e\u002fse\u002fvnc",\n "se:vncEnabled": true,\n "se:vncLocalAddress": "ws:\u002f\u002f172.22.10.18:7900",\n "setWindowRect": true,\n "strictFileInteractability": false,\n "timeouts": {\n "implicit": 0,\n "pageLoad": 300000,\n "script": 30000\n },\n "unhandledPromptBehavior": "dismiss and notify",\n "userAgent": "Mozilla\u002f5.0 (X11; Linux x86_64; rv:133.0) Gecko\u002f20100101 Firefox\u002f133.0"\n}", "slot": { "id": "7f837691-d193-4f5b-8807-0074d87b4003", "stereotype": "{\n "browserName": "firefox",\n "browserVersion": "",\n "moz:firefoxOptions": {\n "binary": "\u002fusr\u002fbin\u002ffirefox"\n },\n "platformName": "windows",\n "se:containerName": "selenium-grid-selenium-node-firefox-54445b5fdb-zzczd",\n "se:noVncPort": 7900,\n "se:vncEnabled": true\n}" } } ] }, { "id": "7a6f0253-7c27-4c48-aef0-57c34549c973", "status": "UP", "sessionCount": 1, "maxSession": 1, "slotCount": 1, "stereotypes": "[\n {\n "slots": 1,\n "stereotype": {\n "browserName": "firefox",\n "browserVersion": "",\n "moz:firefoxOptions": {\n "binary": "\u002fusr\u002fbin\u002ffirefox"\n },\n "platformName": "windows",\n "se:containerName": "selenium-grid-selenium-node-firefox-54445b5fdb-p5r46",\n "se:noVncPort": 7900,\n "se:vncEnabled": true\n }\n }\n]", "sessions": [ { "id": "00fe3b0b-8c6a-441a-a7c6-4ac1785d026a", "capabilities": "{\n "acceptInsecureCerts": true,\n "browserName": "firefox",\n "browserVersion": "133.0.3",\n "moz:accessibilityChecks": false,\n "moz:buildID": "20241209150345",\n "moz:debuggerAddress": "127.0.0.1:13624",\n "moz:firefoxOptions": {\n "prefs": {\n "remote.active-protocols": 3\n },\n "profile": "UEsDBBQACAgIAGFlL1oAAAAAAAAAAAAAAAAHAAAAdXNlci5qc52QQQpCMQxE955CulKQ4loPU9I2arG2JU3s9X8+CErRjbvM8F4WIx3JNcLLzniqQ5PtDMTS7K0+sMEVzWFrwFfhk89Q7mZ\u002f3sjbmmk3MAe9nVC2EGPiVAvk\u002f5+s5oQP9JHSUzP0LitWmKQzRpe0QFJHC\u002fxphYCNP6yAxP2rNI\u002fyGuSo1AJQSwcIUBpck4UAAAA7AQAAUEsBAhQAFAAICAgAYWUvWlAaXJOFAAAAOwEAAAcAAAAAAAAAAAAAAAAAAAAAAHVzZXIuanNQSwUGAAAAAAEAAQA1AAAAugAAAAAA"\n },\n "moz:geckodriverVersion": "0.35.0",\n "moz:headless": false,\n "moz:platformVersion": "6.1.119",\n "moz:processID": 4227,\n "moz:profile": "\u002ftmp\u002frust_mozprofile0IcU4I",\n "moz:shutdownTimeout": 60000,\n "moz:webdriverClick": true,\n "moz:windowless": false,\n "pageLoadStrategy": "normal",\n "platformName": "windows",\n "proxy": {\n },\n "se:bidiEnabled": false,\n "se:cdp": "wss:\u002f\u002fselenium-grid.XXX\u002fsession\u002f00fe3b0b-8c6a-441a-a7c6-4ac1785d026a\u002fse\u002fcdp",\n "se:cdpVersion": "85.0",\n "se:containerName": "selenium-grid-selenium-node-firefox-54445b5fdb-p5r46",\n "se:noVncPort": 7900,\n "se:vnc": "wss:\u002f\u002fselenium-grid.XXX\u002fsession\u002f00fe3b0b-8c6a-441a-a7c6-4ac1785d026a\u002fse\u002fvnc",\n "se:vncEnabled": true,\n "se:vncLocalAddress": "ws:\u002f\u002f172.22.10.54:7900",\n "setWindowRect": true,\n "strictFileInteractability": false,\n "timeouts": {\n "implicit": 0,\n "pageLoad": 300000,\n "script": 30000\n },\n "unhandledPromptBehavior": "dismiss and notify",\n "userAgent": "Mozilla\u002f5.0 (X11; Linux x86_64; rv:133.0) Gecko\u002f20100101 Firefox\u002f133.0"\n}", "slot": { "id": "e00ca46b-7b6d-4b9c-809e-e6cd8fd11dbb", "stereotype": "{\n "browserName": "firefox",\n "browserVersion": "",\n "moz:firefoxOptions": {\n "binary": "\u002fusr\u002fbin\u002ffirefox"\n },\n "platformName": "windows",\n "se:containerName": "selenium-grid-selenium-node-firefox-54445b5fdb-p5r46",\n "se:noVncPort": 7900,\n "se:vncEnabled": true\n}" } } ] }, { "id": "ef67a7b4-d5df-4d9f-ac8e-9d957e2a6aa1", "status": "UP", "sessionCount": 1, "maxSession": 1, "slotCount": 1, "stereotypes": "[\n {\n "slots": 1,\n "stereotype": {\n "browserName": "firefox",\n "browserVersion": "",\n "moz:firefoxOptions": {\n "binary": "\u002fusr\u002fbin\u002ffirefox"\n },\n "platformName": "windows",\n "se:containerName": "selenium-grid-selenium-node-firefox-54445b5fdb-kz79r",\n "se:noVncPort": 7900,\n "se:vncEnabled": true\n }\n }\n]", "sessions": [ { "id": "reserved", "capabilities": "{\n "browserName": "firefox",\n "browserVersion": "",\n "moz:firefoxOptions": {\n "binary": "\u002fusr\u002fbin\u002ffirefox"\n },\n "platformName": "windows",\n "se:containerName": "selenium-grid-selenium-node-firefox-54445b5fdb-kz79r",\n "se:noVncPort": 7900,\n "se:vncEnabled": true\n}", "slot": { "id": "3ba21059-82af-418f-bf8c-514a8a46f141", "stereotype": "{\n "browserName": "firefox",\n "browserVersion": "",\n "moz:firefoxOptions": {\n "binary": "\u002fusr\u002fbin\u002ffirefox"\n },\n "platformName": "windows",\n "se:containerName": "selenium-grid-selenium-node-firefox-54445b5fdb-kz79r",\n "se:noVncPort": 7900,\n "se:vncEnabled": true\n}" } } ] }, { "id": "c3c64cb5-c5e7-4246-ad52-2bc5508f362a", "status": "UP", "sessionCount": 1, "maxSession": 1, "slotCount": 1, "stereotypes": "[\n {\n "slots": 1,\n "stereotype": {\n "browserName": "firefox",\n "browserVersion": "",\n "moz:firefoxOptions": {\n "binary": "\u002fusr\u002fbin\u002ffirefox"\n },\n "platformName": "windows",\n "se:containerName": "selenium-grid-selenium-node-firefox-54445b5fdb-wqcs6",\n "se:noVncPort": 7900,\n "se:vncEnabled": true\n }\n }\n]", "sessions": [ { "id": "ad742d23-8401-4cf7-9a66-5b88d402713a", "capabilities": "{\n "acceptInsecureCerts": true,\n "browserName": "firefox",\n "browserVersion": "133.0.3",\n "moz:accessibilityChecks": false,\n "moz:buildID": "20241209150345",\n "moz:debuggerAddress": "127.0.0.1:18345",\n "moz:firefoxOptions": {\n "prefs": {\n "remote.active-protocols": 3\n },\n "profile": "UEsDBBQACAgIABllL1oAAAAAAAAAAAAAAAAHAAAAdXNlci5qc52QQQpCMQxE955CulKQ4loPU9I2arG2JU3s9X8+CErRjbvM8F4WIx3JNcLLzniqQ5PtDMTS7K0+sMEVzWFrwFfhk89Q7mZ\u002f3sjbmmk3MAe9nVC2EGPiVAvk\u002f5+s5oQP9JHSUzP0LitWmKQzRpe0QFJHC\u002fxphYCNP6yAxP2rNI\u002fyGuSo1AJQSwcIUBpck4UAAAA7AQAAUEsBAhQAFAAICAgAGWUvWlAaXJOFAAAAOwEAAAcAAAAAAAAAAAAAAAAAAAAAAHVzZXIuanNQSwUGAAAAAAEAAQA1AAAAugAAAAAA"\n },\n "moz:geckodriverVersion": "0.35.0",\n "moz:headless": false,\n "moz:platformVersion": "6.1.119",\n "moz:processID": 246,\n "moz:profile": "\u002ftmp\u002frust_mozprofilehIgRTK",\n "moz:shutdownTimeout": 60000,\n "moz:webdriverClick": true,\n "moz:windowless": false,\n "pageLoadStrategy": "normal",\n "platformName": "windows",\n "proxy": {\n },\n "se:bidiEnabled": false,\n "se:cdp": "wss:\u002f\u002fselenium-grid.XXX\u002fsession\u002fad742d23-8401-4cf7-9a66-5b88d402713a\u002fse\u002fcdp",\n "se:cdpVersion": "85.0",\n "se:containerName": "selenium-grid-selenium-node-firefox-54445b5fdb-wqcs6",\n "se:noVncPort": 7900,\n "se:vnc": "wss:\u002f\u002fselenium-grid.XXX\u002fsession\u002fad742d23-8401-4cf7-9a66-5b88d402713a\u002fse\u002fvnc",\n "se:vncEnabled": true,\n "se:vncLocalAddress": "ws:\u002f\u002f172.22.9.241:7900",\n "setWindowRect": true,\n "strictFileInteractability": false,\n "timeouts": {\n "implicit": 0,\n "pageLoad": 300000,\n "script": 30000\n },\n "unhandledPromptBehavior": "dismiss and notify",\n "userAgent": "Mozilla\u002f5.0 (X11; Linux x86_64; rv:133.0) Gecko\u002f20100101 Firefox\u002f133.0"\n}", "slot": { "id": "4696c05f-f716-4ead-b016-8b34301c6386", "stereotype": "{\n "browserName": "firefox",\n "browserVersion": "",\n "moz:firefoxOptions": {\n "binary": "\u002fusr\u002fbin\u002ffirefox"\n },\n "platformName": "windows",\n "se:containerName": "selenium-grid-selenium-node-firefox-54445b5fdb-wqcs6",\n "se:noVncPort": 7900,\n "se:vncEnabled": true\n}" } } ] } ] }, "sessionsInfo": { "sessionQueueRequests": [ "{\n "acceptInsecureCerts": true,\n "browserName": "firefox",\n "moz:debuggerAddress": true,\n "moz:firefoxOptions": {\n "prefs": {\n "remote.active-protocols": 3\n },\n "profile": "UEsDBBQACAgIAG1lL1oAAAAAAAAAAAAAAAAHAAAAdXNlci5qc52QQQpCMQxE955CulKQ4loPU9I2arG2JU3s9X8+CErRjbvM8F4WIx3JNcLLzniqQ5PtDMTS7K0+sMEVzWFrwFfhk89Q7mZ\u002f3sjbmmk3MAe9nVC2EGPiVAvk\u002f5+s5oQP9JHSUzP0LitWmKQzRpe0QFJHC\u002fxphYCNP6yAxP2rNI\u002fyGuSo1AJQSwcIUBpck4UAAAA7AQAAUEsBAhQAFAAICAgAbWUvWlAaXJOFAAAAOwEAAAcAAAAAAAAAAAAAAAAAAAAAAHVzZXIuanNQSwUGAAAAAAEAAQA1AAAAugAAAAAA"\n }\n}" ] } }

himani-dangwal avatar Jan 15 '25 12:01 himani-dangwal

Ok, I saw platformName: windows where it is going to situation mentioned in https://github.com/SeleniumHQ/docker-selenium/issues/2542 https://github.com/SeleniumHQ/docker-selenium/issues/2585 It will be fixed in Grid core 4.28.0 and KEDA core (probably 2.17.0). For now, you can do something to avoid this.

  1. In Helm config
    firefoxNode:
      resources:
        limits:
          memory: "2Gi"
          cpu: "1"
      hpa:
        platformName: "Linux"
  1. In automation code, based on binding that you are using, set capability platformName is Linux For example, Java
ChromeOptions chromeOptions = new ChromeOptions();
chromeOptions.setPlatformName("Linux")

VietND96 avatar Jan 16 '25 05:01 VietND96

We're having this issue also, and the workaround is not acceptable for us. I can't just tell my end users to update their automation code and expect it to be done in a timely manner. This is a showstopper for us and we will be rolling back to 0.37.

isc-aray avatar Jan 21 '25 14:01 isc-aray

Can you try chart 0.39.0 with Grid 4.28.0, also using KEDA core images delivered in this project for scaler fix https://github.com/SeleniumHQ/docker-selenium/tree/trunk/.keda Try to adjust the poll interval around 10~20 seconds

VietND96 avatar Jan 21 '25 17:01 VietND96

@VietND96 Sorry, I have people relying on this system and don't have the luxury of experimenting with it. A quick rollback is about all I can get away with. I'm happy to give a new released version of the chart a try when we next have a scheduled maintenance window.

isc-aray avatar Jan 21 '25 17:01 isc-aray

Sure, no problems, you can try and give feedback on latest version then.

VietND96 avatar Jan 21 '25 18:01 VietND96

with the latest version autoscaling issue is resolved. will monitor for session not created issue for few days post that will close it

himani-dangwal avatar Jan 30 '25 05:01 himani-dangwal

@VietND96 Still encountered session not created issue. issue was because of connection to KEDA Metrics Service gRPC server. when i restarted the pods of keda operator and metrics server then it worked. It was working fine from last week.

himani-dangwal avatar Feb 05 '25 05:02 himani-dangwal

issue was because of connection to KEDA Metrics Service gRPC server. when i restarted the pods of keda operator and metrics server then it worked

@himani-dangwal, on this issue, I forwarded to KEDA team, they asked whenever you can reproduce the issue, before restarting the pods, let's collect pod logs, then we can investigate further for this kind of intermittent issue.

VietND96 avatar Feb 06 '25 09:02 VietND96

Hi @himani-dangwal @VietND96 I've been having the exact same issue, currently I'm using the helm chart version 0.47.0, by any chance do you have an update?

dxm978 avatar Oct 07 '25 14:10 dxm978