使用delayed_job进程时出现SSL_connect错误

时间:2017-03-30 01:12:06

标签: ruby-on-rails openssl

我有一个传统的rails堆栈(mysql,ubuntu),它使用delayed_job来处理后台任务。

今天开始看到ssl_connect错误,但仅来自我们的后台进程。

还尝试使用ssl_tools/doctor from @mislav并且没有错误。

参考错误是:

OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
- 17 non-project frames
File "/home/deploy/.rvm/rubies/ruby-2.1.7/lib/ruby/2.1.0/net/http.rb" line 923 in connect
File "/home/deploy/.rvm/rubies/ruby-2.1.7/lib/ruby/2.1.0/net/http.rb" line 923 in block in connect
File "/home/deploy/.rvm/rubies/ruby-2.1.7/lib/ruby/2.1.0/timeout.rb" line 90 in block in timeout
File "/home/deploy/.rvm/rubies/ruby-2.1.7/lib/ruby/2.1.0/timeout.rb" line 100 in call
File "/home/deploy/.rvm/rubies/ruby-2.1.7/lib/ruby/2.1.0/timeout.rb" line 100 in timeout
File "/home/deploy/.rvm/rubies/ruby-2.1.7/lib/ruby/2.1.0/net/http.rb" line 923 in connect
File "/home/deploy/.rvm/rubies/ruby-2.1.7/lib/ruby/2.1.0/net/http.rb" line 863 in do_start
File "/home/deploy/.rvm/rubies/ruby-2.1.7/lib/ruby/2.1.0/net/http.rb" line 852 in start
File "/home/deploy/.rvm/rubies/ruby-2.1.7/lib/ruby/2.1.0/net/http.rb" line 1375 in request

1 个答案:

答案 0 :(得分:-1)

哇。

PID代表process ID,这是计算机用来跟踪正在运行的内部程序的策略。每个进程都获得一个PID。 延迟作业允许您配置PID目录。

如果您在延迟工作时遇到问题,请检查pids并确保您没有在旧代码上运行随机DJ进程。这是我上面的问题。任何时候出现错误,有人会手动重启DJ而不指定PID,它会创建新的PID。 YIKES。

旧DJ处理旧/过时的代码。