[root@localhost DBApi]# cat /var/lib/pgsql/logfile
LOG: database system was interrupted at 2005-08-29 15:01:11 PDT
LOG: checkpoint record is at 0/655FF630
LOG: redo record is at 0/655FF630; undo record is at 0/0; shutdown TRUE
LOG: next transaction ID: 15567; next OID: 11920206
LOG: database system was not properly shut down; automatic recovery in progress
LOG: record with zero length at 0/655FF66C
LOG: redo is not required
LOG: database system is ready
LOG: could not accept SSL connection: peer did not return a certificate
On 8/26/05, Michael Fuhr < mike@xxxxxxxx> wrote:On Fri, Aug 26, 2005 at 01:57:36PM -0700, vishal saberwal wrote:
> I am not sure as to how i can find the version of libpq that i am
> using on my server. My test file has sslmode=prefer. This is what i
> did:
> (a)
> [root@localhost serv]# ./bin/test_lib
> Connection failed: SSL error: sslv3 alert handshake failure
I asked what appeared in the server's logs when this happened but
I don't see that information in your post. Those log entries might
be useful, so please post them if you continue to have trouble.
> ret=-1
> [root@localhost serv]# ldd ./bin/test_lib
> ...
> libpq.so.3 => /usr/lib/libpq.so.3 (0x002ee000)
What's the output of the following command?
ls -l /usr/lib/libpq.so*
In my 7.4.8 installation I see the following:
libpq.so -> libpq.so.3.1
libpq.so.3 -> libpq.so.3.1
libpq.so.3.1
As I recall, 8.0.1's libpq was libpq.so.3.2 (this was changed to
libpq.so.4.0 in 8.0.2), so the library's minor version should tell
you which version of PostgreSQL you're linked against.
I asked if the certificate works with psql, and if it does, for you
to show the output of "ldd psql". I don't see that output -- does
psql work? If so then please post its ldd output.
> [root@localhost libk2]# ./bin/test_k2
> Connection failed: could not open certificate file
> "/root/.postgresql/postgresql.crt": No such file or directory
What's test_k2? It's looking for the certificate, although perhaps
not where you want it to. What happens if you run this program as
a user that has a certificate, or if you install the certificate
and key in /root/.postgresql? Also, I don't see test_k2's ldd
output -- is it linked against /usr/local/pgsql/lib/libpq.so.3?
If so, what's the output of the following command?
ls -l /usr/local/pgsql/lib/libpq.so*
I'm wondering if you have PostgreSQL 7.4's libraries installed in
/usr/lib and 8.0.1's libraries in /usr/local/pgsql/lib. Is that
what you've done?
--
Michael Fuhr