Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tnhZP-000izY-Sk for pgsql-general@arkaria.postgresql.org; Thu, 27 Feb 2025 17:21:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tnhYR-000vnR-3J for pgsql-general@arkaria.postgresql.org; Thu, 27 Feb 2025 17:20:09 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tnhYQ-000vm0-5J for pgsql-general@lists.postgresql.org; Thu, 27 Feb 2025 17:20:09 +0000 Received: from fout-a3-smtp.messagingengine.com ([103.168.172.146]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tnhYK-0001FC-1A for pgsql-general@postgresql.org; Thu, 27 Feb 2025 17:20:08 +0000 Received: from phl-compute-10.internal (phl-compute-10.phl.internal [10.202.2.50]) by mailfout.phl.internal (Postfix) with ESMTP id 608E71383061; Thu, 27 Feb 2025 12:20:03 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-10.internal (MEProxy); Thu, 27 Feb 2025 12:20:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1740676803; x=1740763203; bh=zSohDOjkRRieHhfI+1/7yzfuhMkmVBAA4+AuTOaM7NY=; b= i2EObPwU+ro0I9YC0IXVctvcWZITPLdumrDV621ZVo/S87p23JnN+UirE+oHubjq c1N2dZtPBy4pAz9KDXjGDRfyow3MVIt8meduo9hKNnwLNi21MsE9WqBj4xFEs0rv nPHstCc2pm8PdO91mH+g4E1usQGaXpAuK5CWNvSAuWjTop8TtACIgvtTsPqs93sJ hgkPX0aAIgMD1Y4MiihQXJBd9L03APrQM4u7730k/0w45M4J72A3MKGytp3TGMii vXi+I6/HpiAGaZM1UwnRsjnXTnzN+u/mUC2yHUaqmvIlk/7VCsUTRWWVmgXsU9Fq iC4dqm0q45t1q8mnDYoUMg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; t=1740676803; x=1740763203; bh=z SohDOjkRRieHhfI+1/7yzfuhMkmVBAA4+AuTOaM7NY=; b=r5OTXxa26ZA8HNQdx sGe2Cnensr087x1cYPs4s9+q9/kvQcdSOaj4Yn5mDXEutFdRv+6fUQgPeilnb9s9 82eQ926zvE2pshuZdgndw9To7ReU3mbt6Sp6+ssizsRj9AsLnMC4RVL0y5SIC5Uy Wiq1CzmdJDr60kk+Z4vyOvunHuGjSEVO+rZuVWiB6k8hvhiKOVUQf/WKzFGIpwjv Jw5ZxAj6LCHNgiawJyWM9lUhCvZwDGkzkF+Zh0pSPNNBcTlibVZT4ko0qZ1YnAZt 91MjMrshhQKB7wJKQxtn/qnwu8sbGIF2MX6XUeG7WW8sLxsd49OvQW7PpuqHAzkk z9dBA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdekkedtgecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefkffggfgfuvfhfhfgjtgfgsehtkeertddtvdej necuhfhrohhmpeetughrihgrnhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrh esrghklhgrvhgvrhdrtghomheqnecuggftrfgrthhtvghrnhepffelgeeifefgveduhedt hfekuedtffejveegffegjeevtdehgfduieetfeehjeehnecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghk lhgrvhgvrhdrtghomhdpnhgspghrtghpthhtohepvddpmhhouggvpehsmhhtphhouhhtpd hrtghpthhtoheprghlvgigrghnuggvrhdrfhgrrhgsvghrsehgmhgrihhlrdgtohhmpdhr tghpthhtohepphhgshhqlhdqghgvnhgvrhgrlhesphhoshhtghhrvghsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 27 Feb 2025 12:20:02 -0500 (EST) Message-ID: <056ebaa8-94bb-461d-905c-4035eab9ceac@aklaver.com> Date: Thu, 27 Feb 2025 09:20:01 -0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: How to debug: password authentication failed for user To: Alexander Farber , pgsql-general References: Content-Language: en-US From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2/27/25 08:46, Alexander Farber wrote: > Good evening, > > My problem is that the local "trust" connection all work fine, but > remote connection from another pod in the AKS fails with: > > PGPASSWORD=timeshift_pass psql --host=timeshiftservice --port=5432 > --dbname=timeshift_database --username=timeshift_user --password > Password: (here I enter the "timeshift_pass" and press enter) Why set PGPASSWORD=timeshift_pass and use --password? The password should be picked up from the env variable. > psql: error: connection to server at "timeshiftservice" (10.0.120.194), > port 5432 failed: FATAL:  password authentication failed for user > "timeshift_user" > > timeshift_database=# SELECT rolname, rolpassword FROM pg_authid WHERE > rolname = 'timeshift_user'; >     rolname     | >         rolpassword > > ----------------+--------------------------------------------------------------------------------------------------------------------------------------- >  timeshift_user | > SCRAM-SHA-256$4096:kQisEuaKSpuJK4kmpqoq2w==$nNNngQozh11kpDeW43ETrVUe1eNvKuKWvU/nb1etxEI=:537RuSYGRHEVJL4PyUxfAYIXNdA8cOp+QGnvNjKWWvQ= > (1 row) What happens if, when logged in via local, you do: ALTER ROLE timeshift_user PASSWORD 'timeshift_pass'; and then try logging in via the remote connection? Seeing if maybe the script is passing in or mangling the password. > > Does anybody have an idea, what else could be wrong? > > What could I check to make the remote connection as timeshift_user work? > > Thank you > Alex -- Adrian Klaver adrian.klaver@aklaver.com