Closed nairdinesh04 closed 5 days ago
@nairdinesh04, thank you for creating this issue. We will troubleshoot it as soon as we can.
Triage this issue by using labels.
If information is missing, add a helpful comment and then I-issue-template
label.
If the issue is a question, add the I-question
label.
If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted
label.
If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C),
add the applicable G-*
label, and it will provide the correct link and auto-close the
issue.
After troubleshooting the issue, please add the R-awaiting answer
label.
Thank you!
Can you share the complete Grid logs? Hub and Node.
Can you share the complete Grid logs? Hub and Node.
I dont see any logs on grid command prompt. The only logs that I have is what I see in my IDE and the same has been posted above.
Are you sure that the following code-snipped points to the right URL of the Grid?
new URI("hub
So like: new URL("http://localhost:4444") if i run it localy? Because if you have a connection-timeout and you don't see anything in the log of grid or node, it looks like there is absolutely no connection from your application to the grid.
Can you please share the Capabilities witch are in the option on time you create the Remote-Webdriver? And if its possible a little bit more code on top of this code snipped?
As I cannot share the IP in the code snippet I have mentioned hub
The capability in the option is already shared nothing else apart from that.
What happend if you call this? ( Please change IP)
public static void main(String[] args) throws MalformedURLException { String ip = "localhost"; String port = "4444"; String gridUrl = "http://".concat(ip).concat(":").concat(port); WebDriver driver = new RemoteWebDriver(new URL(gridUrl), new ChromeOptions()); driver.quit(); }
I think, that your Application does not have access to the Grid or to the port 4444. Are you sure the port is exposed from the Server, the Hub is running on? And is the Server callable without a proxy or something?
Yes I think Grid is fine because nodes(other remote VMs) are able to get registered on the node. Let me try running the script from the same machine as grid. I will update the result here.
I tried executing code from the same machine where grid is running, but I am seeing the same error.
public static void main(String[] args) throws MalformedURLException { String ip = "localhost"; String port = "4444"; String gridUrl = "http://".concat(ip).concat(":").concat(port); WebDriver driver = new RemoteWebDriver(new URL(gridUrl), new ChromeOptions()); driver.quit(); }
For this if I am not wrong "URL" is deprecated and we will have to use URI.ToUrl() instead.
Can you share the complete Grid logs? Hub and Node.
I dont see any logs on grid command prompt. The only logs that I have is what I see in my IDE and the same has been posted above.
There must be logs, unless you specifically tell the Grid to not log anything. How are you starting the Grid? Can you please check on the Grid machine(s) for the logs when it starts and when the execution is attempted?
-----------These are all the logs I see---------------------------------------
C:\Users\user\Downloads>java -jar selenium-server-4.21.0.jar hub (This is how I am starting grid)
00:17:27.550 INFO [LoggingOptions.configureLogEncoding] - Using the system default encoding
00:17:27.565 INFO [OpenTelemetryTracer.createTracer] - Using OpenTelemetry for tracing
00:17:28.312 INFO [BoundZmqEventBus.
05:08:54.071 INFO [LocalDistributor.newSession] - Session request received by the Distributor: [Capabilities {browserName: chrome, goog:chromeOptions: {args: [], excludeSwitches: [enable-automation], extensions: []}}] 05:13:54.197 WARN [SeleniumSpanExporter$1.lambda$export$3] - {"traceId": "ce4880119a96041011b32a8c2f244d67","eventTime": 1719569634190037000,"eventName": "HTTP request execution complete","attributes": {"http.flavor": 1,"http.handler_class": "org.openqa.selenium.grid.sessionqueue.local.LocalNewSessionQueue","http.host": "localhost:4444","http.method": "POST","http.request_content_length": "291","http.scheme": "HTTP","http.status_code": 500,"http.target": "\u002fsession","http.user_agent": "selenium\u002f4.20.0 (java windows)"}}
05:13:54.173 WARN [SeleniumSpanExporter$1.lambda$export$3] - {"traceId": "bc0d8e3f69fb66d17a0c4c4e1dd5c02c","eventTime": 1719569634163193500,"eventName": "HTTP request execution complete","attributes": {"http.flavor": 1,"http.handler_class": "org.openqa.selenium.grid.sessionqueue.local.LocalNewSessionQueue","http.host": "localhost:4444","http.method": "POST","http.request_content_length": "291","http.scheme": "HTTP","http.status_code": 500,"http.target": "\u002fsession","http.user_agent": "selenium\u002f4.20.0 (java windows)"}}
05:08:54.081 INFO [LocalDistributor.newSession] - Session request received by the Distributor:
[Capabilities {browserName: chrome, goog:chromeOptions: {args: [], excludeSwitches: [enable-automation], extensions: []}}]
05:35:50.314 INFO [LocalDistributor.newSession] - Session created by the Distributor. Id: 9d2f7e2e04675918db5b3c1706d9dc1e
Caps: Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 126.0.6478.127, chrome: {chromedriverVersion: 126.0.6478.126 (d36ace6122e..., userDataDir: C:\Users\SVC_CM~1\AppData\L...}, fedcm:accounts: true, goog:chromeOptions: {debuggerAddress: localhost:54546}, networkConnectionEnabled: false, pageLoadStrategy: normal, platformName: Windows 10, proxy: {}, se:bidiEnabled: false, se:cdp: ws://10.133.48.159:4444/gri..., se:cdpVersion: 126.0.6478.127, 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}
05:35:50.598 INFO [LocalDistributor.newSession] - Session created by the Distributor. Id: 5edde53b5205cdb2e0d0bc5273be5271
Caps: Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 126.0.6478.127, chrome: {chromedriverVersion: 126.0.6478.126 (d36ace6122e..., userDataDir: C:\Users\SVC_CM~1\AppData\L...}, fedcm:accounts: true, goog:chromeOptions: {debuggerAddress: localhost:54545}, networkConnectionEnabled: false, pageLoadStrategy: normal, platformName: Windows 10, proxy: {}, se:bidiEnabled: false, se:cdp: ws://hub
Not sure why logs are getting stroked out.
Strangely I see execution happening in one node machine now. However the tests are running only in one node as of now. Trying to find what's wrong with the other node. Registration is successful though. I will need sometime to debug. We can close this ticket and if needed I will create a separate one. Thank you very much all of you!!
you are very welcome
What happened?
Hi There,
I have a selenium grid hub and two nodes registered to the same. I can see the node sessions on selenium grid UI.
But I get error saying when executing my scripts and browsers are not getting launched: org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Selenium Version :
Browser - Chrome
How can we reproduce the issue?
Operating System
Windows 10
Selenium version
Java 4.20.0
What are the browser(s) and version(s) where you see this issue?
Chrome - 126.0.6478.127
What are the browser driver(s) and version(s) where you see this issue?
NA
Are you using Selenium Grid?
4.21.0