-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
Closed as not planned
Closed as not planned
Copy link
Labels
A-needs-triagingA Selenium member will evaluate this soon!A Selenium member will evaluate this soon!I-defectSomething is not working as intendedSomething is not working as intended
Description
What happened?
when create session via remoteWebDriver(), it throws an exception: Unable to create session: Could not start a new session. java.util.concurrent.TimeoutException
How can we reproduce the issue?
ChromeOptions options1 = new ChromeOptions();
options1.addArguments("--headless");
options1.addArguments("--window-size=1920,1080");
options1.addArguments("--no-sandbox");
options1.addArguments("--disable-dev-shm-usage");
ProxyConfig proxyConfig = new ProxyConfig();
options1.addArguments(String.format("--proxy-server=http://%s:%s", proxyConfig.getValueByKey("PROXY_HOST"), proxyConfig.getValueByKey("PROXY_PORT")));
driver = new RemoteWebDriver(new URL("http://10.119.101.54:4444"), options1);Relevant log output
Some log for hub:
11:05:30.396 INFO [LocalDistributor.newSession] - Session request received by the Distributor:
[Capabilities {browserName: chrome, goog:chromeOptions: {args: [--headless, --window-size=1920,1080, --no-sandbox, --disable-dev-shm-usage, --proxy-server=http://ntpro...], extensions: []}}]
11:06:14.272 INFO [Node.<init>] - Binding additional locator mechanisms: relative
11:07:14.305 INFO [Node.<init>] - Binding additional locator mechanisms: relative
11:08:14.259 INFO [Node.<init>] - Binding additional locator mechanisms: relative
11:08:30.404 WARN [SeleniumSpanExporter$1.lambda$export$3] - {"traceId": "2bf9ba90d84f3d93cba0cbe24d7f5a5e","eventTime": 1724123130395671697,"eventName": "Session request received by the Distributor","attributes": {"logger": "org.openqa.selenium.grid.distributor.local.LocalDistributor","request.payload": "[Capabilities {browserName: chrome, goog:chromeOptions: {args: [--headless, --window-size=1920,1080, --no-sandbox, --disable-dev-shm-usage, --proxy-server=http:\u002f\u002fntpro...], extensions: []}}]"}}
11:08:30.405 WARN [SeleniumSpanExporter$1.lambda$export$1] - Unable to create session: Could not start a new session. java.util.concurrent.TimeoutException
Build info: version: '4.17.0', revision: 'e52b1be057*'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '5.15.80-trip20240626.el9.x86_64', java.version: '11.0.14.1'
Driver info: driver.version: unknown
Host info: host: 'r100021942-71111192-0', ip: '10.119.101.54'
11:08:30.407 WARN [SeleniumSpanExporter$1.lambda$export$1] - org.openqa.selenium.SessionNotCreatedException: Could not start a new session. java.util.concurrent.TimeoutException
Build info: version: '4.17.0', revision: 'e52b1be057*'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '5.15.80-trip20240626.el9.x86_64', java.version: '11.0.14.1'
Driver info: driver.version: unknown
Host info: host: 'r100021942-71111192-0', ip: '10.119.101.54'
at org.openqa.selenium.grid.distributor.local.LocalDistributor.startSession(LocalDistributor.java:655)
at org.openqa.selenium.grid.distributor.local.LocalDistributor.newSession(LocalDistributor.java:570)
at org.openqa.selenium.grid.distributor.local.LocalDistributor$NewSessionRunnable.handleNewSessionRequest(LocalDistributor.java:830)
at org.openqa.selenium.grid.distributor.local.LocalDistributor$NewSessionRunnable.lambda$run$1(LocalDistributor.java:790)
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)
Caused by: org.openqa.selenium.TimeoutException: java.util.concurrent.TimeoutException
Build info: version: '4.17.0', revision: 'e52b1be057*'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '5.15.80-trip20240626.el9.x86_64', java.version: '11.0.14.1'
Driver info: driver.version: unknown
at org.openqa.selenium.remote.http.jdk.JdkHttpClient.execute0(JdkHttpClient.java:402)
at org.openqa.selenium.remote.http.AddSeleniumUserAgent.lambda$apply$0(AddSeleniumUserAgent.java:42)
at org.openqa.selenium.remote.http.Filter.lambda$andFinally$1(Filter.java:55)
at org.openqa.selenium.remote.http.jdk.JdkHttpClient.execute(JdkHttpClient.java:358)
at org.openqa.selenium.remote.tracing.TracedHttpClient.execute(TracedHttpClient.java:54)
at org.openqa.selenium.grid.security.AddSecretFilter.lambda$apply$0(AddSecretFilter.java:40)
at org.openqa.selenium.remote.http.Filter.lambda$andFinally$1(Filter.java:55)
at org.openqa.selenium.grid.node.remote.RemoteNode.newSession(RemoteNode.java:130)
at org.openqa.selenium.grid.distributor.local.LocalDistributor.startSession(LocalDistributor.java:651)
... 6 more
Caused by: java.util.concurrent.TimeoutException
at java.base/java.util.concurrent.CompletableFuture.timedGet(CompletableFuture.java:1886)
at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2021)
at org.openqa.selenium.remote.http.jdk.JdkHttpClient.execute0(JdkHttpClient.java:385)
... 14 more
11:08:30.408 WARN [SeleniumSpanExporter$1.lambda$export$3] - {"traceId": "2bf9ba90d84f3d93cba0cbe24d7f5a5e","eventTime": 1724123310402541806,"eventName": "exception","attributes": {"exception.message": "Unable to create session: Could not start a new session. java.util.concurrent.TimeoutException\nBuild info: version: '4.17.0', revision: 'e52b1be057*'\nSystem info: os.name: 'Linux', os.arch: 'amd64', os.version: '5.15.80-trip20240626.el9.x86_64', java.version: '11.0.14.1'\nDriver info: driver.version: unknown \nHost info: host: 'r100021942-71111192-0', ip: '10.119.101.54'","exception.stacktrace": "org.openqa.selenium.SessionNotCreatedException: Could not start a new session. java.util.concurrent.TimeoutException\nBuild info: version: '4.17.0', revision: 'e52b1be057*'\nSystem info: os.name: 'Linux', os.arch: 'amd64', os.version: '5.15.80-trip20240626.el9.x86_64', java.version: '11.0.14.1'\nDriver info: driver.version: unknown \nHost info: host: 'r100021942-71111192-0', ip: '10.119.101.54'\n\tat org.openqa.selenium.grid.distributor.local.LocalDistributor.startSession(LocalDistributor.java:655)\n\tat org.openqa.selenium.grid.distributor.local.LocalDistributor.newSession(LocalDistributor.java:570)\n\tat org.openqa.selenium.grid.distributor.local.LocalDistributor$NewSessionRunnable.handleNewSessionRequest(LocalDistributor.java:830)\n\tat org.openqa.selenium.grid.distributor.local.LocalDistributor$NewSessionRunnable.lambda$run$1(LocalDistributor.java:790)\n\tat java.base\u002fjava.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)\n\tat java.base\u002fjava.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)\n\tat java.base\u002fjava.lang.Thread.run(Thread.java:829)\nCaused by: org.openqa.selenium.TimeoutException: java.util.concurrent.TimeoutException\nBuild info: version: '4.17.0', revision: 'e52b1be057*'\nSystem info: os.name: 'Linux', os.arch: 'amd64', os.version: '5.15.80-trip20240626.el9.x86_64', java.version: '11.0.14.1'\nDriver info: driver.version: unknown\n\tat org.openqa.selenium.remote.http.jdk.JdkHttpClient.execute0(JdkHttpClient.java:402)\n\tat org.openqa.selenium.remote.http.AddSeleniumUserAgent.lambda$apply$0(AddSeleniumUserAgent.java:42)\n\tat org.openqa.selenium.remote.http.Filter.lambda$andFinally$1(Filter.java:55)\n\tat org.openqa.selenium.remote.http.jdk.JdkHttpClient.execute(JdkHttpClient.java:358)\n\tat org.openqa.selenium.remote.tracing.TracedHttpClient.execute(TracedHttpClient.java:54)\n\tat org.openqa.selenium.grid.security.AddSecretFilter.lambda$apply$0(AddSecretFilter.java:40)\n\tat org.openqa.selenium.remote.http.Filter.lambda$andFinally$1(Filter.java:55)\n\tat org.openqa.selenium.grid.node.remote.RemoteNode.newSession(RemoteNode.java:130)\n\tat org.openqa.selenium.grid.distributor.local.LocalDistributor.startSession(LocalDistributor.java:651)\n\t... 6 more\nCaused by: java.util.concurrent.TimeoutException\n\tat java.base\u002fjava.util.concurrent.CompletableFuture.timedGet(CompletableFuture.java:1886)\n\tat java.base\u002fjava.util.concurrent.CompletableFuture.get(CompletableFuture.java:2021)\n\tat org.openqa.selenium.remote.http.jdk.JdkHttpClient.execute0(JdkHttpClient.java:385)\n\t... 14 more\n","exception.type": "org.openqa.selenium.SessionNotCreatedException","logger": "org.openqa.selenium.grid.distributor.local.LocalDistributor","request.payload": "[Capabilities {browserName: chrome, goog:chromeOptions: {args: [--headless, --window-size=1920,1080, --no-sandbox, --disable-dev-shm-usage, --proxy-server=http:\u002f\u002fntpro...], extensions: []}}]"}}
For Node:
[root@r100021942-71111186-0 bin]# java --add-opens java.base/jdk.internal.misc=ALL-UNNAMED -Dio.netty.tryReflectionSetAccessible=true -jar selenium-server-4.23.0.jar node --driver-configuration display-name="Chrome" max-sessions=10 webdriver-path="/usr/bin/chromedriver" stereotype='{"browserName":"chrome"}' --detect-drivers false --hub http://10.119.101.54:4444
11:01:43.319 INFO [LoggingOptions.configureLogEncoding] - Using the system default encoding
11:01:43.329 INFO [OpenTelemetryTracer.createTracer] - Using OpenTelemetry for tracing
11:01:43.601 INFO [UnboundZmqEventBus.<init>] - Connecting to tcp://10.119.101.54:4442 and tcp://10.119.101.54:4443
11:01:43.710 INFO [UnboundZmqEventBus.<init>] - Sockets created
11:01:44.714 INFO [UnboundZmqEventBus.<init>] - Event bus ready
11:01:44.900 INFO [NodeServer.createHandlers] - Reporting self as: http://10.119.101.49:5555
11:01:44.952 INFO [NodeOptions.getSessionFactories] - Detected 32 available processors
11:01:45.095 INFO [NodeOptions.report] - Adding Chrome for {"browserName": "chrome","platformName": "linux"} 10 times
11:01:45.208 INFO [Node.<init>] - Binding additional locator mechanisms: relative
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by io.netty.util.internal.ReflectionUtil (file:/opt/tomcat/bin/selenium-server-4.23.0.jar) to constructor java.nio.DirectByteBuffer(long,int)
WARNING: Please consider reporting this to the maintainers of io.netty.util.internal.ReflectionUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
11:01:45.543 INFO [NodeServer$1.start] - Starting registration process for Node http://10.119.101.49:5555
11:01:45.546 INFO [NodeServer.execute] - Started Selenium node 4.23.0 (revision 4df0a231af): http://10.119.101.49:5555
11:01:45.613 INFO [NodeServer$1.lambda$start$1] - Sending registration event...
11:01:46.079 INFO [NodeServer.lambda$createHandlers$2] - Node has been added
11:07:02.459 WARN [SeleniumManager.lambda$runCommand$1] - Exception managing chrome: error sending request for url (https://googlechromelabs.github.io/chrome-for-testing/known-good-versions-with-downloads.json)
11:07:02.465 WARN [SeleniumManager.lambda$runCommand$1] - Error sending stats to Plausible: error sending request for url (https://plausible.io/api/event)
11:07:03.329 INFO [LocalNode.newSession] - Session created by the Node. Id: 3fa876dfe5f317469f924fe3e4837d60, Caps: Capabilities {acceptInsecureCerts: false, browserName: chrome-headless-shell, browserVersion: 124.0.6367.118, chrome: {chromedriverVersion: 124.0.6367.78 (a087f2dd364d..., userDataDir: /tmp/.org.chromium.Chromium...}, fedcm:accounts: true, goog:chromeOptions: {debuggerAddress: localhost:36717}, networkConnectionEnabled: false, pageLoadStrategy: normal, platformName: linux, proxy: Proxy(), se:bidiEnabled: false, se:cdp: ws://10.119.101.54:4444/ses..., se:cdpVersion: 124.0.6367.118, setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, webauthn:extension:credBlob: true, webauthn:extension:largeBlob: true, webauthn:extension:minPinLength: true, webauthn:extension:prf: true, webauthn:virtualAuthenticators: true}
11:10:30.577 WARN [SeleniumManager.lambda$runCommand$1] - Exception managing chrome: error sending request for url (https://googlechromelabs.github.io/chrome-for-testing/known-good-versions-with-downloads.json)
11:10:31.016 INFO [LocalNode.newSession] - Session created by the Node. Id: 93ab2f3b87fae926531ab33f4604f31f, Caps: Capabilities {acceptInsecureCerts: false, browserName: chrome-headless-shell, browserVersion: 124.0.6367.118, chrome: {chromedriverVersion: 124.0.6367.78 (a087f2dd364d..., userDataDir: /tmp/.org.chromium.Chromium...}, fedcm:accounts: true, goog:chromeOptions: {debuggerAddress: localhost:46883}, networkConnectionEnabled: false, pageLoadStrategy: normal, platformName: linux, proxy: Proxy(), se:bidiEnabled: false, se:cdp: ws://10.119.101.54:4444/ses..., se:cdpVersion: 124.0.6367.118, setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, webauthn:extension:credBlob: true, webauthn:extension:largeBlob: true, webauthn:extension:minPinLength: true, webauthn:extension:prf: true, webauthn:virtualAuthenticators: true}
11:12:15.268 INFO [LocalNode.stopTimedOutSession] - Session id 3fa876dfe5f317469f924fe3e4837d60 timed out, stopping...
11:12:15.359 INFO [SessionSlot.stop] - Stopping session 3fa876dfe5f317469f924fe3e4837d60Operating System
ubuntu
Selenium version
java 4.23.0
What are the browser(s) and version(s) where you see this issue?
chrome 124
What are the browser driver(s) and version(s) where you see this issue?
chromedriver 124
Are you using Selenium Grid?
hub: 4.17.0 node:4.23.0
Metadata
Metadata
Assignees
Labels
A-needs-triagingA Selenium member will evaluate this soon!A Selenium member will evaluate this soon!I-defectSomething is not working as intendedSomething is not working as intended