Forum: Mongrel Mongrel error since updating to OSX 10.5.3

Posted by Matt Daw (Guest)
on 2008-05-30 17:36
(Received via mailing list)
Howdy, I'm getting an error message when trying to run one of my rails
apps, which seems to have started after updating to 10.5.3.

mattdaw-2:v1.5_patch mdaw$ mongrel_rails start
** Starting Mongrel listening at 0.0.0.0:3000
** Starting Rails with development environment...
/usr/local/ruby-patched/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../
lib/mongrel/tcphack.rb:12:in `initialize_without_backlog':
getaddrinfo: nodename nor servname provided, or not known (SocketError)
         from /usr/local/ruby-patched/lib/ruby/gems/1.8/gems/
mongrel-1.1.5/bin/../lib/mongrel/tcphack.rb:12:in `initialize'
         from /usr/local/ruby-patched/lib/ruby/1.8/drb/drb.rb:865:in
`open'
         from /usr/local/ruby-patched/lib/ruby/1.8/drb/drb.rb:865:in
`open_server'
         from /usr/local/ruby-patched/lib/ruby/1.8/drb/drb.rb:759:in
`open_server'
         from /usr/local/ruby-patched/lib/ruby/1.8/drb/drb.rb:757:in
`each'
         from /usr/local/ruby-patched/lib/ruby/1.8/drb/drb.rb:757:in
`open_server'
         from /usr/local/ruby-patched/lib/ruby/1.8/drb/drb.rb:1339:in
`initialize'
         from /usr/local/ruby-patched/lib/ruby/1.8/drb/drb.rb:1627:in
`new'
          ... 29 levels...
         from /usr/local/ruby-patched/lib/ruby/gems/1.8/gems/
mongrel-1.1.5/bin/../lib/mongrel/command.rb:212:in `run'
         from /usr/local/ruby-patched/lib/ruby/gems/1.8/gems/
mongrel-1.1.5/bin/mongrel_rails:281
         from /usr/local/ruby/bin/mongrel_rails:19:in `load'
         from /usr/local/ruby/bin/mongrel_rails:19

I'm running ruby 1.8.6 (2008-03-03 patchlevel 114) [i686-darwin9.2.2]
which I compiled myself, but another member of my team is using stock
ruby from leopard and is getting the same behavior on this one
application.

Any idea what could cause this? Thanks!

Matt
Posted by Woody Peterson (woahdae)
on 2008-05-30 19:47
Matt Daw wrote:
> Howdy, I'm getting an error message when trying to run one of my rails
> apps, which seems to have started after updating to 10.5.3.
> 
> mattdaw-2:v1.5_patch mdaw$ mongrel_rails start
> ** Starting Mongrel listening at 0.0.0.0:3000
> ** Starting Rails with development environment...
> /usr/local/ruby-patched/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../
> lib/mongrel/tcphack.rb:12:in `initialize_without_backlog':
> getaddrinfo: nodename nor servname provided, or not known (SocketError)

If you try running a migration it gives a better stack trace, and I 
tracked it down to backgroundrb/drb. I'm using an older version of 
backgroundrb, and on line 67 of 
vendor/plugins/backgroundrb/lib/backgroundrb.rb it calls 
DRb.start_service('druby://localhost:0'). I changed that to 
DRb.start_service(nil), which finds the first open port, and it starts 
up. I haven't tested this at all, let alone in a production environment, 
but I will have in a few days. I'd be interested to know if this is all 
it takes to solve your problem too.
Posted by Matt Daw (Guest)
on 2008-05-30 19:56
(Received via mailing list)
Hi Woody, thanks, that fixed it for me. That explains the difference
in my app, the newer branches are on an up to date backgroundrb, while
the broken one is still on an ancient one.

Matt
Posted by Grant Blakeman (gblakeman)
on 2008-06-02 22:37
Matt Daw wrote:
> Hi Woody, thanks, that fixed it for me. That explains the difference
> in my app, the newer branches are on an up to date backgroundrb, while
> the broken one is still on an ancient one.
> 
> Matt

Yeah, I was having the same issue and this worked for me too. Thanks for 
the tip!

-gb
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.