0

I have deployed the airflow Version: "2.9.3" in kind cluster using Airflow official latest helm chart.

I have configured PostgreSQL and Pgbouncer both to use md5 password encryption

pgbouncer-custom-config

[databases]
airflow-db = host=airflow-postgresql.airflow dbname=airflow-db port=5432 pool_size=10

[pgbouncer] pool_mode = transaction listen_port = 6543 listen_addr = * auth_type = plain auth_file = /etc/pgbouncer/users.txt stats_users = airflow ignore_startup_parameters = extra_float_digits max_client_conn = 100 verbose = 5 log_disconnections = 0 log_connections = 0

server_tls_sslmode = disable server_tls_ciphers = normal

users.txt

"airflow" "<md5-hash-password>"
"postgres" "<md5-hash-password>"

postgresql auth method

PS C:\Users\45407106\Documents\repos\airflow\helm> kubectl.exe -n airflow exec -it pod/airflow-postgresql-0 -- psql -U airflow -d airflow-db -h 10.96.193.92
Password for user airflow:
psql (16.4)
Type "help" for help.

airflow-db=> show password_encryption; password_encryption


md5 (1 row)

pgbouncer logs

2024-11-19 07:26:57.452 UTC [1] NOISE S-0x7ff930031560: airflow-db/airflow@10.96.193.92:5432 read pkt='R', len=24
2024-11-19 07:26:57.452 UTC [1] DEBUG S-0x7ff930031560: airflow-db/airflow@10.96.193.92:5432 calling login_answer
2024-11-19 07:26:57.452 UTC [1] DEBUG S-0x7ff930031560: airflow-db/airflow@10.96.193.92:5432 S: req SASL
2024-11-19 07:26:57.452 UTC [1] DEBUG S-0x7ff930031560: airflow-db/airflow@10.96.193.92:5432 S: SASL advertised mechanism: SCRAM-SHA-256
2024-11-19 07:26:57.452 UTC [1] ERROR S-0x7ff930031560: airflow-db/airflow@10.96.193.92:5432 cannot do SCRAM authentication: wrong password type
2024-11-19 07:26:57.452 UTC [1] WARNING C-0x7ff93009b220: airflow-db/airflow@10.244.0.149:58102 pooler error: server login failed: wrong password type
2024-11-19 07:26:57.452 UTC [1] NOISE safe_send(10, 62) = 62
2024-11-19 07:26:57.452 UTC [1] NOISE safe_close(10) = 0

I'm unable to figure out the issue, why it's giving error SASL advertised mechanism: SCRAM-SHA-256 when Postgresql configured to use md5

0 Answers0