airflow-helm / charts

The User-Community Airflow Helm Chart is the standard way to deploy Apache Airflow on Kubernetes with Helm. Originally created in 2017, it has since helped thousands of companies create production-ready deployments of Airflow on Kubernetes.
https://github.com/airflow-helm/charts/tree/main/charts/airflow
Apache License 2.0
631 stars 473 forks source link

[bug] default postgresql in helm chart (FATAL: password authentication failed for user "postgres") #723

Closed seunggabi closed 1 year ago

seunggabi commented 1 year ago

Checks

Chart Version

8.6.1

Kubernetes Version

Client Version: version.Info{Major:"1", Minor:"26", GitVersion:"v1.26.3", GitCommit:"9e644106593f3f4aa98f8a84b23db5fa378900bd", GitTreeState:"clean", BuildDate:"2023-03-15T13:33:11Z", GoVersion:"go1.19.7", Compiler:"gc", Platform:"darwin/arm64"}

Helm Version

version.BuildInfo{Version:"v3.10.2", GitCommit:"50f003e5ee8704ec937a756c646870227d7c8b58", GitTreeState:"clean", GoVersion:"go1.19.3"}

Description

FATAL: password authentication failed for user "postgres"

How can I fix?

Relevant Logs

Liveness probe failed: psql: error: FATAL: password authentication failed for user "postgres" FATAL: password authentication failed for user "postgres"

Custom Helm Values

airflow:
  airflow:
    securityContext:
      fsGroup: 65534
    image:
      repository: apache/airflow
      tag: 2.4.3-python3.8
    executor: CeleryExecutor
    fernetKey: 7T512UXSSmBOkpWimFHIVb8jK6lfmSAvx4mO6Arehnc=
    webserverSecretKey: "THIS IS UNSAFE!"
    extraPipPackages:
      - awscli
      - apache-airflow
      - apache-airflow-providers-amazon==1.1.0
      - cached_property
    config:
      AIRFLOW__CORE__LOAD_EXAMPLES: false
      AIRFLOW__CORE__REMOTE_LOGGING: "True"
      AIRFLOW__CORE__REMOTE_BASE_LOG_FOLDER: "s3://bucket/airflow/logs"
      AIRFLOW__CORE__REMOTE_LOG_CONN_ID: "aws_default"
      AIRFLOW__LOGGING__REMOTE_LOGGING: "True"
      AIRFLOW__LOGGING__REMOTE_BASE_LOG_FOLDER: "s3://bucket/airflow/logs"
      AIRFLOW__LOGGING__REMOTE_LOG_CONN_ID: "aws_default"
      AIRFLOW__WEBSERVER__EXPOSE_CONFIG: false
      AIRFLOW__WEBSERVER__DEFAULT_UI_TIMEZONE: Asia/Seoul
      AIRFLOW__WEBSERVER__BASE_URL: https://airflow.com
  web:
    securityContext:
      fsGroup: 65534
    replicas: 1
    service:
      type: NodePort
  dags:
    gitSync:
      enabled: true
      repo: "git..."
      branch: main
      revision: HEAD
      syncWait: 60
  scheduler:
    securityContext:
      fsGroup: 65534
  workers:
    securityContext:
      fsGroup: 65534
thesuperzapper commented 1 year ago

@seunggabi can you give a little more context for the error?

Specifically, which pods are throwing the error, and can you provide the logs?

seunggabi commented 1 year ago

@thesuperzapper Please guide to me.. TT

postgresql logs

postgresql 05:22:20.39 
postgresql 05:22:20.39 Welcome to the Bitnami postgresql container
postgresql 05:22:20.39 Subscribe to project updates by watching https://github.com/bitnami/bitnami-docker-postgresql
postgresql 05:22:20.39 Submit issues and feature requests at https://github.com/bitnami/bitnami-docker-postgresql/issues
postgresql 05:22:20.40 Send us your feedback at containers@bitnami.com
postgresql 05:22:20.40 
postgresql 05:22:20.41 INFO  ==> ** Starting PostgreSQL setup **
postgresql 05:22:20.46 INFO  ==> Validating settings in POSTGRESQL_* env vars..
postgresql 05:22:20.46 INFO  ==> Loading custom pre-init scripts...
postgresql 05:22:20.46 INFO  ==> Initializing PostgreSQL database...
postgresql 05:22:20.48 INFO  ==> postgresql.conf file not detected. Generating it...
postgresql 05:22:20.49 INFO  ==> pg_hba.conf file not detected. Generating it...
postgresql 05:22:20.49 INFO  ==> Generating local authentication configuration
postgresql 05:22:20.49 INFO  ==> Deploying PostgreSQL with persisted data...
postgresql 05:22:20.50 INFO  ==> Configuring replication parameters
postgresql 05:22:20.52 INFO  ==> Configuring fsync
postgresql 05:22:20.53 INFO  ==> Loading custom scripts...
postgresql 05:22:20.53 INFO  ==> Enabling remote connections
postgresql 05:22:20.54 INFO  ==> Stopping PostgreSQL...
postgresql 05:22:20.54 INFO  ==> ** PostgreSQL setup finished! **

postgresql 05:22:20.59 INFO  ==> ** Starting PostgreSQL **
2023-04-13 05:22:20.613 GMT [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2023-04-13 05:22:20.613 GMT [1] LOG:  listening on IPv6 address "::", port 5432
2023-04-13 05:22:20.616 GMT [1] LOG:  listening on Unix socket "/tmp/.s.PGSQL.5432"
2023-04-13 05:22:20.627 GMT [172] LOG:  database system was shut down at 2023-04-13 05:22:11 GMT
2023-04-13 05:22:20.632 GMT [1] LOG:  database system is ready to accept connections
2023-04-13 05:22:34.043 GMT [186] FATAL:  password authentication failed for user "postgres"
2023-04-13 05:22:34.043 GMT [186] DETAIL:  Password does not match for user "postgres".
    Connection matched pg_hba.conf line 1: "host     all             all             0.0.0.0/0               md5"
seunggabi commented 1 year ago

pgbouncer.enabled: true

pgbouncer.svc.cluster.local" (172.20.195.137), port 6432 failed: FATAL: password authentication failed for user "postgres"
seunggabi commented 1 year ago

pgbouncer.enabled: false

postgresql.svc.cluster.local" (172.20.138.221), port 5432 failed: FATAL: password authentication failed for user "postgres"
(Background on this error at: https://sqlalche.me/e/14/e3q8)
seunggabi commented 1 year ago

k8s executor is successed. so I closed this issue.