GWYOG-Hoshino-plugins
GWYOG-Hoshino-plugins copied to clipboard
会展爬虫在centos下无法运行
chrome和chromedriver均已正常配置 [root@VM-1-10-centos ]# google-chrome --version Google Chrome 91.0.4472.114 [root@VM-1-10-centos ]# chromedriver Starting ChromeDriver 91.0.4472.19 (1bf021f248676a0b2ab3ee0561d83a59e424c23e-refs/branch-heads/4472@{#288}) on port 9515 Only local connections are allowed. Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe. ChromeDriver was started successfully. ^C [root@VM-1-10-centos ]#
[2021-07-06 21:54:25,370 nga-clan-battle-spider] INFO: Scheduled job nga_spider start. [2021-07-06 21:54:26,444 nga-clan-battle-spider] ERROR: <class 'selenium.common.exceptions.WebDriverException'> occured when doing scheduled job nga_spider . [2021-07-06 23:54:26,445 nga-clan-battle-spider] ERROR: Message: unknown error: Chrome failed to start: exited abnormally. (unknown error: DevToolsActivePort file doesn't exist) (The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.) Traceback (most recent call last): File "/root/pcrbot/HoshinoBot/hoshino/service.py", line 338, in wrapper ret = await func() File "/root/pcrbot/HoshinoBot/hoshino/modules/ngaclanbattlespider/ngaclanbattlespider.py", line 190, in nga_spider NGASpider.set_cookies(await get_nga_cookies()) File "/root/pcrbot/HoshinoBot/hoshino/modules/ngaclanbattlespider/ngaclanbattlespider.py", line 139, in get_nga_cookies driver = webdriver.Chrome() File "/root/.cache/pypoetry/virtualenvs/pcrbot-k97M30qc-py3.9/lib/python3.9/site-packages/selenium/webdriver/chrome/webdriver.py", line 76, in init RemoteWebDriver.init( File "/root/.cache/pypoetry/virtualenvs/pcrbot-k97M30qc-py3.9/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 157, in init self.start_session(capabilities, browser_profile) File "/root/.cache/pypoetry/virtualenvs/pcrbot-k97M30qc-py3.9/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 252, in start_ses sion response = self.execute(Command.NEW_SESSION, parameters) File "/root/.cache/pypoetry/virtualenvs/pcrbot-k97M30qc-py3.9/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute self.error_handler.check_response(response) File "/root/.cache/pypoetry/virtualenvs/pcrbot-k97M30qc-py3.9/lib/python3.9/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_ response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally. (unknown error: DevToolsActivePort file doesn't exist) (The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)