Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fL7FJ-0003rf-T2 for pgsql-general@arkaria.postgresql.org; Tue, 22 May 2018 13:22:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fL7FH-00051K-Or for pgsql-general@arkaria.postgresql.org; Tue, 22 May 2018 13:22:31 +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 1fL7FF-00050k-S0 for pgsql-general@lists.postgresql.org; Tue, 22 May 2018 13:22:31 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fL7FC-00028G-3m for pgsql-general@postgresql.org; Tue, 22 May 2018 13:22:28 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 79E6721A02; Tue, 22 May 2018 09:22:24 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Tue, 22 May 2018 09:22:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; bh=r/rJRCCBoy/2JBwEjOOl+sMx3URLr dEisouolHdqNgM=; b=J16yG+o90MTJt8HkRHTn0aQuIaO/q1r6Kit5nZsNCh40a ha8rsXChuani8oa6GGnNoyrepUtA/e6u9Egvy380q1HArViSHqYSk90DMdRVMxNb +kI8dWZsEcI2juH1aUlkM3wgYbWMtQzQghVn+z/HbpE/Zt8RL+24GM7oMFph6kHl dQPTwocnOIDrWPYJSipL+E1JuQeX8laqwZHTxj3nKl7Sqrk0LytcZOzP6Jc4xSv+ +GnnI0TjLweUI5Ehks+2qXMYP0QezavpAbPGDL3PZobA9EzoVtpaZO7TPjuWM+wg lAXUi/nEOZG+2FOtAipJLuzoDcb69zB8U5YktQALA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=r/rJRC CBoy/2JBwEjOOl+sMx3URLrdEisouolHdqNgM=; b=kPDvSUnnZ22ey2GhTaNby/ RjP6/DkRajAcPC1MKoOHW2klpnJbUa33yakIxxy8C+ucBtAM8jLGcfNmzOb2v3Y5 E1fnePlKXQH9VQX1v8bXUVZJmlahRcGGelFz5GQEYPJxHXIEtsTwe5UdMP2P87w4 FcCqGzubnHu/Pq8gVzj9d0RliFrB5g0lKM4QApTZIHWo56PyGS+Gkr9rdZXbxTQh Qec2G+QYI23cKwHx5tWTsiuAf5LapOoDknKPAaVDTh5mOVHiJSJBhZU1XuWeY5oU lQEPm4abe7xpmUz2hG9s7r5qMRgrI+H8Yl5hNqxdRYQ59unWCXooa6mOVFzyS7fg == X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Sender: Received: from [192.168.1.2] (unknown [71.212.135.74]) by mail.messagingengine.com (Postfix) with ESMTPA id 9C796103A3; Tue, 22 May 2018 09:22:23 -0400 (EDT) Subject: Re: source of connection fails at pg startup? To: Stuart McGraw , pgsql-general@postgresql.org References: <86216924-a5c8-80c1-52d6-0bc4a104de81@mtneva.com> From: Adrian Klaver Message-ID: <18a6baff-4ab2-6da4-350a-96579b47e5a6@aklaver.com> Date: Tue, 22 May 2018 06:22:22 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <86216924-a5c8-80c1-52d6-0bc4a104de81@mtneva.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 05/21/2018 10:48 PM, Stuart McGraw wrote: > When I start my postgresql server I get 11 messages reporting that > "password > authentication failed for user 'postgres'" spaced about ~.5sec apart. > I increased the logging level to INFO, and added the application name to > the > message format (after the pid) which resulted in: > >   2018-05-21 23:04:44.395 MDT [20232][[unknown]] [unknown]@[unknown] > LOG:  connection received: host=[local] >   2018-05-21 23:04:44.395 MDT [20232][[unknown]] postgres@postgres > FATAL:  password authentication failed for user "postgres" >   2018-05-21 23:04:44.395 MDT [20232][[unknown]] postgres@postgres > DETAIL:  Password does not match for user "postgres". >     Connection matched pg_hba.conf line 90: "local   all   all   md5" > > This is on a Ububuntu-18.04 machine with postgresql-10.3 from Ubuntu. > As distributed > the pg_hba.conf line mentioned used "peer" authentication method, I have > changed to > "md5".  When I change back to "peer" the error messages go away.  The > processes are > too short-lived for me to catch with ps.  Successful connect message > example: > >   2018-05-21 23:25:13.577 MDT [21080][[unknown]] [unknown]@[unknown] > LOG:  connection received: host=[local] >   2018-05-21 23:25:13.578 MDT [21080][[unknown]] postgres@postgres > LOG:  connection authorized: user=postgres database=postgres >   2018-05-21 23:25:13.579 MDT [21080][psql] postgres@postgres LOG: > disconnection: session time: 0:00:00.002 user=postgres database=postgres > host=[local] > > My question is, how can I find out where the connections are coming from > so I can > modify them to provide passwords (so I can go back to "md5")?  Are there From the error messages it looks like your connections are already supplying passwords. I am guessing that the issue is that you have not created a password for the database user postgres. See the below: https://help.ubuntu.com/community/PostgreSQL Basic Server Setup for how to do that. If you have set up a password then the connections are using the wrong one. For catching the connections uncomment and set to on: log_connections log_disconnections in postgresql.conf. You might also try something like: watch -n 0.5 'ps aux|grep post' to see if you catch the connections from the system end. > startup- > time connections made by postgresql itself or is this likely from some > Ubuntu- > specific configuration? > > Thanks. > > -- Adrian Klaver adrian.klaver@aklaver.com