1

我已将我的网站从 heroku 迁移到 railhoster.de。现在 errbit/airbrake 不再工作了。变量已设置为与原点相同。

我试过没有协议ERRBIT_HOST=my_errbit_server.herokuapp.com和它ERRBIT_HOST=http://my_errbit_server.herokuapp.com。我还尝试添加和删除双引号。但没有任何变化。

这是一个依赖于服务器的问题(配置错误)吗?应用程序被克隆,数据库被转储,设置/配置被复制/粘贴。

真正看起来很奇怪的是,错误消息在不应该出现的地方添加了引号和空格:

http://                "my_errbit_server.herokuapp.com:80

这是堆栈跟踪:

[da9c4929]  Started GET "/users/conclusion_filter?utf8=%E2%9C%93&payment=331" for 178.188.114.21 at 2015-08-14 15:04:38 +0200
DEBUG [da9c4929]    Processing by UsersController#conclusion as HTML
DEBUG [da9c4929]      Parameters: {"utf8"=>"✓", "payment"=>"331"}
DEBUG [da9c4929]    Completed 500 Internal Server Error in 716ms
DEBUG [da9c4929]    ** [Airbrake] [Airbrake::Sender#setup_http_connection] Failure initializing the HTTP connection.
DEBUG [da9c4929]    Error: URI::InvalidURIError - bad URI(is not URI?): http://                "my_errbit_server.herokuapp.com:80
DEBUG [da9c4929]    Backtrace:
DEBUG [da9c4929]    /usr/local/lib/ruby/2.0.0/uri/common.rb:176:in `split'
DEBUG [da9c4929]        /usr/local/lib/ruby/2.0.0/uri/common.rb:211:in `parse'
DEBUG [da9c4929]        /usr/local/lib/ruby/2.0.0/uri/common.rb:747:in `parse'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/airbrake-4.3.0/lib/airbrake/sender.rb:136:in `url'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/airbrake-4.3.0/lib/airbrake/sender.rb:153:in `setup_http_connection'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/airbrake-4.3.0/lib/airbrake/sender.rb:51:in `send_to_airbrake'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/airbrake-4.3.0/lib/airbrake.rb:167:in `send_notice'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/airbrake-4.3.0/lib/airbrake.rb:139:in `notify_or_ignore'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/airbrake-4.3.0/lib/airbrake/rails/middleware.rb:40:in `notify_airbrake'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/airbrake-4.3.0/lib/airbrake/rails/middleware.rb:15:in `rescue in call'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/airbrake-4.3.0/lib/airbrake/rails/middleware.rb:12:in `call'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/actionpack-3.2.14/lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/actionpack-3.2.14/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/railties-3.2.14/lib/rails/rack/logger.rb:32:in `call_app'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/railties-3.2.14/lib/rails/rack/logger.rb:16:in `block in call'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/activesupport-3.2.14/lib/active_support/tagged_logging.rb:22:in `tagged'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/railties-3.2.14/lib/rails/rack/logger.rb:16:in `call'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/actionpack-3.2.14/lib/action_dispatch/middleware/request_id.rb:22:in `call'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/rack-1.4.7/lib/rack/methodoverride.rb:21:in `call'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/rack-1.4.7/lib/rack/runtime.rb:17:in `call'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/activesupport-3.2.14/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/actionpack-3.2.14/lib/action_dispatch/middleware/static.rb:63:in `call'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/rack-cache-1.2/lib/rack/cache/context.rb:136:in `forward'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/rack-cache-1.2/lib/rack/cache/context.rb:245:in `fetch'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/rack-cache-1.2/lib/rack/cache/context.rb:185:in `lookup'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/rack-cache-1.2/lib/rack/cache/context.rb:66:in `call!'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/rack-cache-1.2/lib/rack/cache/context.rb:51:in `call'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/airbrake-4.3.0/lib/airbrake/user_informer.rb:16:in `_call'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/airbrake-4.3.0/lib/airbrake/user_informer.rb:12:in `call'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/railties-3.2.14/lib/rails/engine.rb:484:in `call'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/railties-3.2.14/lib/rails/application.rb:231:in `call'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/railties-3.2.14/lib/rails/railtie/configurable.rb:30:in `method_missing'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
DEBUG [da9c4929]        /usr/local/lib/ruby/gems/2.0.0/gems/passenger-4.0.45/lib/phusion_passenger/rack/thread_handler_extension.rb:74:in `process_request'
DEBUG [da9c4929]        /usr/local/lib/ruby/gems/2.0.0/gems/passenger-4.0.45/lib/phusion_passenger/request_handler/thread_handler.rb:141:in `accept_and_process_next_request'
DEBUG [da9c4929]        /usr/local/lib/ruby/gems/2.0.0/gems/passenger-4.0.45/lib/phusion_passenger/request_handler/thread_handler.rb:109:in `main_loop'
DEBUG [da9c4929]        /usr/local/lib/ruby/gems/2.0.0/gems/passenger-4.0.45/lib/phusion_passenger/request_handler.rb:448:in `block (3 levels) in start_threads'
DEBUG [da9c4929]    ** [Airbrake] [Airbrake::Sender#send_to_airbrake] Cannot send notification. Error: URI::InvalidURIError - bad URI(is not URI?): http://                "my_errbit_server.herokuapp.com:80
DEBUG [da9c4929]    Backtrace:
DEBUG [da9c4929]    /usr/local/lib/ruby/2.0.0/uri/common.rb:176:in `split'
DEBUG [da9c4929]        /usr/local/lib/ruby/2.0.0/uri/common.rb:211:in `parse'
DEBUG [da9c4929]        /usr/local/lib/ruby/2.0.0/uri/common.rb:747:in `parse'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/airbrake-4.3.0/lib/airbrake/sender.rb:136:in `url'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/airbrake-4.3.0/lib/airbrake/sender.rb:153:in `setup_http_connection'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/airbrake-4.3.0/lib/airbrake/sender.rb:51:in `send_to_airbrake'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/airbrake-4.3.0/lib/airbrake.rb:167:in `send_notice'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/airbrake-4.3.0/lib/airbrake.rb:139:in `notify_or_ignore'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/airbrake-4.3.0/lib/airbrake/rails/middleware.rb:40:in `notify_airbrake'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/airbrake-4.3.0/lib/airbrake/rails/middleware.rb:15:in `rescue in call'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/airbrake-4.3.0/lib/airbrake/rails/middleware.rb:12:in `call'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/actionpack-3.2.14/lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/actionpack-3.2.14/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/railties-3.2.14/lib/rails/rack/logger.rb:32:in `call_app'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/railties-3.2.14/lib/rails/rack/logger.rb:16:in `block in call'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/activesupport-3.2.14/lib/active_support/tagged_logging.rb:22:in `tagged'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/railties-3.2.14/lib/rails/rack/logger.rb:16:in `call'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/actionpack-3.2.14/lib/action_dispatch/middleware/request_id.rb:22:in `call'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/rack-1.4.7/lib/rack/methodoverride.rb:21:in `call'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/rack-1.4.7/lib/rack/runtime.rb:17:in `call'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/activesupport-3.2.14/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/actionpack-3.2.14/lib/action_dispatch/middleware/static.rb:63:in `call'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/rack-cache-1.2/lib/rack/cache/context.rb:136:in `forward'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/rack-cache-1.2/lib/rack/cache/context.rb:245:in `fetch'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/rack-cache-1.2/lib/rack/cache/context.rb:185:in `lookup'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/rack-cache-1.2/lib/rack/cache/context.rb:66:in `call!'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/rack-cache-1.2/lib/rack/cache/context.rb:51:in `call'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/airbrake-4.3.0/lib/airbrake/user_informer.rb:16:in `_call'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/airbrake-4.3.0/lib/airbrake/user_informer.rb:12:in `call'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/railties-3.2.14/lib/rails/engine.rb:484:in `call'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/railties-3.2.14/lib/rails/application.rb:231:in `call'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/railties-3.2.14/lib/rails/railtie/configurable.rb:30:in `method_missing'
DEBUG [da9c4929]        /var/www/rails1/shared/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
DEBUG [da9c4929]        /usr/local/lib/ruby/gems/2.0.0/gems/passenger-4.0.45/lib/phusion_passenger/rack/thread_handler_extension.rb:74:in `process_request'
DEBUG [da9c4929]        /usr/local/lib/ruby/gems/2.0.0/gems/passenger-4.0.45/lib/phusion_passenger/request_handler/thread_handler.rb:141:in `accept_and_process_next_request'
DEBUG [da9c4929]        /usr/local/lib/ruby/gems/2.0.0/gems/passenger-4.0.45/lib/phusion_passenger/request_handler/thread_handler.rb:109:in `main_loop'
DEBUG [da9c4929]        /usr/local/lib/ruby/gems/2.0.0/gems/passenger-4.0.45/lib/phusion_passenger/request_handler.rb:448:in `block (3 levels) in start_threads'
DEBUG [da9c4929]
DEBUG [da9c4929]    Excon::Errors::Forbidden (Expected(200) <=> Actual(403 Forbidden)
DEBUG [da9c4929]    excon.error.response
DEBUG [da9c4929]      :body          => ""
DEBUG [da9c4929]      :headers       => {
DEBUG [da9c4929]        "Content-Type"      => "application/xml"
DEBUG [da9c4929]        "Date"              => "Fri, 14 Aug 2015 13:04:38 GMT"
DEBUG [da9c4929]        "Server"            => "AmazonS3"
DEBUG [da9c4929]        "Transfer-Encoding" => "chunked"
DEBUG [da9c4929]        "x-amz-id-2"        => "LxUynTRu2F5vzx81LbY1jbzg6xuokaIkwYl62cqI+xgkHgNSVDhAWbbyu8ipJUL6"
DEBUG [da9c4929]        "x-amz-request-id"  => "D34F101C43C332B7"
DEBUG [da9c4929]      }
DEBUG [da9c4929]      :local_address => "5.22.151.86"
DEBUG [da9c4929]      :local_port    => 39630
DEBUG [da9c4929]      :reason_phrase => "Forbidden"
DEBUG [da9c4929]      :remote_ip     => "54.231.129.41"
DEBUG [da9c4929]      :status        => 403
DEBUG [da9c4929]      :status_line   => "HTTP/1.1 403 Forbidden\r\n"
DEBUG [da9c4929]    ):
DEBUG [da9c4929]      app/controllers/users_controller.rb:62:in `conclusion'
DEBUG [da9c4929]
DEBUG [da9c4929]
DEBUG [da9c4929]    Started GET "/favicon.ico" for 178.188.114.21 at 2015-08-14 15:04:39 +0200
DEBUG [da9c4929]    Started GET "/" for 178.188.114.21 at 2015-08-14 15:04:39 +0200


# /var/www/rails1/shared/bundle/ruby/2.0.0/gems/airbrake-4.3.0/lib/airbrake/sender.rb:136:in `url'

def url
  URI.parse("#{protocol}://#{host}:#{port}").merge(api_url)
end
4

1 回答 1

0

Ruby 的 URI 组件中的主机名中不允许使用下划线:

irb(main):001:0> RUBY_VERSION
=> "2.2.3"
irb(main):002:0> URI('http://my_errbit_server.herokuapp.com')
NoMethodError: undefined method `URI' for main:Object
from (irb):2
from /home/stevecrozz/.rbenv/versions/2.2.3/bin/irb:11:in `<main>'

如果您更改为没有下划线的主机名,它应该可以工作。

于 2017-04-06T15:59:56.147 回答