Log entries for 3 situations - 2 successful and one failed attempt -
From non-chroot, shell user postgres
2014-01-05 10:11:58 IST [17008]: [2-1] user=postgres,db=postgres LOG: connection authorized: user=postgres database=postgres
2014-01-05 10:12:03 IST [17008]: [3-1] user=postgres,db=postgres LOG: disconnection: session time: 0:00:04.413 user=postgres database=postgres host=::1 port=47944
From chroot, shell user root, db user postgres
2014-01-05 10:12:18 IST [17021]: [1-1] user=[unknown],db=[unknown] LOG: connection received: host=::1 port=47945
2014-01-05 10:12:18 IST [17022]: [1-1] user=[unknown],db=[unknown] LOG: connection received: host=::1 port=47946
2014-01-05 10:12:18 IST [17022]: [2-1] user=postgres,db=postgres FATAL: password authentication failed for user "postgres"
2014-01-05 10:12:18 IST [17022]: [3-1] user=postgres,db=postgres DETAIL: Connection matched pg_hba.conf line 90: "host all all ::1/128 md5"
chroot, shell user postgres
2014-01-05 10:12:48 IST [17051]: [1-1] user=[unknown],db=[unknown] LOG: connection received: host=::1 port=47948
2014-01-05 10:12:51 IST [17052]: [1-1] user=[unknown],db=[unknown] LOG: connection received: host=::1 port=47949
2014-01-05 10:12:51 IST [17052]: [2-1] user=postgres,db=postgres LOG: connection authorized: user=postgres database=postgres
From non-chroot, shell user postgres
2014-01-05 10:11:58 IST [17008]: [2-1] user=postgres,db=postgres LOG: connection authorized: user=postgres database=postgres
2014-01-05 10:12:03 IST [17008]: [3-1] user=postgres,db=postgres LOG: disconnection: session time: 0:00:04.413 user=postgres database=postgres host=::1 port=47944
From chroot, shell user root, db user postgres
2014-01-05 10:12:18 IST [17021]: [1-1] user=[unknown],db=[unknown] LOG: connection received: host=::1 port=47945
2014-01-05 10:12:18 IST [17022]: [1-1] user=[unknown],db=[unknown] LOG: connection received: host=::1 port=47946
2014-01-05 10:12:18 IST [17022]: [2-1] user=postgres,db=postgres FATAL: password authentication failed for user "postgres"
2014-01-05 10:12:18 IST [17022]: [3-1] user=postgres,db=postgres DETAIL: Connection matched pg_hba.conf line 90: "host all all ::1/128 md5"
chroot, shell user postgres
2014-01-05 10:12:48 IST [17051]: [1-1] user=[unknown],db=[unknown] LOG: connection received: host=::1 port=47948
2014-01-05 10:12:51 IST [17052]: [1-1] user=[unknown],db=[unknown] LOG: connection received: host=::1 port=47949
2014-01-05 10:12:51 IST [17052]: [2-1] user=postgres,db=postgres LOG: connection authorized: user=postgres database=postgres
On Sat, Jan 4, 2014 at 8:43 PM, Adrian Klaver <adrian.klaver@xxxxxxxxx> wrote:
On 01/03/2014 09:29 PM, Jayadevan M wrote:So, if when you are in the chroot environment what user(s) fail to log in and are they the same user(s) as outside the chroot?
There is only one instance -
ps -eaf | grep bin/postgres | grep -v grep
postgres 3203 1 0 2013 ? 00:02:04 /usr/pgsql-9.3/bin/postgres
The basic checks I did -
Connectivity from other machines work (so server is accessible)
No .pgpass file in the system
Able to login as postgres and application users from the same system (as
long as it is not from the chroot environment). So this is not a
show-stopper- I am able to work and application is also working fine
Even in the chroot, as I mentioned, once I do a 'su - postgres', I am
able to login.
Well, per Toms suggestion you will need to look at the Postgres log file to see from the servers perspective.
Overall, it is just a minor inconvenience, but I would like to resolve
this. The no password supplied message comes back so fast, it is as if
it did not even attemp to connect.
Also, in case there is third party program involved it would not hurt to tail the system log during your connection attempts.
--
Adrian Klaver
adrian.klaver@xxxxxxxxx