getting error: Could not start Ghost Driver

2019-07-21 00:02发布

I'm trying to run Ghostdriver inside my Openshift server. As i run this command:

./phantomjs --webdriver=15002

It says:

PhantomJS is launching GhostDriver...
[ERROR - 2014-08-01T04:14:21.160Z] GhostDriver - main.fail - {"message":"Could not start Ghost Driver","line":82,"sourceId":139887801789952,"sourceURL":":/ghostdriver/main.js","stack":"Error: Could not start Ghost Driver\n    at :/ghostdriver/main.js:82","stackArray":[{"sourceURL":":/ghostdriver/main.js","line":82}]}
$ ./phantomjs --version
1.9.8

Please help me out, I'm getting this error from 10 Days. I searched everything and googled everything. nothing is sorted me out :( I'm much upset :(

Help surely would be appreciated!!

5条回答
兄弟一词,经得起流年.
2楼-- · 2019-07-21 00:42

I have not been able to make Paolo Bernardi's patch work, I always catched a segmentation fault. So I re-compiled it on an RHEL machine, and this one worked for me: http://christophe-maillard.com/phantomjs-1.9.8.patched/phantomjs.tar.gz

PS: see Trying to run PhantomJS on OpenShift: cannot patch GhostDriver so that it can bind on the server IP address

查看更多
姐就是有狂的资本
3楼-- · 2019-07-21 00:43

Make sure the phantomjs process isn't already running

查看更多
家丑人穷心不美
4楼-- · 2019-07-21 00:47

From the documentation it looks like you should be able to do something like this:

./phantomjs --webdriver=$OPENSHIFT_NODEJS_IP:15002

You may have to actually type in your ip address there, not sure if that env variable will populate correctly..

http://phantomjs.org/api/command-line.html

--webdriver starts in 'Remote WebDriver mode' (embedded GhostDriver): '[[:]]' (default '127.0.0.1:8910')
查看更多
趁早两清
5楼-- · 2019-07-21 00:49

Check the Port Number while running the below command. Might be your port say 5555 is already in used. So change that if you get this "Could not start Ghost Driver" error

phantomjs --webdriver=5555
查看更多
别忘想泡老子
6楼-- · 2019-07-21 00:54

OpenShift doesn't allow binding the localhost address; there is a patch to allow GhostDriver to bind any specified IP (currently it always binds to localhost no matter what), but it still hasn't made it in the PhantomJS source tree and binary distributions.

In order to use PhantomJS + GhostDriver on OpenShift I recompiled it after applying the patch, you can find it here: https://paolobernardi.wordpress.com/2015/02/25/phantomjs-with-ghostdriver-on-openshift/

查看更多
登录 后发表回答