Skip to content

[πŸ› Bug]: Could not start a new session -intermittentlyΒ #2526

@himani-dangwal

Description

@himani-dangwal

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions