查询工件时,rally_api在Ruby上抛出的资源异常

时间:2013-07-25 23:43:01

标签: ruby rally

当运行拉力赛查询时,进程退出时会在某些方框上显示以下错误消息,而它只能在其他方框上运行。任何帮助将不胜感激。

环境 - Ruby 1.9xx - rally_api

Command return code: 1
Command error output: /home/reaper/.rvm/gems/ruby-1.9.3-p429/gems/rally_api-    0.9.16/lib/rally_api/rally_json_connection.rb:142:in `rescue in send_request': RallyAPI: -     rescued exception - SSL_connect SYSCALL returned=5 errno=0 state=SSLv3 read finished A on     request to https://rally1.rallydev.com/slm/webservice/1.42/defect.js with params     {:pagesize=>10, :start=>441, :query=>"(LastUpdateDate > \"2013-06-29T00:00:00+00:00\")",     :fetch=>"Iteration,Capitalizeable,CapBucket,FormattedID,DirectChildrenCount,RevisionHistory,Re    visions,Parent,Project,Portfolio",     :workspace=>"https://rally1.rallydev.com/slm/webservice/1.42/workspace/41593629.js",     :project=>"https://rally1.rallydev.com/slm/webservice/1.42/project/7634660382.js",     :projectScopeUp=>false, :projectScopeDown=>true, :order=>nil} (StandardError)
    from /home/reaper/.rvm/gems/ruby-1.9.3-p429/gems/rally_api-    0.9.16/lib/rally_api/rally_json_connection.rb:136:in `send_request'
    from /home/reaper/.rvm/gems/ruby-1.9.3-p429/gems/rally_api-    0.9.16/lib/rally_api/rally_json_connection.rb:196:in `block (2 levels) in run_single_thread'
    from /home/reaper/.rvm/gems/ruby-1.9.3-p429/gems/rally_api-    0.9.16/lib/rally_api/rally_json_connection.rb:195:in `each'
    from /home/reaper/.rvm/gems/ruby-1.9.3-p429/gems/rally_api-    0.9.16/lib/rally_api/rally_json_connection.rb:195:in `block in run_single_thread'

1 个答案:

答案 0 :(得分:0)

您可能会看到这个仅测试连接的简单ruby代码是否也会因同样的错误而失败:

require 'rally_api'

#Setup custom app information
headers = RallyAPI::CustomHttpHeader.new() headers.name = "My Utility"
headers.vendor = "Nick M RallyLab"
headers.version = "1.0"

# Connection to Rally
config = {:base_url => "https://rally1.rallydev.com/slm"}
config[:username] = "user@co.com"
config[:password] = "password"
config[:workspace] = "W"
config[:project] = "P"
config[:version] = "1.43"
config[:headers] = headers 

@rally = RallyAPI::RallyRestJson.new(config)
puts @rally.user

我已经看到报告了同样的错误,并且代理证明是罪魁祸首。如果它从某些计算机运行而从其他计算机失败,将问题的潜在来源缩小到运行脚本的环境 - 可能是代理配置发生了变化。

如果在运行脚本的计算机和rally1.rallydev.com之间有代理,请验证http_proxy环境变量是否设置为当前有效值。 通常,环境变量http_proxy应设置如下。

a)用于验证代理:

yourusername:yourpassword@IPAddress:Port

b)用于非认证代理。

IPAddress:Port