Rack always claims Address already in use #440

bootstraponline opened this Issue Oct 15, 2012 · 4 comments


None yet
3 participants

sudo netstat -tulpn | grep :4567 reports that the address isn't in use by any process.

Starting rack generates an error.

INFO  WEBrick 1.3.1
WARN  TCPServer Error: Address already in use - bind(2)
INFO  WEBrick::HTTPServer#start: pid=23793 port=4567

The server successfully binds to 4567 and netstat says there is only one ruby process listening on that address. Sample code to reproduce the issue:

#!/usr/bin/env ruby

require 'rubygems'
require 'rack'

Rack::Server.new(:app => '', :Port => 4567).start

Every port always generates a warning even when not in use. Why does rack think every port is already in use?



raggi commented Nov 2, 2012

I cannot replicate this. I suspect this is unique to your system.

raggi closed this Nov 2, 2012

Did you test on Ubuntu?


zzak commented Nov 4, 2012

@bootstraponline I'm using ubuntu 12.10 and I could not reproduce this problem using the following example:

#!/usr/bin/env ruby

require 'rubygems'
require 'rack'

class Omg
  def call(env)
    [200, {"Content-Type" => "text/html"}, "Omg, is this thing on?"]

Rack::Server.new(:app => Omg.new, :Port => 4567).start

@zzak Thanks for looking at this. I guess it's specific to my system. The app still works despite the warning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment