尝试在Nginx上运行我的硒机器人时遇到问题。我将此机器人作为Flask网络应用程序的一部分。当我尝试运行此漫游器时,抛出页面-它会尝试一分钟,然后在此之后掉落。它引发了错误:
Sep 17 07:16:06 SimFree uwsgi[872]: File "/home/simfree/Flask_app/parseenv/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 251, in start_session
Sep 17 07:16:06 SimFree uwsgi[872]: response = self.execute(Command.NEW_SESSION, parameters)
Sep 17 07:16:06 SimFree uwsgi[872]: File "/home/simfree/Flask_app/parseenv/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 320, in execute
Sep 17 07:16:06 SimFree uwsgi[872]: self.error_handler.check_response(response)
Sep 17 07:16:06 SimFree uwsgi[872]: File "/home/simfree/Flask_app/parseenv/lib/python3.6/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
Sep 17 07:16:06 SimFree uwsgi[872]: raise exception_class(message, screen, stacktrace)
Sep 17 07:16:06 SimFree uwsgi[872]: selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally
Sep 17 07:16:06 SimFree uwsgi[872]: (unknown error: DevToolsActivePort file doesn't exist)
Sep 17 07:16:06 SimFree uwsgi[872]: (The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
Sep 17 07:16:06 SimFree uwsgi[872]: (Driver info: chromedriver=2.42.591071 (0b695ff80972cc1a65a5cd643186d2ae582cd4ac),platform=Linux 4.15.0-34-generic x86_64)
也许有人遇到过同样的问题,却没有办法解决?非常感谢。
P.S。我的硒机器人在无头模式下工作,我尝试设置no-sandbox等。但这无济于事。