Re: problem to connect to database

From: Arne Stoelck <arne(at)web(dot)de>
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 22:29:11
Message-ID: Pine.LNX.4.58.0401162324080.646@darkstar.localet
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc


Several things come to my mind:

- 10.0.0.0 is not a "host" address, it's a "net" address, so maybe you
should put 10.0.0.1 instead

- did you check the logfile ? on my install it's inside the data
directory, called postgres.log. if this isn't instructive
enough, add more verbosity by changing the postgresql.conf
file, and...

- make sure to restart the server

Hope this helps,

Arne Stölck

http://www.stolck.com

On Fri, 16 Jan 2004, Melanie Bergeron wrote:

> I can connect to it using telnet
>
> Melanie
> Dave Cramer wrote:
>
> >Melanie,
> >
> >If you can't telnet into it, then the driver won't connect either.
> >
> >If you use windows just run telnet with no args
> >a box will come up and you can enter the port, and host
> >
> >it should connect and nothing else.
> >
> >If it doesn't then it is a network problem
> >
> >Dave
> >On Fri, 2004-01-16 at 13:13, Melanie Bergeron wrote:
> >
> >
> >>I added the line [host all all 10.0.0.0 255.255.255.0
> >>trust] in my pg_hba.conf (the other line was already there) but no results.
> >>I will take a look to the tutorial, maybe I will find my problem. But I
> >>still can't figured out why it worked last week and not today.
> >>
> >>Thanks to all for your replies
> >>
> >>Melanie
> >>
> >>Erwan Arzur wrote:
> >>
> >>
> >>
> >>>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
> >>>
> >>>
> >>>
> >>>.
> >>>
> >>>
> >>>
> >>
> >>---------------------------(end of broadcast)---------------------------
> >>TIP 7: don't forget to increase your free space map settings
> >>
> >>
> >>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly
>

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Kris Jurka 2004-01-16 23:23:46 Re: getTables or code problem?
Previous Message Melanie Bergeron 2004-01-16 21:49:29 Re: problem to connect to database