Re: How to debug: password authentication failed for user

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Alexander Farber <alexander(dot)farber(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: How to debug: password authentication failed for user
Date: 2025-02-27 18:21:04
Message-ID: d9cb5aab-417d-40b3-80f1-6c26acc7c839@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 2/27/25 10:14, Alexander Farber wrote:
> That seems to be the reason, thank you Adrian.
>
> At first connecting from the other pod in the AKS cluster does not work:
>
> $ PGPASSWORD=timeshift_pass psql --host=timeshiftservice --port=5432
> --dbname=timeshift_database --username=timeshift_user
> psql: error: connection to server at "timeshiftservice" (10.0.120.194),
> port 5432 failed: FATAL:  password authentication failed for user "t
> imeshift_user"
>
> But once I connect to my PostgreSQL pod (or is it called "container"? I
> am always confused by that) and run locally
>
> $ psql -U postgres
> psql (17.4)
> Type "help" for help.
>
> timeshift_database=# ALTER ROLE timeshift_user PASSWORD 'timeshift_pass';
> ALTER ROLE
>
> Then the connection from the other pod works immediately

My guess it has to do with:

-c 'ALTER USER timeshift_user PASSWORD '"'"'timeshift_pass'"'"';'

I am still trying to work out what that quoting is doing?

>
>
>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2025-02-27 18:32:38 Re: How to debug: password authentication failed for user
Previous Message Alexander Farber 2025-02-27 18:14:25 Re: How to debug: password authentication failed for user