views:

411

answers:

2

I'm new to EventMachine, so I'm not sure what this means. I'm getting this exception:

EventMachine::ConnectionNotBound recieved ConnectionUnbound for an unknown signature: ef93a97d4d6441cb80d30fe2313d7de73

The program is fairly complicated, so I can't really explain everything that might have led up to it. All I need is a pointer towards what to look for. The error doesn't seem to be documented (looking at http://eventmachine.rubyforge.org/).

+3  A: 

I have had this exception raised when some other unhandled exception was raised in the initialize method of a subclass of EventMachine::Connection. Check that the arity of your subclass initialize method is correct and that the initialize method is running without errors.

Troy Stribling
+2  A: 

Usually, those errors occur in initialize or post_init. The first thing you should do is add rescue inside your callbacks to find out what actually is causing that error.

def initialize(*args)
  ...
  super
rescue Exception
  ...
end

def post_init
  ...
  super
rescue Exception
  ...
end
kenn
This is great advice, and thanks for the illustration, but it doesn't catch Troy's scenario, where the arity of `#initialize` is wrong. That turned out to be my problem. (Actually, I was doing the calling, not being the connection.) Probably a good answer for someone else with the same question, though. :)
Peeja