2015-08-14 3 views
0

Я перенес свой веб-сайт от heroku до railshoster.de. Теперь errbit/airbrake больше не работает. Переменные были установлены так же, как и исходные.Airbrake/errbit

Я пробовал без протокола ERRBIT_HOST=my_errbit_server.herokuapp.com и с ним ERRBIT_HOST=http://my_errbit_server.herokuapp.com. Я также попытался добавить и удалить двойные кавычки. Но без изменений.

Возможно ли, что сервер зависел от проблемы (неправильная конфигурация)? Приложение клонировано, db был сброшен, настройки/config были скопированы/вставлены.

Что действительно выглядит странно, что сообщение об ошибке добавляет кавычки и пробелы, где никто не должен быть:

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

Вот StackTrace:

[da9c4929] Started GET "https://stackoverflow.com/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 
+0

Какова ваша конфигурация в файле инициализации Errbit/Airbrake? что-то вроде этого: 'config.host = 'yourserver.herokuapp.com'' – nayiaw

+0

Да точно: без http: //. Airbrake.configure do | config | config.api_key = ENV ['ERRBIT_API_KEY'] config.host = ENV ['ERRBIT_HOST'] config.port = 80 config.secure = config.port == 443 config.environment_name = конец производства – Jan

ответ

0

Подчеркивания не допускаются в имена хостов в Руби 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>' 

Он должен работать, если вы перейдете на имя хоста witho подчеркиваем.