由于Excon错误,Carrierwave上传到Rackspace失败

时间:2012-06-20 15:19:53

标签: ruby-on-rails-3.2 carrierwave rackspace-cloud

我有一个应用程序,它使用Carrierwave在Rackspace上传图片。我在生产服务器上每20小时得到的错误绝对奇怪。它与授权有关。这是日志:

Completed 500 Internal Server Error in 6531ms

Excon::Errors::Unauthorized (Expected(201) <=> Actual(401 Unauthorized)
request => {:connect_timeout=>60, :headers=>{"Content-Type"=>"image/jpeg",
"X-Auth-Token"=>"my-auth-token", "Content-Length"=>439253,
"Host"=>"clouddrive.com:443"}, :instrumentor_name=>"excon", :mock=>false, :read_timeout=>60, :retry_limit=>4, :ssl_ca_file=>.....response => #<Excon::Response:0xblah7420 
@body="401 Unauthorized\n\nThis server could not 
verify that you are authorized to        access the document you requested.
 Either you supplied the wrong credentials (e.g., bad password), 
or your browser does not understand how to supply the credentials required.\n\n

我的凭据还可以,因为在生产机器上重启Unicorn后,一切都很好。

我搜索了日志消息,但我发现的所有内容都与Excon模块有关,它似乎正在开发中。

我建议如果重启解决问题,可能我应该对TTL或Rackspace ClousFiles的某些设置进行修正。

感谢任何帮助。

1 个答案:

答案 0 :(得分:1)

此错误已在Fog v1.4中修复。你最近更新了你的宝石吗?