1

I have migrated my website from heroku to railshoster.de. Now the errbit/airbrake is not working anymore. Variables have been set same as origin.

I've tried without the protocol ERRBIT_HOST=my_errbit_server.herokuapp.com and with it ERRBIT_HOST=http://my_errbit_server.herokuapp.com. I also tried to add and remove doublequotes. But with no change.

Is this a server depended issue (misconfiguration)? App was cloned, db was dumped, settings/config was copy/pasted.

What really looks strange is, that the error message adds quotes and spaces where none should be:

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

Here is the stacktrace:

[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
Jan
  • 12,992
  • 9
  • 53
  • 89
  • What's your configuration in your Errbit/Airbrake initializer file? something like this: `config.host = 'yourserver.herokuapp.com'` – nayiaw Aug 14 '15 at 13:58
  • Yes exactly: without 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 = production end – Jan Aug 14 '15 at 14:26

1 Answers1

0

Underscores are not allowed in hostnames in Ruby's URI component:

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>'

It should work if you change to a hostname without an underscore.

Stephen Crosby
  • 1,157
  • 7
  • 19