Backgroundrb - Connection closed


maybe someone can help with backgroundrb. I’ve written an application,
makes use of backgroundrb. Everything works fine on my development
machine, but
it crashes on my production server.

Something seems to be wrong with backgroundrb, but I don’t know the
cause. All I
get is the error message attached below, which is extracted from the

I appreciate any help on this matter.


Michael K.

— errror message

DRb::DRbConnError (connection closed):
/usr/local/lib/ruby/1.8/drb/drb.rb:567:in load' /usr/local/lib/ruby/1.8/drb/drb.rb:629:inrecv_reply’
/usr/local/lib/ruby/1.8/drb/drb.rb:918:in recv_reply' /usr/local/lib/ruby/1.8/drb/drb.rb:1192:insend_message’
/usr/local/lib/ruby/1.8/drb/drb.rb:1083:in method_missing' /usr/local/lib/ruby/1.8/drb/drb.rb:1167:inopen’
/usr/local/lib/ruby/1.8/drb/drb.rb:1082:in method_missing' /usr/local/lib/ruby/1.8/drb/drb.rb:1100:inwith_friend’
/usr/local/lib/ruby/1.8/drb/drb.rb:1081:in method_missing' /app/controllers/search_controller.rb:100:instart_source_processing’
start_source_processing' /app/controllers/search_controller.rb:20:insimple’



perform_action_without_rescue' /usr/local/lib/ruby/1.8/benchmark.rb:293:inmeasure’





process' /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.4/lib/dispatcher.rb:38:indispatch’

process' /usr/local/lib/ruby/1.8/thread.rb:135:insynchronize’

process' /usr/local/lib/ruby/gems/1.8/gems/mongrel-’
process_client' /usr/local/lib/ruby/gems/1.8/gems/mongrel-’
run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-’
run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-’


Hey Michael-

SO this works in development mode but not in production? That sounds

like a configuration issue to me. Can you go over your config file
and make sure it is doing what you thihnk it should be doing? You
need to make sure to set the environment to production in the config
file as it defaults to development.


Hello Ezra,

that’s what I’d suppose too. But everything is set properly. Of course
I’ve set
the environment to production in config/backgroundrb.yml.

I’m sort of stunned. I really don’t know, what else I can do.


Michael K.


Are you running this on OSX? I have seen a few issues with reverse

dns not working correctly on OSX for drb connections that return that
same connection closed error. Try replacing the host in the config
file with instead of localhost. You will also need to do
the saem to the acl list in the config. Try this and report back.


I have the same error (connection closed)
My config file is listed below:
port: 2999
load_rails: true
environment: test
database_yml: config/database.yml
protocol: druby
:deny: all
:order: deny, allow

when i replace :allow then i have another kind of error:
“connection closed by peer”.
if i replace host: i have error:
" connection refused - connect(2)" (that error i encountered when run my
test without backgroundrb server started)
I do not know how i can escape from this…where error is - in the
config or somewhere else…

I appreciate any help on this matter.

Thank you,

Dear Ezra,

I’ve swapped localhost with and it’s working. Strange me,
because I
was sure that I had already tried that yesterday. Obviously not.

Anyway: It’s working now!

I am using FreeBSD(Release 6.0). Since OSX ist sort of BSDish, there
could be a

Anyway, backgroundrb is way cool and I can imagine tons of interesting
uses for it.

Greetings and thank your very much for your patience and your help. And
course, thanks for backgroundrb!!!


ok, i got the solution. i put the url for the server, but needed the ip