Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
himani-dangwal opened this issue Dec 23, 2024 · 8 comments
Open

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

himani-dangwal opened this issue Dec 23, 2024 · 8 comments

Comments

@himani-dangwal
Copy link

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

Copy link

@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!

@VietND96
Copy link
Member

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

@himani-dangwal
Copy link
Author

No I only have single node version

@VietND96
Copy link
Member

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

@himani-dangwal
Copy link
Author

himani-dangwal commented Dec 23, 2024

Hi please find the log of distributor pod
distributor.txt

@himani-dangwal
Copy link
Author

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

@VietND96
Copy link
Member

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
Copy link
Member

VietND96 commented Jan 3, 2025

Can you try chart 0.38.3 and confirm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants