finos / waltz

Enterprise Information Service
https://waltz.finos.org
Apache License 2.0
182 stars 129 forks source link

Liquibase: error while connecting to postgresql: FATAL: invalid value for parameter "TimeZone": "Etc/UTC" #6645

Open claudiubelu opened 1 year ago

claudiubelu commented 1 year ago

Description

An error occurs when trying to run the latest Waltz with a PostgreSQL 14.7: Unexpected error running Liquibase: Connection could not be created to jdbc:postgresql://postgresql-k8s-primary.test-charm-ovos.svc.cluster.local:5432/waltz with driver org.postgresql.Driver. FATAL: invalid value for parameter "TimeZone": "Etc/UTC"

Full logs:

2023-06-19T06:55:34.848Z [waltz] >>> Update DB
2023-06-19T06:55:35.017Z [waltz] >>> Database is ready.
2023-06-19T06:55:36.801Z [waltz] ####################################################
2023-06-19T06:55:36.801Z [waltz] ##   _     _             _ _                      ##
2023-06-19T06:55:36.801Z [waltz] ##  | |   (_)           (_) |                     ##
2023-06-19T06:55:36.801Z [waltz] ##  | |    _  __ _ _   _ _| |__   __ _ ___  ___   ##
2023-06-19T06:55:36.801Z [waltz] ##  | |   | |/ _` | | | | | '_ \ / _` / __|/ _ \  ##
2023-06-19T06:55:36.801Z [waltz] ##  | |___| | (_| | |_| | | |_) | (_| \__ \  __/  ##
2023-06-19T06:55:36.801Z [waltz] ##  \_____/_|\__, |\__,_|_|_.__/ \__,_|___/\___|  ##
2023-06-19T06:55:36.801Z [waltz] ##              | |                               ##
2023-06-19T06:55:36.801Z [waltz] ##              |_|                               ##
2023-06-19T06:55:36.801Z [waltz] ##                                                ##
2023-06-19T06:55:36.801Z [waltz] ##  Get documentation at docs.liquibase.com       ##
2023-06-19T06:55:36.801Z [waltz] ##  Get certified courses at learn.liquibase.com  ##
2023-06-19T06:55:36.801Z [waltz] ##  Free schema change activity reports at        ##
2023-06-19T06:55:36.801Z [waltz] ##      https://hub.liquibase.com                 ##
2023-06-19T06:55:36.801Z [waltz] ##                                                ##
2023-06-19T06:55:36.801Z [waltz] ####################################################
2023-06-19T06:55:36.801Z [waltz] Starting Liquibase at 06:55:36 (version 4.5.0 #52 built at 2021-09-27 16:19+0000)
2023-06-19T06:55:36.805Z [waltz] Liquibase Version: 4.5.0
2023-06-19T06:55:36.805Z [waltz] Liquibase Community 4.5.0 by Datical
2023-06-19T06:55:37.228Z [waltz] Unexpected error running Liquibase: Connection could not be created to jdbc:postgresql://postgresql-k8s-primary.test-charm-ovos.svc.cluster.local:5432/waltz with driver org.postgresql.Driver.  FATAL: invalid value for parameter "TimeZone": "Etc/UTC"
2023-06-19T06:55:37.228Z [waltz]
2023-06-19T06:55:37.229Z [waltz] For more information, please use the --log-level flag
2023-06-19T06:55:37.292Z [waltz] >>> Database failed to update.
2023-06-19T06:55:37.293Z [pebble] Service "waltz" stopped unexpectedly with code 1

Waltz Version

ghcr.io/finos/waltz:latest

Steps to Reproduce

A kubernetes environment with a Juju controller bootstrapped. Microk8s is sufficient to observe this issue. This environment can easily be replicated by following the following guide (except the Charmcraft section): https://juju.is/docs/sdk/dev-setup

After obtaining a Kubernetes cluster with a Juju controller bootstrapped, run the following:

juju add-model waltz-model
juju deploy postgresql-k8s --trust --channel 14/stable
juju deploy finos-waltz-k8s --channel edge
juju relate finos-waltz-k8s:db postgresql-k8s:db
watch juju status

After all the charms become Active, curl the Waltz Unit IP:

curl WALTZ_UNIT_IP:8080
# curl: (7) Failed to connect to WALTZ_UNIT_IP port 8080: Connection refused

The command should fail. Looking at the Waltz pod logs, the error described above can be seen:

kubectl logs -n  waltz-model pod/finos-waltz-k8s-0 -c waltz

Expected Result

Liquibase should have run successfully, and the Waltz service should have started.

Actual Result

Waltz container crashes due to Liquibase error.

AndrejGono commented 4 months ago

I had two postgresql versions, 14 and 15 installed. I configured and was using 15, but liquibase was using version 14. I just uninstalled version 14, started 15 and cleaned up brew on mac.