From: | Erwan Arzur <earzur(at)netratings(dot)com> |
---|---|
To: | Melanie Bergeron <mbergeron_pg(at)globeecom(dot)com> |
Cc: | "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | Re: problem to connect to database |
Date: | 2004-01-16 08:15:06 |
Message-ID: | 40079D8A.8090405@netratings.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
Melanie Bergeron wrote:
> I can't use telnet. If I try [telnet localhost:5432] it always return
> the same error message "Connecting To host:5432...Could not open a
> connection to host on port 23 : Connect failed" but if I do [netstat
> -an], it returns :
> ...
> TCP 0.0.0.0:5432 0.0.0.0:0 LISTENING
> ...
>
Dave wanted you to check just that, but used a syntax that just doesn't
work on the platform you're using (did you see that it's trying to
resolve host:5432 ?). Telnet connects you to the TCP port you specify on
the command line, and 'man telnet' is your friend, by the way ...
The output of netstat just means your server is started and listening on
port 5432, so that's one problem solved.
Now that means you have to investigate some other problems. Supposing
you're using postgres on a linux box, your database may be in
/var/lib/pgsql/data. Is the pg_hba.conf file there correctly setup to
allow connections from the webserver ?
You need something like this (not recommended on production environments) :
host all all 127.0.0.1 255.255.255.255 trust
host all all 10.0.0.0 255.255.255.0 trust
have you tried "psql gec_test bergeron.melanie" ? what is the output ?
reading the tutorial there might just help, also :
http://www.postgresql.org/docs/current/static/tutorial.html
From | Date | Subject | |
---|---|---|---|
Next Message | Kris Jurka | 2004-01-16 08:47:47 | Re: jdbc1.AbstractJdbc1Statement.setBinaryStream bug and |
Previous Message | Martin Holz | 2004-01-16 07:38:07 | Re: jdbc1.AbstractJdbc1Statement.setBinaryStream bug and |