【问题标题】:Selenium - Unable to start server with either IPv4 or IPv6. ExitingSelenium - 无法使用 IPv4 或 IPv6 启动服务器。退出
【发布时间】:2022-01-14 13:16:35
【问题描述】:

我正在尝试打开 chromedriver.exe,但收到以下错误消息: “无法使用 ipv4 或 ipv6 启动服务器。正在退出..”

我尝试了以下方法,但没有成功:

  1. 尝试使用未连接任何进程的特定端口打开 chromedriver。
  2. 已下载 chromedriver 与 chrome 浏览器版本相同。
  3. 重新启动机器并尝试再次打开驱动程序。

注意事项:

  • 驱动程序启动但很少。我使用了它曾经开始使用它的端口,并尝试使用该特定端口再次打开它,但它没有启动。
  • 我也试过 IE 驱动,还是出现了同样的问题。

错误跟踪日志:

Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17
:03'
System info: host: 'GRKIF-CTXDA034', ip: '10.41.162.52', os.name: 'Windows Serve
r 2012 R2', os.arch: 'amd64', os.version: '6.3', java.version: '1.8.0_201'
Driver info: driver.version: unknown

Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17
:03'
System info: host: 'GRKIF-CTXDA034', ip: '10.41.162.52', os.name: 'Windows Serve
r 2012 R2', os.arch: 'amd64', os.version: '6.3', java.version: '1.8.0_201'
Driver info: driver.version: unknown

(03:51:05.534) - Warning: Cannot connect to server to check for updates (Server
returned HTTP response code: 504 for URL: http://10.97.109.210:8081/tacoe/downlo
ads/readme.txt), please connect to office net.
(03:51:16.760) - Info: Default Web Browser: Chrome
(03:51:16.760) - Info: Target (Name:Web, Platform:Web, Type:Chrome, Hub IP:Local
, Default:false) added.
Jan 10, 2022 3:51:16 PM org.openqa.selenium.remote.DesiredCapabilities chrome
INFO: Using `new ChromeOptions()` is preferred to `DesiredCapabilities.chrome()`(03:51:16.823) - Info: Chrome config created.
(03:51:16.839) - Info: Chrome config loaded.
(03:51:16.854) - Info: Target Type: Chrome
(03:51:16.870) - Info: ==============================
(03:51:16.870) - Info: Capabilities:
(03:51:16.885) - Info: Capability: acceptSslCerts=true
(03:51:16.901) - Info: Capability: applicationCacheEnabled=true
(03:51:16.901) - Info: Capability: browserConnectionEnabled=true
(03:51:16.917) - Info: Capability: browserName=chrome
(03:51:16.932) - Info: Capability: databaseEnabled=true
(03:51:16.948) - Info: Capability: elementScrollBehavior=1
(03:51:16.948) - Info: Capability: javascriptEnabled=true
(03:51:16.964) - Info: Capability: locationContextEnabled=true
(03:51:16.979) - Info: Capability: nativeEvents=true
(03:51:16.995) - Info: Capability: platform=ANY
(03:51:16.995) - Info: Capability: proxy={​​proxyType=SYSTEM, autodetect=false, ft
pProxy=null, httpProxy=null, noProxy=null, sslProxy=null, socksProxy=null, socks
Version=null, socksUsername=null, socksPassword=null, proxyAutoconfigUrl=null}​​
(03:51:17.010) - Info: Capability: rotatable=false
(03:51:17.026) - Info: Capability: unexpectedAlertBehaviour=ignore
(03:51:17.026) - Info: Capability: unhandledPromptBehavior=ignore
(03:51:17.042) - Info: Capability: version=
(03:51:17.057) - Info: Capability: webStorageEnabled=true
(03:51:17.073) - Info: Capability: webdriver.remote.quietExceptions=false
(03:51:17.089) - Info: ==============================
(03:51:17.089) - Info: Configurations:
(03:51:17.104) - Info: Config: target_path=
(03:51:17.120) - Info: Config: timeout_page=120000
(03:51:17.120) - Info: Config: timeout_find=2000
(03:51:17.135) - Info: Config: timeout_jscript=5000
(03:51:17.151) - Info: Config: timeout_ajax=20000
(03:51:17.167) - Info: Config: wait_for_pageLoad=true
(03:51:17.167) - Info: Config: serverAddress=Local
(03:51:17.182) - Info: Config: auto_select_window=false
(03:51:17.198) - Info: Config: auto_maxmize=false
(03:51:17.198) - Info: Config: mobileEmulation=false
Starting ChromeDriver 96.0.4664.45 (76e4c1bb2ab4671b8beba3444e61c0f17584b2fc-ref
s/branch-heads/4664@{​​#947}​​) on port 14593
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggest
ions on keeping ChromeDriver safe.
Unable to start server with either IPv4 or IPv6. Exiting...
Jan 10, 2022 3:51:37 PM org.openqa.selenium.os.OsProcess checkForError
SEVERE: org.apache.commons.exec.ExecuteException: Process exited with an error:
1 (Exit value: 1)
(03:51:37.246) - Error: 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: 'GRKIF-CTXDA034', ip: '10.41.162.52', os.name: 'Windows Serve
r 2012 R2', os.arch: 'amd64', os.version: '6.3', java.version: '1.8.0_201'
Driver info: driver.version: ChromeDriver
org.openqa.selenium.WebDriverException: Timed out waiting for driver server to s
tart.
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17
:03'
System info: host: 'GRKIF-CTXDA034', ip: '10.41.162.52', os.name: 'Windows Serve
r 2012 R2', os.arch: 'amd64', os.version: '6.3', java.version: '1.8.0_201'
Driver info: driver.version: ChromeDriver
at org.openqa.selenium.remote.service.DriverService.waitUntilAvailable(D
riverService.java:202)
at org.openqa.selenium.remote.service.DriverService.start(DriverService.
java:188)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(Driv
erCommandExecutor.java:79)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.ja
va:552)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriv
er.java:213)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.jav
a:131)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:181)at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:168)at 
Caused by: org.openqa.selenium.net.UrlChecker$TimeoutException: Timed out waitin
g for [http://localhost:14593/status] to be available after 20012 ms
at org.openqa.selenium.net.UrlChecker.waitUntilAvailable(UrlChecker.java
:100)
at org.openqa.selenium.remote.service.DriverService.waitUntilAvailable(D
riverService.java:197)
... 12 more
Caused by: java.util.concurrent.TimeoutException
at java.util.concurrent.FutureTask.get(FutureTask.java:205)
at com.google.common.util.concurrent.SimpleTimeLimiter.callWithTimeout(S
impleTimeLimiter.java:156)
at org.openqa.selenium.net.UrlChecker.waitUntilAvailable(UrlChecker.java
:75)
... 13 more
(03:51:37.371) - Error: Browser didn't open.

【问题讨论】:

  • 使用完整的错误跟踪日志更新问题。
  • @undetectedSelenium 完成
  • 让我再看看

标签: selenium google-chrome selenium-webdriver selenium-chromedriver


【解决方案1】:

此错误消息...

Unable to start server with either IPv4 or IPv6. Exiting...

...暗示ChromeDriver 无法启动/生成新的浏览上下文,即Chrome 浏览器 会话。

您的主要问题可能是您使用的二进制文件版本之间的不兼容,因为未检测到 ChromeDriver 版本:

Driver info: driver.version: unknown

解决方案

确保:

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-06-29
    • 1970-01-01
    • 1970-01-01
    • 2021-07-01
    • 2016-06-14
    • 1970-01-01
    相关资源
    最近更新 更多