Re: Problem with libpq3 & postgresql8 - Mailing list pgsql-general

From vishal saberwal
Subject Re: Problem with libpq3 & postgresql8
Date
Msg-id 3e74dc2505092117085182b515@mail.gmail.com
Whole thread Raw
In response to Re: Problem with libpq3 & postgresql8  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Problem with libpq3 & postgresql8
List pgsql-general
hi,
tom and many others helped me with someting similar to this.

Check for the following:
(a) in /usr/lib check what libpq you have installed. It should be libpq3.2 or higher. If it is not, you can copy from your compiled source and then create the symbolic links there.
(b) Try using etheral and see what is going through and what is happening. It really helps.
(c) You need to have keys on each (client and server side). What certificates are you using (self signed or commercial). I did mine with self-signed and it worked. My certificates go in /var/lib/pgsql
(d) Have your pg_hba.conf set up for openssl.
(e) Have the connection string give sslmode=allow
(f) when you use psql, use /usr/local/pgsql/bin/psql instead of directly writing psql (that searches in /usr/bin in my machine and it isnt the right version) ...

[root@localhost DBApi]# ls -l /usr/lib/libpq*
-rw-r--r--  1 postgres root 1480452 Mar 10  2004 /usr/lib/libpq.a
lrwxrwxrwx  1 postgres root      21 Aug 29 15:00 /usr/lib/libpq.so -> /usr/lib/libpq.so.3.2
lrwxrwxrwx  1 postgres root      21 Aug 29 14:59 /usr/lib/libpq.so.3 -> /usr/lib/libpq.so.3.2
-rwxr-xr-x  1 postgres root  113988 Mar 10  2004 /usr/lib/libpq.so.3.1
-rwxr-xr-x  1 postgres root  122177 Aug 26 12:55 /usr/lib/libpq.so.3.2

"allow" attempts a non-SSL connection first, whereas
"prefer" attempts an SSL connection first.  If the server permits
non-SSL connections then "allow" will get you connected as non-SSL
without ever attempting SSL.

thanks,
vish

On 9/21/05, Tom Lane <tgl@sss.pgh.pa.us> wrote:
"Alex R. Mosteo" <alejandro@mosteo.com> writes:
> About the certificate thing, I'm not sure what you mean, but I've
> configured the pg_hba.conf file useing hostnossl. I see this line in the
> server log:
> LOG:  no se pudo aceptar una conexión SSL: se detectó EOF
> Which translates to: "Couldn't accept a SSL connection: EOF detected"
> but this message only appears after I kill the client process, which
> could mean that indeed the connection is alive and hung.

Hm.  Does it work if you add "sslmode = disable" to your connection
string?

What's the platform exactly, and exactly which PG 8.0.* release are you
using?  For that matter, are you sure you are linking your program to
the 8.0 libpq.so, and not still the 7.4 one?

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to majordomo@postgresql.org so that your
       message can get through to the mailing list cleanly

pgsql-general by date:

Previous
From: Dawid Kuroczko
Date:
Subject: Re: Slow search.. quite clueless
Next
From: "Michael L. Artz"
Date:
Subject: Re: Network Flow Schema + Bulk Import/Updates