本文介绍了HTTP 401雾::存储::机架空间:: ServiceError的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在努力实现Rails 4 / Ruby 2雾/载波集成。基本上,在运行了一天的独角兽服务器之后,我的应用程序已返回:[HTTP 401] Fog :: Storage :: Rackspace :: ServiceError
然后我查询服务器,并检查是否可以手动命中服务器,没有任何问题。
所以我很迷茫,该怎么办。

i am working to get with Rails 4 / Ruby 2 fog / carrierwave integration. Basically I have in my app after around a day of the unicorn servers running it is returning: [HTTP 401] Fog::Storage::Rackspace::ServiceErrorI then query the server, and check if I can manually hit the server, and have no issues. So I am very lost and what to do.

F, [2013-06-17T00:47:58.519007 #31200] FATAL -- : 
ActionView::Template::Error ([HTTP 401] Fog::Storage::Rackspace::ServiceError):
21:             <li class="span4">
22:               <div class="thumbnail">
23:                 <div style="height: 270px">
24:                   <%= image_tag(website.logo_url(:web), :class => 'img-rounded') if website.logo? %>
25:                 </div>

今天我看到他们将FOG更新为1.12.1并正在尝试升级,但是我真的不知道不知道是什么问题。与Rackspace的连接似乎变坏了。...有什么想法吗?谢谢!!

Today I saw that they updated FOG to 1.12.1 and am trying to upgrade, but I really don't know what the issue is. It almost seems as though the connection to Rackspace goes bad.... Any thoughts? Thanks!!

推荐答案

由于Henning的观察,我能够发现Fog的Rackspace CDN服务未在身份验证令牌过期后重新进行身份验证。我已将以下请求请求提交给fog => 。

Thanks to Henning's observations, I was able to find that Fog's Rackspace CDN service was not re-authenticating after the authentication token expired. I have submitted the following pull request to fog => https://github.com/fog/fog/pull/1899.

我希望此修复程序将在7月初发布新版本的Fog。在此期间,我创建了一个补丁,可应用于当前的Fog gem->

I expect a new version of Fog to be released in early July with this fix. In the interim, I have created a patch to be applied to the current Fog gem -> https://gist.github.com/krames/5817816

此文件应保存在rails应用程序的初始化程序目录中,并命名为01_cdn_patch.rb才能被使用正确应用。它将仅适用于Fog 1.12.1。

This file should be saved in the initializer's directory of your rails application and named 01_cdn_patch.rb in order for it to be properly applied. It will only work for Fog 1.12.1.

这篇关于HTTP 401雾::存储::机架空间:: ServiceError的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-21 04:27