[OSM-dev] Trying to upload data using API
R.E.Wolff at BitWizard.nl
Wed Oct 15 07:48:42 BST 2008
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 18.104.22.168 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 22.214.171.124 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
The ADDRINUSE error means some other program is already using it.
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)....
** R.E.Wolff at BitWizard.nl ** 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
More information about the dev