[Rubygems-developers] Testing against multiple rubygems versions, gem server problems

Chad Woolley thewoolleyman at gmail.com
Sun Dec 9 19:17:24 EST 2007


On Dec 2, 2007 11:22 PM, Chad Woolley <thewoolleyman at gmail.com> wrote:
> Gem server does strange things - it
> will sometimes not show all gems, or sometimes it gets port conflict
> errors even though there is no other server running

I've tracked this problem down to a problem with TCPServer on linux
only under Ruby 1.8.5 Webrick::Utils.create_listeners.

Here's the error for googlers:

#<Errno::EADDRINUSE: Address already in use - bind(2)>

Socket.getaddrinfo returns two entries, one inet6 and one inet.  On
linux, this line in Webrick::Utils.create_listeners gets the
EADDRINUSE error when processing the second entry:

sock = TCPServer.new(ai[3], port)

For some reason, this doesn't happen on mac, and didn't used to happen on Linux.

Anyway, doesn't seem to cause problems, since the server gets started
anyway, so I'm not going to worry about it.  Just thought I'd
summarize my debugging here for clo-sure and anybody googling the
error.

-- Chad


More information about the Rubygems-developers mailing list