Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f6d14-00033q-I4 for pgsql-general@arkaria.postgresql.org; Thu, 12 Apr 2018 14:15:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1f6d13-00082t-HS for pgsql-general@arkaria.postgresql.org; Thu, 12 Apr 2018 14:15:57 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f6d13-00082i-1e for pgsql-general@lists.postgresql.org; Thu, 12 Apr 2018 14:15:57 +0000 Received: from mail-it0-x22f.google.com ([2607:f8b0:4001:c0b::22f]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1f6d10-0001G1-Ay for pgsql-general@postgresql.org; Thu, 12 Apr 2018 14:15:55 +0000 Received: by mail-it0-x22f.google.com with SMTP id u62-v6so7209979ita.5 for ; Thu, 12 Apr 2018 07:15:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=BB8xD2hgxrobRGSjnMDVuGRrN3OvdyHJY0WCuGwl7g4=; b=bmq/Tj3lmbgRzi/3+PQX4vIiBIrdzoyOB3blOGm2uoouHr4ttDPWtyBtx0RpLQ0rLV C/rwAiTdhONZ4LdfjYrrYNRjNz6dYWGG2rBaHC+3fDR92nV6Hjb/XA7nkfJoPNAczE6d VPn15EGETveIReruZ0V7kqzAXwQK8C+asRY4GCUbTut9JQFJrPO+cxZ6i9lcHgxtHhQu xSxKl/VzmOpwG+YsjXHRMRn/4QssH29XZj5hIovbtCjivA7OKBxPHRMf/mCI8Xvas+NF t+b0/nqz0TTxLt4q/2YydiHMmmGs89pN1Pc/qrupAOrhLmb1GRRjQQjxQ/cHcIpbi2H2 3Z6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=BB8xD2hgxrobRGSjnMDVuGRrN3OvdyHJY0WCuGwl7g4=; b=OeeWKob24Fjz1oJmTO/oqA/zKtv3v5FPZw+30NbY0VL/XujsPPagLorv3aJNCgok+n oby3LWsgLJYkgX58P0v46IB+DK4Hfw/AwZV+p5oiwcRbu3epL/J0X2aOa2fp4pgL5C5z oTp0mi0a9br/mOTKPxDW//pjZVAzmIbd8+YnZ0tsrvsZ0ay4d1E/LOjDSyj8aPhw43lF N2GiXz0Ny3wBapRJmZFK04hkeKnJHLDiTafbuXyspGn7Uq4cpoujllSENvtfwH0hpXjf 6PTLGl2m+TVlglXl04R+6u/ttSvWJMVihmq+X+CwPgft0z8/i6eCVzMq76Vv5jNEyQR2 RDMw== X-Gm-Message-State: ALQs6tDCQWG2YMpc40kPZyaFsXNHrzAxjVl+LsxRx3HXIN/LGoMZypns oHJJCcMJU8YP2QNlB44XSapIhcsT X-Google-Smtp-Source: AIpwx4/iAHN0yUrBj+7fwtgxnKzuCZHNJk87pgCDrPK0cJlCgb+vU3uGfgkkGuRVKEGTvpABITvqTQ== X-Received: by 2002:a24:3401:: with SMTP id z1-v6mr1149676itz.104.1523542543277; Thu, 12 Apr 2018 07:15:43 -0700 (PDT) Received: from ?IPv6:2605:a601:2062:d00:7c8d:b85d:253a:ab93? ([2605:a601:2062:d00:7c8d:b85d:253a:ab93]) by smtp.gmail.com with ESMTPSA id v10sm1676974iod.31.2018.04.12.07.15.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Apr 2018 07:15:42 -0700 (PDT) From: armand pirvu Message-Id: <6E90358D-6986-4222-9059-374D7F205F58@gmail.com> Content-Type: multipart/alternative; boundary="Apple-Mail=_0D53D8B2-81FA-4062-B865-5F106EDC1076" Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: authentication failure Date: Thu, 12 Apr 2018 09:15:11 -0500 In-Reply-To: <0DAF9812-45BC-42F9-8C69-C3EDF6B5E66D@gmail.com> Cc: "pgsql-general@postgresql.org" To: Adrian Klaver References: <365D2700-44D4-4849-A434-E78BF6F526C3@gmail.com> <2496e0fb-bb23-ae29-b0d8-1b96456de56d@aklaver.com> <56528F6F-A2FF-4748-BA3B-15E57855F285@gmail.com> <0DAF9812-45BC-42F9-8C69-C3EDF6B5E66D@gmail.com> X-Mailer: Apple Mail (2.3273) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --Apple-Mail=_0D53D8B2-81FA-4062-B865-5F106EDC1076 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Apr 12, 2018, at 9:12 AM, armand pirvu = wrote: >=20 >=20 >> On Apr 12, 2018, at 9:08 AM, Adrian Klaver > wrote: >>=20 >> On 04/12/2018 06:59 AM, armand pirvu wrote: >>=20 >> Please reply to list also. >> Ccing list. >>> Yes and worked fine until two days ago >>> I use .pgpass >>=20 >> So can you connect from wherever the process is run to the server = manually? Something like: >>=20 >>=20 >> psql -d birstab -U csidba -h some_server >>=20 >>=20 >>> I will also check and see if there are not too many hands in the = cookie jar so to speak and things happen without being communicated >>>> On Apr 12, 2018, at 8:56 AM, Adrian Klaver = > wrote: >>>>=20 >>>> On 04/12/2018 06:51 AM, armand pirvu wrote: >>>>> Hi there >>>>> I have a process in place which runs several queries from one host = to another one >>>>> All of a sudden I started noticing authentication failures >>>>> Like below >>>>> .009 ms statement: COPY NACDS.tf_show_code_response_person FROM = STDIN with csv;",,,,,,,,,"psql" >>>>> 2018-04-12 00:10:48.765 = CDT,"csidba","birstdb",7553,"172.16.20.4:40330",5aceea2e.1d81,1,"UPDATE",2= 018-04-12 00:10:06 CDT,24/0,0,LOG,00000,"duration: 425 >>>>> 90.993 ms statement: UPDATE >>>>> csischema.tf_transaction_person >>>>> SET >>>>> is_deleted =3D 'TRUE', >>>>> birst_is_deleted =3D 'TRUE', >>>>> update_datetime =3D now()::timestamp(0) >>>>> WHERE >>>>> show_id =3D '984BIOWC18' AND >>>>> birst_is_deleted =3D 'FALSE' AND >>>>> person_transaction_id IN ( >>>>> SELECT a.person_transaction_id >>>>> FROM csischema.tf_transaction_person a >>>>> LEFT JOIN BIOWC.tf_transaction_person b >>>>> ON a.person_transaction_id=3Db.person_transaction_id >>>>> WHERE a.show_id =3D '984BIOWC18' AND = b.person_transaction_id IS NULL >>>>> ) >>>>> ;",,,,,,,,,"psql" >>>>> 2018-04-12 00:10:48.823 = CDT,"csidba","birstdb",7755,"172.16.20.4:40455",5aceea58.1e4b,1,"authentic= ation",2018-04-12 00:10:48 CDT,3/20320168,0,FATAL,28P0 >>>>> 1,"password authentication failed for user ""csidba""","Connection = matched pg_hba.conf line 84: ""host all all 0.0.0.0/0 md5""",,,,,,,,"" >>>>> 2018-04-12 00:10:48.841 = CDT,"csidba","birstdb",7756,"172.16.20.4:40456",5aceea58.1e4c,1,"authentic= ation",2018-04-12 00:10:48 CDT,3/20320169,0,FATAL,28P0 >>>>> 1,"password authentication failed for user ""csidba""","Connection = matched pg_hba.conf line 84: ""host all all 0.0.0.0/0 md5""",,,,,,,,"" >>>>> 2018-04-12 00:10:48.957 = CDT,"csidba","birstdb",7759,"172.16.20.4:40459",5aceea58.1e4f,1,"authentic= ation",2018-04-12 00:10:48 CDT,3/20320172,0,FATAL,28P0 >>>>> pg_hba.conf >>>>> # "local" is for Unix domain socket connections only >>>>> #local all all = peer >>>>> local all all = md5 >>>>> # IPv4 local connections: >>>>> #host all all 127.0.0.1/32 = ident >>>>> host all all 0.0.0.0/0 md5 >>>>> # IPv6 local connections: >>>>> host all all ::1/128 = ident >>>>> # Allow replication connections from localhost, by a user with the >>>>> # replication privilege. >>>>> #local replication postgres = peer >>>>> #host replication postgres 127.0.0.1/32 = ident >>>>> #host replication postgres ::1/128 = ident >>>>> local replication csidba md5 >>>>> host replication csidba 127.0.0.1/32 md5 >>>>> host replication csidba 0.0.0.0/0 md5 >>>>> local replication repuser md5 >>>>> host replication repuser 127.0.0.1/32 md5 >>>>> host replication repuser 0.0.0.0/0 md5 >>>>> local all repuser md5 >>>>> host all repuser 127.0.0.1/32 md5 >>>>> host all repuser 0.0.0.0/0 md5 >>>>> Did I run in somthing similar to a racong condition ? >>>>> Any ideas ? >>>>=20 >>>> Is the process using the correct password? >>>>=20 >>>>> Many thanks >>>>> =E2=80=94 Armand >>>>=20 >>>>=20 >>>> --=20 >>>> Adrian Klaver >>>> adrian.klaver@aklaver.com >>=20 >>=20 >> --=20 >> Adrian Klaver >> adrian.klaver@aklaver.com >=20 > Yes I can that=E2=80=99s what is really puzzling me >=20 > [armandp@devweb2004 ~]$ /usr/pgsql-9.5/bin/psql -d birstdb -U csidba = -h 172.16.26.4 > psql (9.5.12, server 9.5.8) > Type "help" for help. >=20 > birstdb=3D#=20 >=20 > It is almost like the authnetication stops working for whatever reason > I did check the .pgpass and all that and nothing chaged >=20 > Is there a possibility like say 70 processes try to authenticate in = the same time and postgres authentication gets a bit lost ? >=20 >=20 > Thank you >=20 >=20 Sorry for the double posting but could it be from=20 #authentication_timeout =3D 1min # 1s-600s So if the server gets a bit oveloaded this could play a role ? --Apple-Mail=_0D53D8B2-81FA-4062-B865-5F106EDC1076 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8
On Apr 12, 2018, at 9:12 AM, armand pirvu <armand.pirvu@gmail.com> wrote:


On Apr 12, 2018, at 9:08 AM, Adrian Klaver <adrian.klaver@aklaver.com> wrote:

On = 04/12/2018 06:59 AM, armand pirvu wrote:

Please reply to list also.
Ccing list.
Yes and worked fine = until two days ago
I use .pgpass

So can you connect from wherever = the process is run to the server manually? Something like:


psql -d birstab -U csidba -h = some_server


I will also check and see if there are not too = many hands in the cookie jar so to speak and things happen without being = communicated
On Apr = 12, 2018, at 8:56 AM, Adrian Klaver <adrian.klaver@aklaver.com> wrote:

On 04/12/2018 06:51 AM, armand pirvu wrote:
Hi there
I = have a process in place which runs several queries from one host to = another one
All of a sudden I started noticing = authentication failures
Like below
.009 ms =  statement: COPY  NACDS.tf_show_code_response_person FROM = STDIN with csv;",,,,,,,,,"psql"
2018-04-12 00:10:48.765 = CDT,"csidba","birstdb",7553,"172.16.20.4:40330",5aceea2e.1d81,1,"UPDATE",2= 018-04-12 00:10:06 CDT,24/0,0,LOG,00000,"duration: 425
90.993 ms  statement: UPDATE
=     csischema.tf_transaction_person
SET
    is_deleted =3D = 'TRUE',
    birst_is_deleted =3D = 'TRUE',
    update_datetime =3D = now()::timestamp(0)
WHERE
=     show_id =3D '984BIOWC18' AND
=     birst_is_deleted =3D 'FALSE' AND
=     person_transaction_id IN (
=         SELECT = a.person_transaction_id
=         FROM = csischema.tf_transaction_person a
=             &n= bsp;LEFT JOIN BIOWC.tf_transaction_person b
=             &n= bsp;ON a.person_transaction_id=3Db.person_transaction_id
=         WHERE a.show_id =3D = '984BIOWC18' AND b.person_transaction_id IS NULL
=     )
;",,,,,,,,,"psql"
2018-04-12 00:10:48.823 = CDT,"csidba","birstdb",7755,"172.16.20.4:40455",5aceea58.1e4b,1,"authentic= ation",2018-04-12 00:10:48 CDT,3/20320168,0,FATAL,28P0
1,"password authentication failed for user = ""csidba""","Connection matched pg_hba.conf line 84: ""host all all = 0.0.0.0/0 md5""",,,,,,,,""
2018-04-12 00:10:48.841 = CDT,"csidba","birstdb",7756,"172.16.20.4:40456",5aceea58.1e4c,1,"authentic= ation",2018-04-12 00:10:48 CDT,3/20320169,0,FATAL,28P0
1,"password authentication failed for user = ""csidba""","Connection matched pg_hba.conf line 84: ""host all all = 0.0.0.0/0 md5""",,,,,,,,""
2018-04-12 00:10:48.957 = CDT,"csidba","birstdb",7759,"172.16.20.4:40459",5aceea58.1e4f,1,"authentic= ation",2018-04-12 00:10:48 CDT,3/20320172,0,FATAL,28P0
pg_hba.conf
# "local" is for Unix domain socket = connections only
#local   all =             al= l =             &n= bsp;           &nbs= p;           peerlocal   all =             al= l =             &n= bsp;           &nbs= p;           md5# IPv4 local connections:
#host =    all =             al= l =             12= 7.0.0.1/32 =            identhost all all 0.0.0.0/0 md5
# IPv6 local = connections:
host    all =             al= l =             ::= 1/128 =             &n= bsp;   ident
# Allow replication = connections from localhost, by a user with the
# = replication privilege.
#local   replication =     postgres =             &n= bsp;           &nbs= p;      peer
#host =    replication     postgres =        127.0.0.1/32 =            ident#host    replication =     postgres =        ::1/128 =             &n= bsp;   ident
local  replication =  csidba  md5
host   replication =  csidba  127.0.0.1/32  md5
host =   replication  csidba  0.0.0.0/0 =     md5
local  replication =  repuser  md5
host   replication =  repuser  127.0.0.1/32  md5
host =   replication  repuser  0.0.0.0/0 =     md5
local  all =         repuser  md5
host   all =         repuser =  127.0.0.1/32  md5
host   all =         repuser  0.0.0.0/0 =     md5
Did I run in somthing similar = to a racong condition ?
Any ideas ?

Is the process using the correct = password?

Many thanks
=E2=80=94 Armand


--
Adrian Klaver
adrian.klaver@aklaver.com


-- =
Adrian Klaver
adrian.klaver@aklaver.com

Yes I can that=E2=80=99s what is really puzzling me

[armandp@devweb2004 ~]$ /usr/pgsql-9.5/bin/psql -d birstdb -U = csidba -h 172.16.26.4
psql (9.5.12, server = 9.5.8)
Type "help" for help.

birstdb=3D# 

It is almost like the = authnetication stops working for whatever reason
I = did check the .pgpass and all that and nothing chaged

Is there a possibility = like say 70 processes try to authenticate in the same time and postgres = authentication gets a bit lost ?


Thank you



Sorry for = the double posting but could it be from 

#authentication_timeout =3D 1min # = 1s-600s

So if the server gets a bit oveloaded this could play a role = ?




= --Apple-Mail=_0D53D8B2-81FA-4062-B865-5F106EDC1076--