我有一个应用程序,使用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
我的凭证是Ok的,因为在生产机器上重新启动Unicorn之后,一切都很正常。
我已经搜索了日志消息,但我发现的所有内容都与Excon模块有关,该模块似乎正在开发中。
我建议如果重启解决了这个问题,也许我应该修改TTL或者我的Rackspace ClousFiles的一些设置。
任何帮助都是非常感谢的。
发布于 2012-08-09 12:10:07
此错误已在Fog v1.4中修复。你最近有没有更新你的gem?
https://stackoverflow.com/questions/11122755
复制相似问题