我很好奇我如何测试这个错误的来源?因为超时错误是我发送给服务器的错误吗?或者它是我自己的OpenSSL?
这个突然开始发生在过去几周运行良好的应用程序。
client = HTTPClient.new
client.set_auth @url, API_USERNAME, API_PASSWORD
response = client.post @url, payload.to_json, {'Content-Type' => 'application/json', 'Accept'=>'application/json'}
结果如下:
/usr/local/lib/ruby/1.9/openssl/buffering.rb:36:in `sysread': execution expired (Timeout::Error)
from /usr/local/lib/ruby/1.9/openssl/buffering.rb:36:in `fill_rbuff'
from /usr/local/lib/ruby/1.9/openssl/buffering.rb:160:in `gets'
from /usr/local/lib/ruby/gems/1.9/gems/httpclient-2.5.2/lib/httpclient/session.rb:352:in `gets'
from /usr/local/lib/ruby/gems/1.9/gems/httpclient-2.5.2/lib/httpclient/session.rb:881:in `block in parse_header'
from /usr/local/lib/ruby/1.9/timeout.rb:58:in `timeout'
from /usr/local/lib/ruby/1.9/timeout.rb:89:in `timeout'
from /usr/local/lib/ruby/gems/1.9/gems/httpclient-2.5.2/lib/httpclient/session.rb:877:in `parse_header'
from /usr/local/lib/ruby/gems/1.9/gems/httpclient-2.5.2/lib/httpclient/session.rb:860:in `read_header'
from /usr/local/lib/ruby/gems/1.9/gems/httpclient-2.5.2/lib/httpclient/session.rb:667:in `get_header'
from /usr/local/lib/ruby/gems/1.9/gems/httpclient-2.5.2/lib/httpclient.rb:1202:in `do_get_header'
from /usr/local/lib/ruby/gems/1.9/gems/httpclient-2.5.2/lib/httpclient.rb:1151:in `do_get_block'
from /usr/local/lib/ruby/gems/1.9/gems/httpclient-2.5.2/lib/httpclient.rb:952:in `block in do_request'
from /usr/local/lib/ruby/gems/1.9/gems/httpclient-2.5.2/lib/httpclient.rb:1046:in `protect_keep_alive_disconnected'
from /usr/local/lib/ruby/gems/1.9/gems/httpclient-2.5.2/lib/httpclient.rb:951:in `do_request'
from /usr/local/lib/ruby/gems/1.9/gems/httpclient-2.5.2/lib/httpclient.rb:813:in `request'
from /usr/local/lib/ruby/gems/1.9/gems/httpclient-2.5.2/lib/httpclient.rb:713:in `post'
...
my app stack
我已经用空提交对其进行了测试,但它仍然无法正常工作。有什么想法吗?
从我的服务器运行到另一台:
echo "" | openssl s_client -showcerts -status -verify 0 \
-connect some_site.com:443 2>&1 | \
egrep "Verify return|subject=/serial"
Verify return code: 19 (self signed certificate in certificate chain)