Starting ChromeDriver 98.0.4758.80 (7f0488e8ba0d8e019187c6325a16c29d9b7f4989-refs/branch-heads/4758@{#972}) on port 12326
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
[1644434934.334][SEVERE]: listen() returned an error: An attempt was made to access a socket in a way forbidden by its access permissions. (0x271D)
[1644434934.335][SEVERE]: bind() returned an error: An attempt was made to access a socket in a way forbidden by its access permissions. (0x271D)
Unable to start server with either IPv4 or IPv6. Exiting...
Feb 10, 2022 12:59:14 AM org.openqa.selenium.os.OsProcess checkForError
SEVERE: org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
Exception in thread "main" org.openqa.selenium.WebDriverException: Timed out waiting for driver server to start.
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'DESKTOP-UJJ98PR', ip: '192.168.45.184', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_301'
Driver info: driver.version: ChromeDriver
at org.openqa.selenium.remote.service.DriverService.waitUntilAvailable(DriverService.java:202)
at org.openqa.selenium.remote.service.DriverService.start(DriverService.java:188)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:79)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:213)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:131)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:181)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:168)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:123)
at pack1.Test.main(Test.java:9)
Caused by: org.openqa.selenium.net.UrlChecker$TimeoutException: Timed out waiting for [http://localhost:12326/status] to be available after 20009 ms
at org.openqa.selenium.net.UrlChecker.waitUntilAvailable(UrlChecker.java:100)
at org.openqa.selenium.remote.service.DriverService.waitUntilAvailable(DriverService.java:197)
... 9 more
Caused by: java.util.concurrent.TimeoutException
at java.util.concurrent.FutureTask.get(FutureTask.java:205)
at com.google.common.util.concurrent.SimpleTimeLimiter.callWithTimeout(SimpleTimeLimiter.java:156)
at org.openqa.selenium.net.UrlChecker.waitUntilAvailable(UrlChecker.java:75)
... 10 more
CodePudding user response:
This part
[1644434934.334][SEVERE]: listen() returned an error: An attempt was made to access a socket in a way forbidden by its access permissions. (0x271D)
[1644434934.335][SEVERE]: bind() returned an error: An attempt was made to access a socket in a way forbidden by its access permissions. (0x271D)
suggests that Chrome driver cannot start listening on local port 12326 because it seems to be already taken by another process. This port should normally be selected randomly from a pool of free ports, so the question raises if you by any chance configured Chrome driver to listen on hardcoded port, and now are facing problems with multiple instances running at the same time.
Also, may be caused by security settings of the system (strict firewall/antivirus policies, etc).
CodePudding user response:
Seems to me that this URL http://localhost:12326/status is highly suspect. Try opening a well-known URL like https://www.google.com and see if your problem goes away. I am willing to bet it will. If your problem goes away, then you need to check what is happening with your localhost service. Most likely is not running, or the port is incorrect.
