datart&selenium/standalone-chrome截图报错

发布时间 2023-09-15 11:00:27作者: 邹姣姣

背景

参考官方网站,以k8s方式进行部署:
https://running-elephant.gitee.io/datart-docs/docs/

报错信息:

datart.core.base.exception.BaseException: org.openqa.selenium.WebDriverException: unknown error: net::ERR_CONNECTION_REFUSED
  (Session info: headless chrome=96.0.4664.110)
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: host: 'dmp-datart-7b67d9bb67-5vh4z', ip: '192.168.89.195', os.name: 'Linux', os.arch: 'amd64', os.version: '4.19.12-1.el7.elrepo.x86_64', java.version: '1.8.0_342'
Driver info: org.openqa.selenium.remote.RemoteWebDriver
Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 96.0.4664.110, chrome: {chromedriverVersion: 96.0.4664.45 (76e4c1bb2ab46..., userDataDir: /tmp/.com.google.Chrome.gaEl8x}, goog:chromeOptions: {debuggerAddress: localhost:34449}, javascriptEnabled: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: LINUX, platformName: LINUX, proxy: Proxy(), se:cdp: ws://192.168.153.126:4444/s..., se:cdpVersion: 96.0.4664.110, se:vnc: ws://192.168.153.126:4444/s..., se:vncEnabled: true, se:vncLocalAddress: ws://192.168.153.126:7900, setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, webauthn:extension:credBlob: true, webauthn:extension:largeBlob: true, webauthn:virtualAuthenticators: true}
Session ID: 16ed795bea0f112a6c0ca7611635bf34
	at datart.core.base.exception.Exceptions.e(Exceptions.java:44)
	at datart.core.common.WebUtils.screenShot(WebUtils.java:94)
	at datart.core.common.WebUtils.screenShot2File(WebUtils.java:103)
	at datart.server.service.impl.AttachmentImageServiceImpl.getFile(AttachmentImageServiceImpl.java:59)
	at datart.server.service.impl.DownloadServiceImpl.lambda$submitDownloadTask$0(DownloadServiceImpl.java:95)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:750)
Caused by: org.openqa.selenium.WebDriverException: unknown error: net::ERR_CONNECTION_REFUSED
  (Session info: headless chrome=96.0.4664.110)