Arnt Gulbrandsen wrote:
This is all before the server starts.
Have a look at the postgres log file.
You've clearly found a bug, in that aox doesn't say why it won't start.
I've noticed that:
In the Postgres constructor, called from newHandle, the return code from
connect is ignored.
Wouldn't it be reasonable to log that?
I'm not sure I'm going to get on with debugging this code. I'd
forgotten how different this is from the day-job code. :-(
Anyway I found that (in a Linux VM under VBox 4.0.6, on Win7, with
PostgreSQL running on Windows with a dump from my mail db) with 'vmhost'
defined in /etc/hosts, that the resolve for the name doesn't seem to
work. Using the IP address does connect so I'll not worry too much about
that for the moment, but:
Connecting to PostgreSQL server at 192.168.56.1:5432 (backend 1, fd 3,
user aox) with rc=1
aox: PostgreSQL server message could not be interpreted. Message:
password authentication failed for user "aox" SQL state code: 28P01
Severity: fatal
aox: Connection terminated by the server. (on backend 1)
The 'Connecting' line is essentially the call to log(...) in the
Connection::connect, but reformed to write to cout for convenience. (I'm
not sure why the 'log(...)' for that doesn't print anything - the error
message for the authentication fail seems similar).
If I try to connect as aox to archiveopteryx using psql (which is
version 8.4.7, fwiw) and I copy the configured password to psql when it
asks, then the connection is made successfully - so I'm inclined to
think its a protocol issue rather than a bad password. The same
configuration works OK with aox 2, which is odd, and if I print the
password in Postgres::authenticate it does seem to have picked it up
correctly from the config.
No idea whether the behaviour is the same on my real email server, but
this is definitely odd.
I take it others have got it running on 9.0.x?
James