priya
priya

Reputation: 858

Randomly Tests failed with session cannot be created error while running Test cases in selenium grid on docker on linux

While executing the Tests on scheduled jenkins job which are running in selenium grid docker , Randomly a bunch of Tests fail giving following error :

Error : cannot create session chrome-91.0-LINUX on any hosts after 1 attempt(s) (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 10 milliseconds.

Stacktrace : org.openqa.selenium.WebDriverException: cannot create session chrome-91.0-LINUX on any hosts after 1 attempt(s) (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 10 milliseconds.

what I am doing is creating session before every Test case start and quitting driver after Test ends . Using chrome 91 version.

Upvotes: 1

Views: 612

Answers (1)

Ed Ram
Ed Ram

Reputation: 41

Go to the slave that runs the tests and run "docker ps". If you see lots of Selenoid containers you don't need - kill them. It helped me with the exact same error. If it doesn't help, you should make sure you have enough disk space, CPU and memory on your slave.

Upvotes: 1

Related Questions