[Backgroundrb-devel] nil object / slave server problem

Jack Nutting jnutting at gmail.com
Mon Mar 5 11:11:06 EST 2007


I'm just getting started wtih backgroundrb, and unfortunately hit a
snag right away...  I'm running the latest releases of rails,
backgroundrb, slave and daemons.

I created a simple worker class, using the generator, which currently
does nothing but print the arguments that are passed to do_work.  I'm
running backgroundrb using './script/backgroundrb run' so I can watch
the output.  When I try to launch a worker, I get this in the output
(in the shell where the backgroundrb script is running):

You have a nil object when you didn't expect it!
The error occurred while evaluating nil.wait - (NoMethodError)
/<mypath>/vendor/plugins/backgroundrb/server/lib/backgroundrb/middleman.rb:218:in
`new_worker'

Looking through middleman.rb, I found that this is triggered by the
slave_obj being nil, and see that there's a preceding exception, which
I found in backgroundrb_server.log:

20070305-16:45:13 (2929) Loading Worker Class File:
/<mypath>/lib/workers/background_message_sender_worker.rb
20070305-16:45:38 (2929) failed to find slave socket - (RuntimeError)
20070305-16:45:38 (2929)
/opt/local/lib/ruby/gems/1.8/gems/slave-1.2.0/lib/slave.rb:435:in
`initialize'

FWIW, here's what my backgroundrb.yml looks like:

---
:rails_env: development
:host: localhost
:port: 2000
:acl:
   :deny: all
   :allow: localhost 127.0.0.1
   :order: deny allow


Any ideas?  A misconfiguration on my part, perhaps?

-- 
// jack
// http://www.nuthole.com


More information about the Backgroundrb-devel mailing list