预期的(200)< => Heroku控制台中的实际(401 Unauthorized)

时间:2015-04-28 22:04:52

标签: ruby-on-rails ssl heroku heroku-toolbelt

这刚刚开始发生。每当我在生产应用程序中打开控制台时(通过Heroku CLI),我都会收到此消息。

Connecting to database specified by DATABASE_URL

Expected(200) <=> Actual(401 Unauthorized)
  request => {:connect_timeout=>60, :headers=>{"Accept"=>"application/json", "Accept-Encoding"=>"gzip", "Authorization"=>"Basic OmQ5NDc0NTY0LWUwMDMtNDRlYy1hYTJjLTUxODYwMTI5YzA5Zg==", "User-Agent"=>"heroku-rb/0.2.1", "X-Heroku-API-Version"=>"3", "X-Ruby-Version"=>"2.0.0", "X-Ruby-Platform"=>"x86_64-linux", "Host"=>"api.heroku.com:443"}, :instrumentor_name=>"excon", :mock=>false, :read_timeout=>60, :retry_limit=>4, :ssl_ca_file=>"/app/vendor/bundle/ruby/2.0.0/gems/excon-0.13.4/data/cacert.pem", :ssl_verify_peer=>true, :write_timeout=>60, :host=>"api.heroku.com", :path=>"/apps/staging-xxxx/ps", :port=>"443", :query=>nil, :scheme=>"https", :expects=>200, :method=>:get}
  response => #<Excon::Response:0x007f2ecf385658 @body="{\"id\":\"unauthorized\",\"error\":\"Invalid credentials provided.\"}", @headers={"Cache-Control"=>"no-transform", "Content-Type"=>"application/json", "Date"=>"Tue, 28 Apr 2015 18:40:19 GMT", "Request-Id"=>"53c8af5d-0d1c-46bf-8779-e5f6d6c8cd1a", "Server"=>"nginx/1.4.6 (Ubuntu)", "Status"=>"401 Unauthorized", "X-Content-Type-Options"=>"nosniff", "X-Runtime"=>"0.015607713", "Content-Length"=>"61", "Connection"=>"keep-alive"}, @status=401>
Expected(200) <=> Actual(401 Unauthorized)

控制台仍然打开,但想知道为什么我每次打开prod控制台时都会收到此消息。想法?

2 个答案:

答案 0 :(得分:0)

你是最新的API令牌,使用延迟工作,我们是无用工作吗?

答案 1 :(得分:0)

问题在于 delayed_job_recurring gem。我删除了宝石,错误就消失了。