python - The browser appears to have exited before we could connect. The output was: mkdir: cannot create directory -


i had python script running successfully. .py script open headless browser(pyvirtualdisplay & xvfb) , perform task , close browser. had issue xvfb processes being left open after script run. after run many times tend accumulate. periodically run killall command through ssh shell kill stagnant xvfb processes. didn't seem cause problems. attempted automate task setting cron job executed following command.
ps -eo pid,etime,comm | egrep '^ *[0-9]+ +([0-9]+-[^ ]*|[0-9]{2}:[0-9]{2}:[0-9]{2})' | grep xvfb | awk '{print $1}' | xargs kill -9
command kill old xvfb processes. assumed 2 hours old? since have run command have not been able run .py script , receive following error:

<class 'selenium.common.exceptions.webdriverexception'>: message: "the browser appears have exited before connect. output was: mkdir: cannot create directory `/.mozilla': permission denied\nerror: cannot open display: :9866\n" [83] =>        args = [84] => () [85] =>        message = [86] => '' [87] =>        msg = [88] => 'the browser appears have exited before cou...mission denied\nerror: cannot open display: :9866\n' [89] =>        screen = [90] => none [91] =>        stacktrace = [92] => none [93] => [94] => [95] => [113] => )  

cleared linux cache following 2 commands resolve issue:
entered through putty ssh shell.
/usr/sbin/tmpwatch 1 /tmp
and
/usr/sbin/tmpwatch 1 /var/tmp


Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -