Обсуждение: Postgres v8 jdbc connect fails while v7.4 connection works

Поиск
Список
Период
Сортировка

Postgres v8 jdbc connect fails while v7.4 connection works

От
davidb999@gmail.com
Дата:
Folks,
I point my app on my local PC at a v8 database on server A and it
fails. If I point it at v7.4 db on server B it works. All are Red Hat
ES3.

I've upgraded to latest drivers.
I've checked _hba and confirmed my IP address is there.
In fact they are there in the new format x.x.x.0/255

I can connect locally on the box so I know postmaster is running.

Any thoughts?

TIA...


Re: Postgres v8 jdbc connect fails while v7.4 connection

От
Dave Cramer
Дата:
Make sure you can telnet to port 5432 on the box in question
connecting locally doesn't say much

look in postgresql.conf and change listen_address to '*'

Dave

davidb999@gmail.com wrote:

>Folks,
>I point my app on my local PC at a v8 database on server A and it
>fails. If I point it at v7.4 db on server B it works. All are Red Hat
>ES3.
>
>I've upgraded to latest drivers.
>I've checked _hba and confirmed my IP address is there.
>In fact they are there in the new format x.x.x.0/255
>
>I can connect locally on the box so I know postmaster is running.
>
>Any thoughts?
>
>TIA...
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 4: Don't 'kill -9' the postmaster
>
>
>
>

--
Dave Cramer
http://www.postgresintl.com
519 939 0336
ICQ#14675561


Re: Postgres v8 jdbc connect fails while v7.4 connection

От
Prasanth
Дата:
Did you check if tcp/ip is set to true in your config file?

-Prasanth.

davidb999@gmail.com wrote:
> Folks,
> I point my app on my local PC at a v8 database on server A and it
> fails. If I point it at v7.4 db on server B it works. All are Red Hat
> ES3.
>
> I've upgraded to latest drivers.
> I've checked _hba and confirmed my IP address is there.
> In fact they are there in the new format x.x.x.0/255
>
> I can connect locally on the box so I know postmaster is running.
>
> Any thoughts?
>
> TIA...
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>
>

Re: Postgres v8 jdbc connect fails while v7.4 connection

От
"DavidB"
Дата:
OK...got it. First I had changed listen_address to '*' but had left it
commented out<duh!>
When I fixed that I tried restarting and hit problem #2...

I had hba_conf settings like:
host    all         all         111.123.21.1/32          trust

didn't work but going back to old v7 format of
host    all         all         111.123.21.1     255.255.255.0  trust

did work.
Problem in my definition?


Re: Postgres v8 jdbc connect fails while v7.4 connection

От
Oliver Jowett
Дата:
DavidB wrote:

> I had hba_conf settings like:
> host    all         all         111.123.21.1/32          trust
>
> didn't work but going back to old v7 format of
> host    all         all         111.123.21.1     255.255.255.0  trust
>
> did work.
> Problem in my definition?

/32 means 255.255.255.255
/24 means 255.255.255.0

so the above two lines have different meanings.

-O

Re: Postgres v8 jdbc connect fails while v7.4 connection

От
"DavidB"
Дата:
Got ya...that I had not really noticed even though its documented here:
http://developer.postgresql.org/docs/postgres/client-authentication.html#EXAMPLE-PG-HBA.CONF

Thanks all...