Hi,

On Wed, Oct 15, 2008 at 08:12:57AM +0200, Frederik Ramm wrote:
> sagar anand wrote:
> > => Rails application started on *http://0.0.0.0:3000*
> > => Ctrl-C to shutdown server; call with --help for options
> > [2008-10-13 17:26:41] INFO  WEBrick 1.3.1
> > [2008-10-13 17:26:41] INFO  ruby 1.8.6 (2008-08-11) [i386-linux]
> > [2008-10-13 17:26:41] INFO  WEBrick::HTTPServer#start: pid=28627 port=3000
> > 
> > I dont understand why it gives out http://0.0.0.0. I checked the 
> > database.yml file and hostname for the development environment is set to 
> > localhost with the correct username and password.
> 
> Is probalby not a problem - 0.0.0.0 would indicate it is listening for 
> connections from anyone, not just localhost, but unless there are evil 
> people in your network, that's ok.

This is still not quite correct. TCP/IP connections are between two 
IP adresses and two ports. 

If your browser connects to www.google.com your system needs to know
what IP address to connect to. In this case 66.249.91.99 would work. 
Because you specified the http port, that would mean port 80. 

Your system chooses the local port more or less randomly (It's not
random in the cryptographic sense, it just takes the first available
without doing anything special). For the IP address it choses
(hopefully) an IP address that the google server 66.249.91.99 can
reach you on!

Now if your system happens to have more than one IP address (and
generally it does!), the program can specifically ask for one or the
other IP address. Or it can indicate to the operating system: "you
chose what YOU think is best". 

This last choice is done by specifying ip address 0.0.0.0 . 

If you're starting a server, this becomes slighly more interesting. If
you specify an IP address that the outside world cannot reach, you
will be automatically restricting the connections to not come from the
outside! No firewall needed. 

So, in your case, 0.0.0.0:3000 as the specification where your server
will run means that ALL available IP addresses will be allowed for
incoming traffic. 

The ADDRINUSE error means some other program is already using it. 

Quite possibly:

        fuser -n tcp 3000

will list the process ID of the programs. (if it's someone else
running something on that port you will need to be root to get useful
output in thise cace)....

        Roger. 

-- 
** [EMAIL PROTECTED] ** http://www.BitWizard.nl/ ** +31-15-2600998 **
**    Delftechpark 26 2628 XH  Delft, The Netherlands. KVK: 27239233    **
*-- BitWizard writes Linux device drivers for any device you may have! --*
Q: It doesn't work. A: Look buddy, doesn't work is an ambiguous statement. 
Does it sit on the couch all day? Is it unemployed? Please be specific! 
Define 'it' and what it isn't doing. --------- Adapted from lxrbot FAQ

_______________________________________________
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev

Reply via email to