dhiaayachi / temporal

Temporal service
https://docs.temporal.io
MIT License
0 stars 0 forks source link

Temporal auto setup does not work with Postgres 15 #436

Open dhiaayachi opened 2 months ago

dhiaayachi commented 2 months ago

Expected Behavior

I am installing Temporal via the Airbyte Helm chart (it relies on Temporal). After an upgrade to Postgres 15 (AWS RDS), Temporal stopped working. I've tested various configuration options, and could not get it to work. Once I pointed it at a Postgres 14 installation, it worked fine.

Actual Behavior

Temporal fails to validate the connection. In some of my attempts, it created the temporal and temporal_visibility databases, but still failed.

+ DB=postgresql
+ SKIP_SCHEMA_SETUP=false
+ KEYSPACE=temporal
+ VISIBILITY_KEYSPACE=temporal_visibility
+ CASSANDRA_SEEDS=
+ CASSANDRA_PORT=9042
+ CASSANDRA_USER=
+ CASSANDRA_PASSWORD=
+ CASSANDRA_TLS_ENABLED=
+ CASSANDRA_CERT=
+ CASSANDRA_CERT_KEY=
+ CASSANDRA_CA=
+ CASSANDRA_REPLICATION_FACTOR=1
+ DBNAME=temporal
+ VISIBILITY_DBNAME=temporal_visibility
+ DB_PORT=5432
+ MYSQL_SEEDS=
+ MYSQL_USER=
+ MYSQL_PWD=
+ MYSQL_TX_ISOLATION_COMPAT=false
+ POSTGRES_SEEDS=rds**************com
+ POSTGRES_USER=dbuser
+ POSTGRES_PWD=************
+ ENABLE_ES=false
+ ES_SCHEME=http
+ ES_SEEDS=
+ ES_PORT=9200
+ ES_USER=
+ ES_PWD=
+ ES_VERSION=v7
+ ES_VIS_INDEX=temporal_visibility_v1_dev
+ ES_SCHEMA_SETUP_TIMEOUT_IN_SECONDS=0
+ TEMPORAL_CLI_ADDRESS=10.12.87.28:7233
+ SKIP_DEFAULT_NAMESPACE_CREATION=false
+ DEFAULT_NAMESPACE=default
+ DEFAULT_NAMESPACE_RETENTION=1
+ SKIP_ADD_CUSTOM_SEARCH_ATTRIBUTES=false
+ '[' false '!=' true ']'
+ validate_db_env
+ '[' postgresql == mysql ']'
+ '[' postgresql == postgresql ']'
+ '[' -z rds.**************.com ']'
+ wait_for_db
+ '[' postgresql == mysql ']'
+ '[' postgresql == postgresql ']'
+ wait_for_postgres
+ nc -z rds.**************.com 5432
+ echo 'PostgreSQL started.'
+ setup_schema
+ '[' postgresql == mysql ']'
+ '[' postgresql == postgresql ']'
PostgreSQL started.
Setup PostgreSQL schema.
+ echo 'Setup PostgreSQL schema.'
+ setup_postgres_schema
+ SCHEMA_DIR=/etc/temporal/schema/postgresql/v96/temporal/versioned
+ '[' temporal '!=' dbuser ']'
+ temporal-sql-tool --plugin postgres --ep rds.**************.com -u dbuser -p 5432 create --db temporal
2023-03-06T17:25:23.143Z    ERROR    Unable to create SQL database.    {"error": "unable to connect to DB, tried default DB names: postgres,defaultdb, errors: [pq: no pg_hba.conf entry for host \"10.12.87.28\", user \"dbuser\", database \"postgres\", no encryption pq: no pg_hba.conf entry for host \"10.12.87.28\", user \"dbuser\", database \"defaultdb\", no encryption]", "logging-call-at": "handler.go:97"}
2023/03/06 17:25:23 Loading config; env=docker,zone=,configDir=config
2023/03/06 17:25:23 Loading config files=[config/docker.yaml]
{"level":"info","ts":"2023-03-06T17:25:23.175Z","msg":"Updated dynamic config","logging-call-at":"file_based_client.go:143"}
{"level":"info","ts":"2023-03-06T17:25:23.175Z","msg":"Starting server for services","value":["history","matching","frontend","worker"],"logging-call-at":"server.go:123"}
Unable to start server. Error: sql schema version compatibility check failed: pq: no pg_hba.conf entry for host "*******", user "dbuser", database "temporal", no encryption
Stream closed EOF for airbyte/airbyte-temporal-5dc4877cb9-hkpw4 (airbyte-temporal)

Steps to Reproduce the Problem

  1. Install Temporal with auto setup on Postgres 15 or
  2. Get Airbyte helm chart here: https://github.com/airbytehq/helm-charts
  3. change configurations to reflect on your databse credentials
  4. install the helm chart

Specifications