Selenium Hub incorrectly believes CLIENT_STOPPED_SESSION has happened
Asked Answered
T

1

6

I am running parallel automated tests against a Selenium Grid.

Sometimes, a test with fail with;

Session [c1d99cc1-c689-4053-b68d-51c3682c13c4] was terminated due to CLIENT_STOPPED_SESSION (org.openqa.grid.common.exception.GridException)
[remote server] org.openqa.grid.internal.ActiveTestSessions(ActiveTestSessions.java):105:in `getExistingSession'

The Selenium documentation says;

CLIENT_STOPPED_SESSION  The session was stopped using an ordinary call to stop/quit on the client. Why are you using it again??

However, I know that the client has not attempted to stop/quit. I am using parallel rspec so each thread is actually it's own Ruby instance, so there is no issue test side.

Also, if I directly query the Node using http://{node_ip}:5556/wd/hub/static/resource/hub.html, I can see the session is still open. If quit/stop had been issued then, this session would have been deleted.

It would appear that it is only the Session Registry in the Selenium Grid Hub that thinks this session has been stopped. There is no evidence of the session being stopped anywhere else.

Is there a known issue with Grid where the incorrect session has been marked as stopped?

Terrenceterrene answered 28/10, 2014 at 14:50 Comment(6)
what version of selenium are you using?Lodie
To update, further investigation that there is always 'quit' command for an unrelated test/thread which failed 2 minutes earlier.Terrenceterrene
@RobbieWareham I am having similar issue, any solution to get this fixed? Does increasing the session timeouts resolves it?...... Error: "Session [2cbc449f-1394-4e95-930d-016e2ea78d1a] was terminated due to CLIENT_STOPPED_SESSION (org.openqa.grid.common.exception.GridException) occurred"Davena
No sorry, I have a new implementation that doesn't use Grid but spins up nodes for direct communication so no longer have this issueTerrenceterrene
@RobbieWareham: Sounds interesting!.. Can you please explain your approach..? any pointers/articles to start would be highly appreciated.Surname
@Surname Docker containersTerrenceterrene
P
-3

Please follow the blog and try the step, and let us know if that link doesn't help

https://seleniummonk.blogspot.in/p/selenium-grid.html

Peneus answered 21/9, 2016 at 19:9 Comment(1)
Sorry, I don't see what this has to do with the question?Terrenceterrene

© 2022 - 2024 — McMap. All rights reserved.