Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More IPV6 and better_errors incompatability #144

Closed
BrandonMathis opened this issue Mar 14, 2013 · 11 comments
Closed

More IPV6 and better_errors incompatability #144

BrandonMathis opened this issue Mar 14, 2013 · 11 comments

Comments

@BrandonMathis
Copy link
Contributor

Suddenly started getting this 😟

using jruby-1.7.3

Started GET "/" for 0:0:0:0:0:0:0:1%0 at 2013-03-14 11:40:11 -0400

ArgumentError (invalid address):
  /Users/bemathis/.rbenv/versions/jruby-1.7.3/lib/ruby/1.9/ipaddr.rb:543:in `in6_addr'
  /Users/bemathis/.rbenv/versions/jruby-1.7.3/lib/ruby/1.9/ipaddr.rb:481:in `initialize'
  vendor/jruby/1.9/gems/better_errors-0.7.2/lib/better_errors/middleware.rb:69:in `allow_ip?'
  vendor/jruby/1.9/gems/better_errors-0.7.2/lib/better_errors/middleware.rb:55:in `call'
  vendor/jruby/1.9/gems/actionpack-3.2.12/lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
  vendor/jruby/1.9/gems/actionpack-3.2.12/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
  vendor/jruby/1.9/gems/railties-3.2.12/lib/rails/rack/logger.rb:32:in `call_app'
  vendor/jruby/1.9/gems/railties-3.2.12/lib/rails/rack/logger.rb:16:in `call'
  vendor/jruby/1.9/gems/activesupport-3.2.12/lib/active_support/tagged_logging.rb:22:in `tagged'
  vendor/jruby/1.9/gems/railties-3.2.12/lib/rails/rack/logger.rb:16:in `call'
  vendor/jruby/1.9/gems/quiet_assets-1.0.2/lib/quiet_assets.rb:18:in `call_with_quiet_assets'
  vendor/jruby/1.9/gems/actionpack-3.2.12/lib/action_dispatch/middleware/request_id.rb:22:in `call'
  vendor/jruby/1.9/gems/rack-1.4.5/lib/rack/methodoverride.rb:21:in `call'
  vendor/jruby/1.9/gems/rack-1.4.5/lib/rack/runtime.rb:17:in `call'
  vendor/jruby/1.9/gems/activesupport-3.2.12/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
  vendor/jruby/1.9/gems/rack-1.4.5/lib/rack/lock.rb:15:in `call'
  vendor/jruby/1.9/gems/actionpack-3.2.12/lib/action_dispatch/middleware/static.rb:62:in `call'
  vendor/jruby/1.9/gems/airbrake-3.1.8/lib/airbrake/user_informer.rb:16:in `_call'
  vendor/jruby/1.9/gems/airbrake-3.1.8/lib/airbrake/user_informer.rb:12:in `call'
  vendor/jruby/1.9/gems/railties-3.2.12/lib/rails/engine.rb:479:in `call'
  vendor/jruby/1.9/gems/railties-3.2.12/lib/rails/application.rb:223:in `call'
  vendor/jruby/1.9/gems/rack-1.4.5/lib/rack/content_length.rb:14:in `call'
  vendor/jruby/1.9/gems/railties-3.2.12/lib/rails/rack/log_tailer.rb:17:in `call'
  vendor/jruby/1.9/gems/rack-1.4.5/lib/rack/handler/webrick.rb:59:in `service'
  vendor/jruby/1.9/gems/webrick-1.3.1/lib/webrick/httpserver.rb:138:in `service'
  vendor/jruby/1.9/gems/webrick-1.3.1/lib/webrick/httpserver.rb:94:in `run'
  vendor/jruby/1.9/gems/webrick-1.3.1/lib/webrick/server.rb:191:in `start_thread'
@wndxlori
Copy link

Me, too.

ArgumentError (invalid address):
/Users/lori/.rvm/rubies/jruby-1.7.3/lib/ruby/1.9/ipaddr.rb:543:in in6_addr' /Users/lori/.rvm/rubies/jruby-1.7.3/lib/ruby/1.9/ipaddr.rb:481:ininitialize'
better_errors (0.7.2) lib/better_errors/middleware.rb:68:in allow_ip?' better_errors (0.7.2) lib/better_errors/middleware.rb:55:incall'
actionpack (3.2.13) lib/action_dispatch/middleware/debug_exceptions.rb:16:in call' actionpack (3.2.13) lib/action_dispatch/middleware/show_exceptions.rb:56:incall'
railties (3.2.13) lib/rails/rack/logger.rb:32:in call_app' railties (3.2.13) lib/rails/rack/logger.rb:16:incall'
activesupport (3.2.13) lib/active_support/tagged_logging.rb:22:in tagged' railties (3.2.13) lib/rails/rack/logger.rb:16:incall'
quiet_assets (1.0.2) lib/quiet_assets.rb:18:in call_with_quiet_assets' actionpack (3.2.13) lib/action_dispatch/middleware/request_id.rb:22:incall'
rack (1.4.5) lib/rack/methodoverride.rb:21:in call' rack (1.4.5) lib/rack/runtime.rb:17:incall'
activesupport (3.2.13) lib/active_support/cache/strategy/local_cache.rb:72:in call' rack (1.4.5) lib/rack/lock.rb:15:incall'
actionpack (3.2.13) lib/action_dispatch/middleware/static.rb:63:in call' railties (3.2.13) lib/rails/engine.rb:479:incall'
railties (3.2.13) lib/rails/application.rb:223:in call' file:jruby-rack (1.1.13.1) lib/jruby-rack-1.1.13.1.jar!/rack/handler/servlet.rb:22:incall'

@eti
Copy link

eti commented Mar 22, 2013

We have same issue. Using jruby-1.7.3, rails (3.2.13), better_errors (0.7.2)

eti pushed a commit to eti/better_errors that referenced this issue Mar 25, 2013
@bf4
Copy link

bf4 commented May 15, 2013

Issue can be closed, fixed in 47909eb

@BrandonMathis
Copy link
Contributor Author

Works in jruby-1.7.3 but broken again in jruby-1.7.4 😥

@bf4
Copy link

bf4 commented May 22, 2013

@BrandonMathis issue #, details?

@BrandonMathis
Copy link
Contributor Author

Same issue same error. I'll have more details when I get home :)

Sent from Mailbox for iPhone

On Wed, May 22, 2013 at 10:53 AM, Benjamin Fleischer
[email protected] wrote:

@BrandonMathis issue #, details?

Reply to this email directly or view it on GitHub:
#144 (comment)

@shilov
Copy link

shilov commented Jun 10, 2013

Got bit by this as well, running Ruby v2.0.0p195 on Ubuntu 12.04 LTS

I even took the initiative to disable IPv6 by editing /etc/sysctl.conf. The issue continued to happen even though ifconfig no longer listed the IPv6 address.

Removing the gem fixed the issue.

@BrandonMathis
Copy link
Contributor Author

export JRUBY_OPTS="-J-Djava.net.preferIPv4Stack=true" Fixes the issue, seems there is something funky going on with jruby wanting to use IPv6 jruby/jruby#775

@aphexddb
Copy link

This is happening only when I proxy to the app with nginx. Hitting the app directly w/out proxy works. I am setting X-Forwarded-For and X-Real-IP in nginx and it works with Unicorn perfectly.

Ubuntu 12.04 precise64
ruby 2.0.0p0 (2013-02-24 revision 39474) [x86_64-linux]
rails 4.0.0.rc2
puma 2.1.1
better_errors 0.9.0

/home/vagrant/.rbenv/versions/2.0.0-p0/lib/ruby/2.0.0/ipaddr.rb:559:in `in6_addr'
/home/vagrant/.rbenv/versions/2.0.0-p0/lib/ruby/2.0.0/ipaddr.rb:496:in `initialize'
better_errors (0.9.0) lib/better_errors/middleware.rb:68:in `new'
better_errors (0.9.0) lib/better_errors/middleware.rb:68:in `allow_ip?'
better_errors (0.9.0) lib/better_errors/middleware.rb:55:in `call'
actionpack (4.0.0.rc2) lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
actionpack (4.0.0.rc2) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
railties (4.0.0.rc2) lib/rails/rack/logger.rb:38:in `call_app'
railties (4.0.0.rc2) lib/rails/rack/logger.rb:21:in `block in call'
activesupport (4.0.0.rc2) lib/active_support/tagged_logging.rb:67:in `block in tagged'
activesupport (4.0.0.rc2) lib/active_support/tagged_logging.rb:25:in `tagged'
activesupport (4.0.0.rc2) lib/active_support/tagged_logging.rb:67:in `tagged'
railties (4.0.0.rc2) lib/rails/rack/logger.rb:21:in `call'
quiet_assets (1.0.2) lib/quiet_assets.rb:18:in `call_with_quiet_assets'
actionpack (4.0.0.rc2) lib/action_dispatch/middleware/request_id.rb:21:in `call'
rack (1.5.2) lib/rack/methodoverride.rb:21:in `call'
rack (1.5.2) lib/rack/runtime.rb:17:in `call'
activesupport (4.0.0.rc2) lib/active_support/cache/strategy/local_cache.rb:83:in `call'
rack (1.5.2) lib/rack/lock.rb:17:in `call'
actionpack (4.0.0.rc2) lib/action_dispatch/middleware/static.rb:64:in `call'
railties (4.0.0.rc2) lib/rails/engine.rb:511:in `call'
railties (4.0.0.rc2) lib/rails/application.rb:97:in `call'
rack (1.5.2) lib/rack/commonlogger.rb:33:in `call'
sinatra (1.4.3) lib/sinatra/base.rb:212:in `call'
puma (2.1.1) lib/puma/configuration.rb:66:in `call'
puma (2.1.1) lib/puma/server.rb:369:in `handle_request'
puma (2.1.1) lib/puma/server.rb:246:in `process_client'
puma (2.1.1) lib/puma/server.rb:145:in `block in run'
puma (2.1.1) lib/puma/thread_pool.rb:92:in `call'
puma (2.1.1) lib/puma/thread_pool.rb:92:in `block in spawn_thread'

@hlidotbe
Copy link

hlidotbe commented Jul 4, 2013

I've got more or less the same setup as @aphexddb (Arch, Rails 3.2.13, MRI 2.0.0p195, puma 2.2.2). Same error exactly.

The very same setup was working fine with Unicorn.

@igorparrabastias
Copy link

Yes.

export JRUBY_OPTS="-J-Djava.net.preferIPv4Stack=true"

solves the issue. THX Brandon

@haileys haileys closed this as completed in d205508 Aug 2, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants