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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
[馃悰 Bug]: Grid 4.2.2 - unable to create new sessions #1605
Comments
This comment was marked as spam.
This comment was marked as spam.
Thank you for reporting. I am able to reproduce, however I do not get the exact same stacktrace but the Grid is not usable after the Not sure how to solve this for now, as the initial server implementation has a few assumptions that make it hard to fix. I need to re-think it and see how we can fix this. |
Hitting same issue in our test environment with max 60 sessions in our selenium hub. Any suggestion on recent stable version of the hub I could upgrade. So far we failed two attempt to upgrade to Selenium4 and sticking to Selenium3 due to session issues we had in 4.1.3 and 4.3.0. Thanks |
Got the same error, seem the session is released by grid after 5 minutes inactive. happens with 4.3 latest version also selenium_v4_docker_grid-node-docker-1 | 14:55:07.923 INFO [Container.stop] - Stopping container 506d4645a7016e38b31cb588235732750cd8d0dbfeedce8298e8c7216217f704 |
This issue is also there on selenium 4.3.0 version, We did selenium gird setup without docker and still issue is there with below error, |
@diemol
|
I'm having the same issue with only one session running interactions with the session ended. Does anyone know a solution? The grid version used to run the scripts is Grid Log
Python Script
|
@diemol - There seems to be two issues that are mentioned in this defect.
Here's the docker compose file I used version: "3"
services:
chrome:
image: selenium/node-chrome:4.5.3-20221024
shm_size: 2gb
depends_on:
- selenium-hub
environment:
- SE_NODE_SESSION_TIMEOUT=2
- SE_EVENT_BUS_HOST=selenium-hub
- SE_EVENT_BUS_PUBLISH_PORT=4442
- SE_EVENT_BUS_SUBSCRIBE_PORT=4443
selenium-hub:
image: selenium/hub:4.5.3-20221024
container_name: selenium-hub
ports:
- "4442:4442"
- "4443:4443"
- "4444:4444" Here's a sample that I ran import java.net.URL;
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.chrome.ChromeOptions;
import org.openqa.selenium.remote.RemoteWebDriver;
public class SessionsExample {
public static void main(String[] args) throws Exception {
try {
System.err.println("Running First test with an induced timeout");
runTest(true);
} catch (Exception ignored) {
}
System.err.println("Running Second test without any timeouts");
runTest(false);
}
private static void runTest(boolean addTimeOut) throws Exception {
RemoteWebDriver driver = null;
try {
driver = new RemoteWebDriver(new URL("http://localhost:4444"), new ChromeOptions());
System.err.println("Session ID " + driver.getSessionId().toString());
driver.get("https://www.selenium.dev/");
if (addTimeOut) {
TimeUnit.SECONDS.sleep(45);
System.err.println("Slept for 45 seconds");
}
System.err.println("Title " + driver.getTitle());
} finally {
if (driver != null) {
driver.quit();
}
}
}
}
So if the first issue is no longer happening (atleast not for me on 4.5.3) then maybe we can close this off. @lszasz @roderiano @SACTAN - Thoughts ? |
This was an actual issue caused by the retries in the The fix closes the input pipeline when a 404 is responded. It will be part of 4.6.0, which should come out in the next few days. |
In some cases the resource is not found, and if we have not read completely the input stream, a read/write lock will happen since the client gets a response and won't stream the remaining content. Closing the pipe avoids a lock and leaves the RequestConverter ready for upcoming requests. Fixes SeleniumHQ/docker-selenium#1646 Fixes SeleniumHQ/docker-selenium#1605
Same happening to our Team. After a some hours, doing some selenium work, closing windows and quitting sessions, we face exactly this. But session seems to be created, but operating on it (setting a page_load_timeout) raises a 404, and then all is the same. Also happens with other operations, it's not necessarily linked to set_page_load_timeout. It seems the session is created but in a buggy way, and server cannot later on make use of it. |
Updated finally from 3.x a few days ago to 4.6.0 and everything is running smooth. Thanks a lot @diemol! |
i am on 4.7 and it steel happening. |
@lior277 - Can you please add some additional context?
|
|
If you are facing this issue, please create a new issue with a complete way to reproduce it, otherwise we cannot really have a look at it. |
@diemol @krmahadevan I'm also facing this issue with latest version of selenium Grid 4.8.1 (revision 8ebccac989) |
Im using a container (standalone-chrome latest ver.) and facing the same issue. Downgraded to |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
What happened?
Steps to reproduce:
Actual: The hub crashes and from this point on will be unable to create new session
You can reproduce the issue using the test from https://github.com/lszasz/selenium-test
Moreover /status is not reflecting that there are problems with the grid.
Command used to start Selenium Grid with Docker
Relevant log output
Operating System
Centos 7
Docker Selenium version (tag)
selenium/hub:4.2.2
The text was updated successfully, but these errors were encountered: