Linux 服务器上无法正确调用 Selenium 框架制作的爬虫接口问题怎么解决?

查看 57|回复 1
作者:tiRolin   
本地使用就可以解决,但是服务器上不行
服务器的谷歌版本是 119.0.6045.123 ,chromedriver 的版本是 119.0.6045.105 ,我本地在 Windows 上都是可以正常运行的,但是 Linux 上就会报下面的异常
org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: session not created: Chrome failed to start: exited normally.
  (session not created: DevToolsActivePort file doesn't exist)
  (The process started from chrome location /opt/google/chrome/chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
Build info: version: '4.1.4', revision: '535d840ee2'
System info: host: 'VM-0-17-ubuntu', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.15.0-206-generic', java.version: '1.8.0_362'
Driver info: org.openqa.selenium.chrome.ChromeDriver
我去搜索引擎查了下这个异常,基本都是说谷歌浏览器的版本和 chromedriver 版本对不上的问题,但是我这个版本已经是最能对得上的了,完全切合的 chromedriver 版本我真找不到
这个问题卡了我挺久了,我不知道咋整所以来问问,看看有没有大佬能救下

Chrome, info, Session, 版本

yzding   
使用 headless 参数
您需要登录后才可以回帖 登录 | 立即注册

返回顶部