Re: error message "psql: expected authentication request from server, but received " when using psql to connect remote database

Lists: pgsql-bugs
From: "TIAN Justin" <yongjuntian(at)alcatel-lucent(dot)com>
To: <pgsql-bugs(at)postgresql(dot)org>
Subject: error message "psql: expected authentication request from server, but received " when using psql to connect remote database
Date: 2008-05-21 11:36:54
Message-ID: 02AD22EBEBC00940BBB63FEB6AB89BE3207798@CNSHGSMBS04.ad4.ad.alcatel.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

Hi,

I met an error, when psql client version is 8.1.4, I use it to connect
to remote database or local database, such as "psql -U name -p <port> -d
<database> -h <ip>", it will prompt error message "psql: expected
authentication request from server, but received ", but if the client
version is 8.0.3, there is no problem, I don't know why, does it the
configuration problem?

Thanks

Justin


From: "Heikki Linnakangas" <heikki(at)enterprisedb(dot)com>
To: "TIAN Justin" <yongjuntian(at)alcatel-lucent(dot)com>
Cc: <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: error message "psql: expected authentication request from server, but received " when using psql to connect remote database
Date: 2008-05-21 12:14:26
Message-ID: 48341222.8020307@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

TIAN Justin wrote:
> I met an error, when psql client version is 8.1.4, I use it to connect
> to remote database or local database, such as "psql -U name -p <port> -d
> <database> -h <ip>", it will prompt error message "psql: expected
> authentication request from server, but received ", but if the client
> version is 8.0.3, there is no problem, I don't know why, does it the
> configuration problem?

Please post the exact output you're getting in both cases.

What version is the server?

You should upgrade to the latest minor version, which is 8.1.11 for the
8.1 series, and 8.0.15 for the 8.0 series

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com


From: "TIAN Justin" <yongjuntian(at)alcatel-lucent(dot)com>
To: "Heikki Linnakangas" <heikki(at)enterprisedb(dot)com>
Cc: <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: error message "psql: expected authentication request from server, but received " when using psql to connect remote database
Date: 2008-05-22 02:15:19
Message-ID: 02AD22EBEBC00940BBB63FEB6AB89BE320784F@CNSHGSMBS04.ad4.ad.alcatel.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

Heikki Linnakangas,

Thanks for your quick response; the server we used is 8.1.4,
The error when using client 8.1.4,
> psql -U or -p 2222 -d testdb -h localhost
Output:
psql: expected authentication request from server, but received

when used 8.0.3, no problem,
> psql -U or -p 2222 -d testdb -h localhost
Output:
Password:
Then enter password, it can log in and do all operation.

Thanks,
Justin
-----Original Message-----
From: Heikki Linnakangas [mailto:heikki(at)enterprisedb(dot)com]
Sent: Wednesday, May 21, 2008 8:14 PM
To: TIAN Justin
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: [BUGS] error message "psql: expected authentication request
from server, but received " when using psql to connect remote database

TIAN Justin wrote:
> I met an error, when psql client version is 8.1.4, I use it to connect
> to remote database or local database, such as "psql -U name -p <port>
-d
> <database> -h <ip>", it will prompt error message "psql: expected
> authentication request from server, but received ", but if the client
> version is 8.0.3, there is no problem, I don't know why, does it the
> configuration problem?

Please post the exact output you're getting in both cases.

What version is the server?

You should upgrade to the latest minor version, which is 8.1.11 for the
8.1 series, and 8.0.15 for the 8.0 series

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "TIAN Justin" <yongjuntian(at)alcatel-lucent(dot)com>
Cc: "Heikki Linnakangas" <heikki(at)enterprisedb(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: error message "psql: expected authentication request from server, but received " when using psql to connect remote database
Date: 2008-05-22 13:43:23
Message-ID: 29938.1211463803@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

"TIAN Justin" <yongjuntian(at)alcatel-lucent(dot)com> writes:
> Thanks for your quick response; the server we used is 8.1.4,
> The error when using client 8.1.4,
>> psql -U or -p 2222 -d testdb -h localhost
> Output:
> psql: expected authentication request from server, but received

What is in the server's pg_hba.conf file? I'm particularly wondering
what auth method is being selected ...

regards, tom lane


From: "TIAN Justin" <yongjuntian(at)alcatel-lucent(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Heikki Linnakangas" <heikki(at)enterprisedb(dot)com>, <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: error message "psql: expected authentication request from server, but received " when using psql to connect remote database
Date: 2008-05-23 02:22:38
Message-ID: 02AD22EBEBC00940BBB63FEB6AB89BE3207AA9@CNSHGSMBS04.ad4.ad.alcatel.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

Tom Lane,

Thanks for your response,
Actually, we don't directly use postgre server,we open TCP connection to
support postgre wire protocol, so psql client can connect to our
application,
I found the problem is in the StartupMessage, when psql client version
is 8.1.4, the major and minor version in StartupMessage is 1234 and
5679, not 3 and 0, that is the problem, I want to know whether it is the
bug of 8.1.4, or I can do some configuration?

Thanks again for your answer

Thanks,
Justin

-----Original Message-----
From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
Sent: Thursday, May 22, 2008 9:43 PM
To: TIAN Justin
Cc: Heikki Linnakangas; pgsql-bugs(at)postgresql(dot)org
Subject: Re: [BUGS] error message "psql: expected authentication request
from server, but received " when using psql to connect remote database

"TIAN Justin" <yongjuntian(at)alcatel-lucent(dot)com> writes:
> Thanks for your quick response; the server we used is 8.1.4,
> The error when using client 8.1.4,
>> psql -U or -p 2222 -d testdb -h localhost
> Output:
> psql: expected authentication request from server, but received

What is in the server's pg_hba.conf file? I'm particularly wondering
what auth method is being selected ...

regards, tom lane


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "TIAN Justin" <yongjuntian(at)alcatel-lucent(dot)com>
Cc: "Heikki Linnakangas" <heikki(at)enterprisedb(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: error message "psql: expected authentication request from server, but received " when using psql to connect remote database
Date: 2008-05-25 22:53:56
Message-ID: 4416.1211756036@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

"TIAN Justin" <yongjuntian(at)alcatel-lucent(dot)com> writes:
> Actually, we don't directly use postgre server,we open TCP connection to
> support postgre wire protocol, so psql client can connect to our
> application,
> I found the problem is in the StartupMessage, when psql client version
> is 8.1.4, the major and minor version in StartupMessage is 1234 and
> 5679, not 3 and 0, that is the problem, I want to know whether it is the
> bug of 8.1.4, or I can do some configuration?

Sounds like you need to fix your "support of the postgres wire
protocol" --- in particular you'd better read up on query cancel,
and it would appear you are unable to send a proper error response
either.

regards, tom lane


From: "TIAN Justin" <yongjuntian(at)alcatel-lucent(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Heikki Linnakangas" <heikki(at)enterprisedb(dot)com>, <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: error message "psql: expected authentication request from server, but received " when using psql to connect remote database
Date: 2008-05-26 02:11:00
Message-ID: 02AD22EBEBC00940BBB63FEB6AB89BE3207CEB@CNSHGSMBS04.ad4.ad.alcatel.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

Tom Lane,

Sorry, I still can not understand, what does the max/min version number
in startup message, why it is different between different psql version?

Thanks,
Justin

-----Original Message-----
From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
Sent: Monday, May 26, 2008 6:54 AM
To: TIAN Justin
Cc: Heikki Linnakangas; pgsql-bugs(at)postgresql(dot)org
Subject: Re: [BUGS] error message "psql: expected authentication request
from server, but received " when using psql to connect remote database

"TIAN Justin" <yongjuntian(at)alcatel-lucent(dot)com> writes:
> Actually, we don't directly use postgre server,we open TCP connection
to
> support postgre wire protocol, so psql client can connect to our
> application,
> I found the problem is in the StartupMessage, when psql client version
> is 8.1.4, the major and minor version in StartupMessage is 1234 and
> 5679, not 3 and 0, that is the problem, I want to know whether it is
the
> bug of 8.1.4, or I can do some configuration?

Sounds like you need to fix your "support of the postgres wire
protocol" --- in particular you'd better read up on query cancel,
and it would appear you are unable to send a proper error response
either.

regards, tom lane