[Backgroundrb-devel] nil object / slave server problem

Ezra Zygmuntowicz ezmobius at gmail.com
Mon Mar 5 14:39:19 EST 2007


Jake-

	This is a problem that probably needs to become a FAQ. WHat's  
happeneing is the name of your worker is too long and when slave  
tries to create the unix socket the filename is too long and it fails  
to fin slave socket.

	Rename your worker to a smaller name and it will work fine. Or  
change to use tcp connectiosn instead of unix sockets.

Cheers-
-Ezra

On Mar 5, 2007, at 8:11 AM, Jack Nutting wrote:

> 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
> _______________________________________________
> Backgroundrb-devel mailing list
> Backgroundrb-devel at rubyforge.org
> http://rubyforge.org/mailman/listinfo/backgroundrb-devel

-- Ezra Zygmuntowicz 
-- Lead Rails Evangelist
-- ez at engineyard.com
-- Engine Yard, Serious Rails Hosting
-- (866) 518-YARD (9273)




More information about the Backgroundrb-devel mailing list