Re: [HACKERS] "expected authentication request from server, but

2005-09-26 Thread Michal Jeczalik

On Mon, 26 Sep 2005, Martijn van Oosterhout wrote:


On Mon, Sep 26, 2005 at 09:59:53AM +0200, Micha? J?czalik wrote:

Connection with psql works OK. Connecting from different (older) hosts
with DBI/PHP works perfect as well. Something must have changed in recent
versions of libpq and now it doesn't work. I looked into source code and
found that the server's message at the very start of conversation appears
to be something else than the libpq expects. But how to fix it?! Has the
protocol change or what?


Umm, I think the protocol version is up to 3 or 4 now. I think libpq
supports all the way back to 7.0, I don't know if anyone tests earlier
than that.

If you really need this to work, I suggest pulling the libpq from that
release (CVS or tarball) or slightly later and installing that on the
new machines.


Heh, that's what I'm currently doing, but it's not so easy to compile 6.4 
on a new system. configure states that the compiler cannot create 
executables, but I ripped this check out of it. Anyway, something goes 
wrong while generating the Makefile:


sed: file conftest.s1 line 33: unterminated `s' command
creating backend/catalog/genbki.sh
sed: file conftest.s1 line 33: unterminated `s' command
creating backend/utils/Gen_fmgrtab.sh
sed: file conftest.s1 line 33: unterminated `s' command
creating bin/pg_dump/Makefile
sed: file conftest.s1 line 33: unterminated `s' command
creating bin/pg_version/Makefile
sed: file conftest.s1 line 33: unterminated `s' command

:(
--
Samotnik Michał Jęczalik, +48.695.64.75.14
www.zagle.org.pl   - rejsy morskie


---(end of broadcast)---
TIP 4: Have you searched our list archives?

  http://archives.postgresql.org


Re: [HACKERS] "expected authentication request from server, but

2005-09-26 Thread Michal Jeczalik

On Mon, 26 Sep 2005, Tom Lane wrote:


=?iso-8859-2?Q?Micha=B3_J=EAczalik?= <[EMAIL PROTECTED]> writes:

I have a very old postgres 6.4 installation. I'm trying to connect to it
from a fresh, up-to-date Debian-host, but I'm constantly getting (from DBI
and PHP as well) this error message:



# ./update_dns.pl
DBI connect('dbname=dns;host=sql;authtype=password','dns',...) failed:
expected authentication request from server, but received U
  at ./update_dns.pl line 237


I went back and built the 6.4 branch just to confirm that current libpq
and psql would still talk to a 6.4 server.  They do (modulo most of
psql's \d commands not working).  So there's something more here than a
simple version mismatch.  Is it possible that DBI is using some private
all-Perl client library rather than libpq to talk to the server?


Quite possible. I managed to compile 7.4 and that error message 
disappeared. Anyway, perl dumped core at the very start of the connection. 
;) I downgraded DBD::Pg to 1.22 and... it worked! I did not try to upgrade 
libpq back to 8.x, but... PHP didn't worked as well with recent version of 
libs... After downgrading to 7.4 it worked fine. So there must be 
something about libpq anyway.


Regards,
--
Samotnik Michał Jęczalik, +48.695.64.75.14
www.zagle.org.pl   - rejsy morskie


---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster


Re: [HACKERS] "expected authentication request from server, but

2005-09-26 Thread Michal Jeczalik

On Mon, 26 Sep 2005, Michael Paesold wrote:


to be something else than the libpq expects. But how to fix it?! Has the
protocol change or what?


Umm, I think the protocol version is up to 3 or 4 now. I think libpq
supports all the way back to 7.0, I don't know if anyone tests earlier
than that.

If you really need this to work, I suggest pulling the libpq from that
release (CVS or tarball) or slightly later and installing that on the
new machines.


Heh, that's what I'm currently doing, but it's not so easy to compile 6.4 
on a new system. configure states that the compiler cannot create 
executables, but I ripped this check out of it. Anyway, something goes 
wrong while generating the Makefile:


Try to compile 7.0 or 7.1, those versions will probably still support the 6.4 
wire protocol. I am sure someone with more historical knowledge (or reading 
the release notes back to 6.4) can exactly tell you the latest version 
compatible with 6.4.


OK. It worked with 7.4 + DBD not newer than 1.22 - more recent versions 
simply make perl to dump core while connecting to postgres. ;)

--
Samotnik Michał Jęczalik, +48.695.64.75.14
www.zagle.org.pl   - rejsy morskie


---(end of broadcast)---
TIP 4: Have you searched our list archives?

  http://archives.postgresql.org