zerowidth / camper_van

A Campfire to IRC bridge
MIT License
129 stars 25 forks source link

Suddenly crashing on parts #40

Closed rlpowell closed 11 years ago

rlpowell commented 11 years ago

This has suddenly started happening to me a lot:

/usr/local/rvm/gems/ruby-1.9.3-p392/gems/camper_van-0.0.11/lib/camper_van/channel.rb:90:in part': undefined methodclose_connection' for #EventMachine::HttpClient:0x00000004657fa8 (NoMethodError) from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/camper_van-0.0.11/lib/camper_van/ircd.rb:285:in block (2 levels) in <class:IRCD>' from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/camper_van-0.0.11/lib/camper_van/ircd.rb:284:ineach' from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/camper_van-0.0.11/lib/camper_van/ircd.rb:284:in block in <class:IRCD>' from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/camper_van-0.0.11/lib/camper_van/command_definition.rb:59:inhandle' from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/camper_van-0.0.11/lib/camper_van/ircd.rb:77:in receive_line' from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/camper_van-0.0.11/lib/camper_van/server.rb:126:inreceive_line' from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/eventmachine-1.0.3/lib/em/protocols/linetext2.rb:64:in receive_data' from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:inrun_machine' from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in run' from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/camper_van-0.0.11/lib/camper_van/server.rb:23:inrun' from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/camper_van-0.0.11/bin/camper_van:75:in <top (required)>' from /usr/local/rvm/gems/ruby-1.9.3-p392/bin/camper_van:19:inload' from /usr/local/rvm/gems/ruby-1.9.3-p392/bin/camper_van:19:in <main>' from /usr/local/rvm/gems/ruby-1.9.3-p392/bin/ruby_noexec_wrapper:14:ineval' from /usr/local/rvm/gems/ruby-1.9.3-p392/bin/ruby_noexec_wrapper:14:in `

'

mmichie commented 11 years ago

I'm seeing this issue as well

pbrisbin commented 11 years ago

Relevant lines here.

pastorius commented 11 years ago

I'm seeing this too on 0.0.12.

@zerowidth any ideas on where to start digging in on this? The EM docs clearly include EventMachine::HttpClient#close_connection.

I'm happy to take a look at it, but could use a little guidance.

lovek323 commented 11 years ago

I'm experiencing the same issue. Any assistance would be appreciated.

rlpowell commented 11 years ago

FWIW, I simply commented out the line in question, and everything works fine.

lovek323 commented 11 years ago

@rlpowell -- that has solved the problem, but I can't work out why the method doesn't exist. The HttpClient class does inherit from the Connection class which responds to the close_connection message.

jimeh commented 11 years ago

I've got the same issue, seems to happen whenever a user disconnects. For now I'll just stick to 0.0.10, as this issue occurs with 0.0.11 and 0.0.12.

2013-08-10 09:56:27     1  INFO CamperVan : closed connection from 192.168.50.1
2013-08-10 09:56:27     1 ERROR CamperVan : http error . Trying again in 2 seconds...
/var/lib/gems/1.9.1/gems/camper_van-0.0.12/lib/camper_van/channel.rb:90:in `part': undefined method `close_connection' for #<EventMachine::HttpClient:0x00000000d31620> (NoMethodError)
        from /var/lib/gems/1.9.1/gems/camper_van-0.0.12/lib/camper_van/ircd.rb:285:in `block (2 levels) in <class:IRCD>'
        from /var/lib/gems/1.9.1/gems/camper_van-0.0.12/lib/camper_van/ircd.rb:284:in `each'
        from /var/lib/gems/1.9.1/gems/camper_van-0.0.12/lib/camper_van/ircd.rb:284:in `block in <class:IRCD>'
        from /var/lib/gems/1.9.1/gems/camper_van-0.0.12/lib/camper_van/command_definition.rb:59:in `handle'
        from /var/lib/gems/1.9.1/gems/camper_van-0.0.12/lib/camper_van/ircd.rb:77:in `receive_line'
        from /var/lib/gems/1.9.1/gems/camper_van-0.0.12/lib/camper_van/server.rb:126:in `receive_line'
        from /var/lib/gems/1.9.1/gems/eventmachine-1.0.3/lib/em/protocols/linetext2.rb:64:in `receive_data'
        from /var/lib/gems/1.9.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run_machine'
        from /var/lib/gems/1.9.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run'
        from /var/lib/gems/1.9.1/gems/camper_van-0.0.12/lib/camper_van/server.rb:23:in `run'
        from /var/lib/gems/1.9.1/gems/camper_van-0.0.12/bin/camper_van:75:in `<top (required)>'
        from /usr/local/bin/camper_van:19:in `load'
        from /usr/local/bin/camper_van:19:in `<main>'
zerowidth commented 11 years ago

Fixed in #44. Thanks @tleish!