In the pure case, "chrome not reachable" means that Chrome can be started, but the debug port is not available.
The debug port is set by the argument: --remote-debugging-port = 12582
In my case, this is because some problems with the sandbox:
ps afvvx | grep chrome /opt/google/chrome/chrome --disable-background-networking --disable-client-side-phishing 21026 pts/2 S+ 0:00 0 47 6008 100 0.0 | \_ cat 21027 pts/2 S+ 0:00 0 47 6008 100 0.0 | \_ cat 21029 pts/2 Z+ 0:00 0 0 0 0 0.0 | \_ [chrome-sandbox] <defunct>
When I run / opt / google / chrome / chrome -sandbox
From the url above I cannot get what I will do to fix SUID SandBox, but it can be disabled using Chrome arg --disable-setuid-sandbox (sometimes with --no-sandbox):
import time from selenium import webdriver from xvfbwrapper import Xvfb vdisplay = Xvfb() vdisplay.start() from selenium.webdriver.chrome.options import Options chrome_options = Options() chrome_options.add_argument("--no-sandbox") chrome_options.add_argument("--disable-setuid-sandbox") driver = webdriver.Chrome('/usr/local/sbin/chromedriver', chrome_options=chrome_options)
source share