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

Already on GitHub? Sign in to your account

EM.open_datagram_socket fails under IPv6 => no datagram socket (RuntimeError) #190

ibc opened this Issue Apr 25, 2011 · 4 comments


None yet
3 participants

ibc commented Apr 25, 2011

My computer has IPv6 and I can open a EM server listening into IPv6, but trying to open an UDP socket on top of IPv6 raises an exception:

EM.open_datagram_socket("::1", 8000, MyHandler) 

no datagram socket (RuntimeError)

Note that the following does work:

EM.start_server("::1", 8000, MyHandler) 

ibc commented Apr 25, 2011

The issue is fixed in https://github.com/cabo/eventmachine (but it's not present in eventmachine master). I've used in both client and server:

EM.open_datagram_socket(""2001:0:53aa:64c:38c3:4b25:2b19:d1a6", PORT)

The client can contact the server via UDP6 and tcpdump correctly shows:

IP6 2001:0:53aa:64c:38c3:4b25:2b19:d1a6.9091 > 2001:0:53aa:64c:38c3:4b25:2b19:d1a6.9090: UDP, length 432

wilken commented Aug 9, 2011

This is discussed in #74

@cabo cabo referenced this issue Feb 12, 2012


IPv6 and UDP fixes #297

@ioquatix ioquatix referenced this issue in swrobel/invoker Oct 27, 2014

@swrobel swrobel Lock RubyDNS to 0.8.x versions
Invoker currently does not start on a new install because it will use RubyDNS 0.9.0 which was released on 10/23/14. This took an exceptionally long time to troubleshoot because of celluloid, but I finally tracked it down! Invoker's gemspec locks RubyDNS to `~> 0.7`, however [the author states](socketry/rubydns#28) that `0.x` releases are incompatible, but minor versions should be compatible. Here is the [offending change](socketry/rubydns@v0.8.5...v0.9.0#diff-d86035f01d9c6b072797c19b43eb736aL116) in 0.9.0.
For the time being you can add the following to your own `Gemfile`:

`gem 'rubydns', '~> 0.8.5'`

Here is a trace of what happens when you run with RubyDNS 0.9.0:
→ invoker start Procfile 
D, [2014-10-26T09:45:30.515304 #59891] DEBUG -- : Terminating 1 actor...
vendor/bundle/gems/celluloid-0.16.0/lib/celluloid/calls.rb:39:in `check': wrong number of arguments (1 for 0) (ArgumentError)
	from vendor/bundle/gems/celluloid-0.16.0/lib/celluloid/calls.rb:24:in `dispatch'
	from vendor/bundle/gems/celluloid-0.16.0/lib/celluloid/calls.rb:63:in `dispatch'
	from vendor/bundle/gems/celluloid-0.16.0/lib/celluloid/cell.rb:60:in `block in invoke'
	from vendor/bundle/gems/celluloid-0.16.0/lib/celluloid/cell.rb:71:in `block in task'
	from vendor/bundle/gems/celluloid-0.16.0/lib/celluloid/actor.rb:357:in `block in task'
	from vendor/bundle/gems/celluloid-0.16.0/lib/celluloid/tasks.rb:57:in `block in initialize'
	from vendor/bundle/gems/celluloid-0.16.0/lib/celluloid/tasks/task_fiber.rb:15:in `block in create'
	from (celluloid):0:in `remote procedure call'
	from vendor/bundle/gems/celluloid-0.16.0/lib/celluloid/calls.rb:92:in `value'
	from vendor/bundle/gems/celluloid-0.16.0/lib/celluloid/proxies/sync_proxy.rb:33:in `method_missing'
	from vendor/bundle/gems/invoker-1.3.0/lib/invoker/power/powerup.rb:17:in `block in run'
	from vendor/bundle/bundler/gems/eventmachine-4d53154a9ea4/lib/eventmachine.rb:187:in `call'
	from vendor/bundle/bundler/gems/eventmachine-4d53154a9ea4/lib/eventmachine.rb:187:in `run_machine'
	from vendor/bundle/bundler/gems/eventmachine-4d53154a9ea4/lib/eventmachine.rb:187:in `run'
	from vendor/bundle/gems/invoker-1.3.0/lib/invoker/power/powerup.rb:13:in `run'
	from vendor/bundle/gems/invoker-1.3.0/lib/invoker/power/powerup.rb:7:in `block in fork_and_start'
	from vendor/bundle/gems/invoker-1.3.0/lib/invoker/power/powerup.rb:7:in `fork'
	from vendor/bundle/gems/invoker-1.3.0/lib/invoker/power/powerup.rb:7:in `fork_and_start'
	from vendor/bundle/gems/invoker-1.3.0/lib/invoker/process_manager.rb:72:in `run_power_server'
	from vendor/bundle/gems/invoker-1.3.0/lib/invoker/commander.rb:39:in `start_manager'
	from vendor/bundle/gems/invoker-1.3.0/lib/invoker/cli.rb:46:in `start'
	from vendor/bundle/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
	from vendor/bundle/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
	from vendor/bundle/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
	from vendor/bundle/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
	from vendor/bundle/gems/invoker-1.3.0/lib/invoker/cli.rb:12:in `start'
	from vendor/bundle/gems/invoker-1.3.0/bin/invoker:7:in `<top (required)>'
	from ./bin/invoker:16:in `load'
	from ./bin/invoker:16:in `<main>'

sodabrew commented Jan 29, 2015

Closing in favor of PR #570

@sodabrew sodabrew closed this Jan 29, 2015


sodabrew commented Oct 28, 2015

I'm tracking this in #630 now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment