Terminus-Project / Terminus-Bot

A scriptable IRC bot written in Ruby.
http://terminus-bot.net/
Other
38 stars 18 forks source link

Terminus-Bot will not connect, EventMachine is hanging. #63

Closed dakotawhitevalley closed 10 years ago

dakotawhitevalley commented 10 years ago

http://rdash.in/post/terminus.txt

As you can see here, ./terminus-bot -f -v was ran to see why the bot was never connecting to any networks. It is hanging at em_started for some reason. This is a freshly cloned copy, on a fresh install of ruby 1.9.3-p484, with all necessary gems listed in the README.

Possibly a bug with EventMachine?

ori-sky commented 10 years ago

When clicking the link in your issue, I get a Forbidden message.

You don't have permission to access /post/terminus.txt on this server.

dakotawhitevalley commented 10 years ago

Whoops, seems the directory was locked for some reason. It's fixed now.

dakotawhitevalley commented 10 years ago

It seems I've found why it appears to be hanging...

Terminus-Bot started as 30498. Writing to var/terminus-bot.pid D, [2014-01-07T07:10:35.936902 #30498] DEBUG -- events.dispatch: :em_started E, [2014-01-07T07:14:58.337953 #30498] ERROR -- events.run: Error running event em_started: Unable to connect (possibly too many connections open) D, [2014-01-07T07:14:58.338177 #30498] DEBUG -- events.run: Backtrace for em_started: ["/home/caerdwyn/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/gems/1.9.1/gems/ruby-mpd-0.3.0/lib/ruby-mpd.rb:158:in connect' ", "scripts/mpd.rb:214:instart'", "scripts/mpd.rb:202:in block in initialize'", "lib/events.rb:126:ininstance_eval'", "lib/events.rb:126:in dispatch'", "lib/events.rb:67:inblock in dispatch'", "l ib/events.rb:61:in each'", "lib/events.rb:61:indispatch'", "lib/core.rb:76:in run'", "./terminus-bot:157:inblock in

'", "/home/caerdwyn/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/gems/1.9.1/gems/ev entmachine-1.0.3/lib/eventmachine.rb:187:in call'", "/home/caerdwyn/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/gems/1.9.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:inrun_machine'", "/home/caerdwyn/.rv m/rubies/ruby-1.9.3-p484/lib/ruby/gems/1.9.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in run'", "./terminus-bot:157:in
'"]

What makes me curious now is why it's saying "(possibly too many connections open)" when there is only one instance of the bot running...

kabaka commented 10 years ago

That error comes from the library used by the mpd script. Make sure the script is configured correctly and your mpd server is accepting connections, or disable the script.

dakotawhitevalley commented 10 years ago

Ok, thanks, Kabaka.