From: GOTO Kentaro Date: 2001-12-12T01:49:11+09:00 Subject: [ruby-talk:28243] Re: Webrick error Hi, In message "[ruby-talk:28160] Webrick error" on Tue, 11 Dec 2001 10:12:16 +0900, Michael Davis writes: > /home/mdavis/webrick-1.0.0/sample/httpd: ruby httpd.rb > > [2001-12-10 17:22:20] INFO Logging start (level=5). > ../../lib/webrick/server.rb:61:in `new': Invalid argument - "socket(2)" > (Errno::EINVAL) > from ../../lib/webrick/server.rb:61:in `listen' > from ../../lib/webrick/server.rb:60:in `each' > from ../../lib/webrick/server.rb:60:in `listen' > from ../../lib/webrick/server.rb:51:in `initialize' > from ../../lib/webrick/httpserver.rb:25:in `initialize' > from httpd.rb:12:in `new' > from httpd.rb:12 Could you report what output by the following? require 'socket' port = 2000 for bindaddress in [nil, '0.0.0.0'] res = Socket::getaddrinfo(bindaddress, port, Socket::AF_UNSPEC, # address family Socket::SOCK_STREAM, # socket type 0, # protocol Socket::AI_PASSIVE) # flag res.each{|ai| begin p [bindaddress, ai] TCPServer.new(ai[3], port) rescue Exception => err p err end } end -- Gotoken