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 1f6cyO-0002qp-3B for pgsql-general@arkaria.postgresql.org; Thu, 12 Apr 2018 14:13:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1f6cyM-0002x6-Rp for pgsql-general@arkaria.postgresql.org; Thu, 12 Apr 2018 14:13:10 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f6cyM-0002wv-Gp for pgsql-general@lists.postgresql.org; Thu, 12 Apr 2018 14:13:10 +0000 Received: from mail-io0-x234.google.com ([2607:f8b0:4001:c06::234]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1f6cyJ-0001fy-0e for pgsql-general@postgresql.org; Thu, 12 Apr 2018 14:13:10 +0000 Received: by mail-io0-x234.google.com with SMTP id d5so6466052iob.9 for ; Thu, 12 Apr 2018 07:13:05 -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=D4lM+eicABmpKetE84WvYRvMk/FscaKw2sGtaQLvQPg=; b=FsZXPDTMjHaSDPagSpA+1zMfGdPRPn5GEZ2+on2qPfLBGANetlwA/VJNQuFV4NiHU4 ShoGQlCNfn253QvLqsKncVXeC0RD4Ui/MUqwYxAiA39jgFNjdB84mabYJw5UdgvJn+sO e37Mr9xdxuvMFl8b1SnumooVX+We8dW9E4oX9/L/DPpseugP9QG4wnq7G7COniDz0LLL Wi5+A5K3RHWjCjEfnwiJye1WZj6HDt7ajPCV+tS0Rwgu3eQAPvHkyk64OUvK0mSjlGSz nFWaYJ3JuqC+wIaStUB6qheYnGUjVsAA8Ixm3aoRcyhs1u2qaw2hLE9/FLq5LwQwk99F ONDg== 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=D4lM+eicABmpKetE84WvYRvMk/FscaKw2sGtaQLvQPg=; b=bO6ZOlVZPShCWnCXLXgAFNtVtp+qWzBchU8Z/p0J6NmOpZD4qFRjYkJ3NTeG8FRRlx FHN8NL4Tw5zKZONtz4mh9UKgo9OPlUQlSlDm1WDeXceK0xwMx6SMebAN3rwfjIDa5HCY /2EhhMidQXYDomjz5ynP5S1uvjghS3xGl+RZzMZBe4kcNO4RlIoijmC9oMtwjYW94eeG T2Sz0daL8SLb7eD+2vEQ0eHgE9iYEGWDk/zfhQyouWdnhKQ5lyHSegII44ikeHNqQOdP hJGYOpSV7g2J8Bj3dzT6oQU/goSKyEOKhnLuWV5ApqjBehzGdyoDR+ZtQeQ2uq4OdqWy EmjQ== X-Gm-Message-State: ALQs6tByQOS/9wpHeKddF7neb0Y1l9Zgsfxj3ERaD+02vgZ2hHC4EB5y oqlyzU9tU3H+K1TI9XuJREQ= X-Google-Smtp-Source: AIpwx49ndD5g7EpUbHDAiYHIotzk6QfNMMyv7r8LV1t1ocMhd5eWdGO7ScHhXPZa1khK/42x1I3UjA== X-Received: by 10.107.2.7 with SMTP id 7mr9326982ioc.187.1523542384049; Thu, 12 Apr 2018 07:13:04 -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 e65sm740422iod.34.2018.04.12.07.13.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Apr 2018 07:13:03 -0700 (PDT) From: armand pirvu Message-Id: <0DAF9812-45BC-42F9-8C69-C3EDF6B5E66D@gmail.com> Content-Type: multipart/alternative; boundary="Apple-Mail=_9AF89AD4-C500-4CF3-A4E7-95DF1DA3D5F1" Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: authentication failure Date: Thu, 12 Apr 2018 09:12:32 -0500 In-Reply-To: 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> X-Mailer: Apple Mail (2.3273) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --Apple-Mail=_9AF89AD4-C500-4CF3-A4E7-95DF1DA3D5F1 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > 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 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#=20 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 --Apple-Mail=_9AF89AD4-C500-4CF3-A4E7-95DF1DA3D5F1 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8
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


= --Apple-Mail=_9AF89AD4-C500-4CF3-A4E7-95DF1DA3D5F1--