veliovgroup / jazeee-meteor-spiderable

Fork of Meteor Spiderable with longer timeout, caching, better server handling
https://atmospherejs.com/jazeee/spiderable-longer-timeout
33 stars 9 forks source link

spiderable: phantomjs failed #31

Closed mikkhait closed 8 years ago

mikkhait commented 8 years ago

Have been using this package for a while. However, this morning, phantom hell broke loose.

spiderable: phantomjs failed: { [Error: Command failed: ] killed: true, code: null, signal: 'SIGTERM' }

Running using mupx deploy command.

Still works fine locally.

jazeee commented 8 years ago

I suspect your installed version of phantomjs is not executing successfully. On the server console, try running phantomjs. Try: phantomjs --version Also, you can execute what this package executes. In order to do so, you'd need to find the phantom_script.js file.

PHANTOM_SCRIPT=$(find /opt/YOUR_WEB_APP/app/ -name phantom_script.js)
echo ${PHANTOM_SCRIPT}
phantomjs --load-images=no --ssl-protocol=TLSv1 --ignore-ssl-errors=true --web-security=false ${PHANTOM_SCRIPT}    http://localhost

You can also adjust URL and such. We use nginx proxy, so I tested by hitting the Meteor port, like http://localhost:8888. I also tested my public live URL, which returned the same content. Best tests would be against the native Meteor URL, to eliminate proxy issues.

Also, if you get no response, make sure phantomjs exit code is 0

phantomjs ...
echo $?
# Should be 0. Any other number is an error.
mikkhait commented 8 years ago

I'm using mupx, which configures phantom inside of a Docker.

In the mean time, I have falled back to ongoworks:spiderable

mikkhait commented 8 years ago

This has been resolved, but I'm not sure what happened.

So, it turns out that I did some tweaking of the firewall that morning and locked access for the production server to the world. Once I fixed firewall, things started to work again.

Weird?

jazeee commented 8 years ago

It is possible that PhantomJS was attempting to hit your public IP address. Still, I would have expected all spiderable systems to have failed...

In any case, glad it is resolved.