I'm trying to debug a failed job on a production environment version of Resque because this is all the web interface gives me to work with:
Worker: 9c9fe9d3-8ee0-43fe-afcd-c6806fc75f0d:2 on sentiment_pull at just now
Class: SentimentJob
Arguments: [16, 17, 18]13
Exception: OpenSSL::SSL::SSLError
Error: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
This works in development and I'm not sure why I'd get an OpenSSL error on Heroku. I am also using Omniauth so in that initializer I have already set:
Rails.application.config.middleware.use OmniAuth::Builder do
provider #...
:client_options => {:ssl => {:ca_path => "/etc/ssl/certs"}}
end
I haven't found any examples of Resque requiring an SSL certificate on Heroku so I'm a bit stumped because the job is set to do requests on an HTTPS URL.
I've recently had this problem and despite there being plenty of answers out there on how to fix it, this was the only one that worked for me (I'm not on Heroku but instead a Debian VPS). This is a bad idea most of the time but is fine for my usage case where I need to accept self-signed SSL records.
OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE
This will cause OpenSSL to not verify SSL records and will suppress the error.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.