From: Richard Surname Date: 2010-07-16T06:41:05+09:00 Subject: Re: Ruby networking: Errno::ECONNREFUSED: Connection refused - connect(2) on Ubuntu 9.1 Thank you sooooo much Jes炭s for the crystal clear explanation! You were so on the mark and it saved me! All the best, Richard Jes炭s Gabriel y Gal叩n wrote: > > You can connect using the IP but not localhost (or 127.0.0.1). If you > want your server to bind to all network interfaces, you can use > 0.0.0.0: > > ~$ netstat -ant | grep 9900 > tcp 0 0 0.0.0.0:9900 0.0.0.0:* > LISTEN > jesus@jesus-laptop:~$ telnet localhost 9900 > Trying 127.0.0.1... > Connected to localhost. > Escape character is '^]'. > Connection closed by foreign host. > jesus@jesus-laptop:~$ telnet 192.168.1.35 9900 > Trying 192.168.1.35... > Connected to 192.168.1.35. > Escape character is '^]'. > Connection closed by foreign host. > > And then you can connect using all IPs that the machine uses. > > Jesus. -- Posted via http://www.ruby-forum.com/.