Issue
When deploying Ververica Platform with PostgreSQL database as the persistence layer, gateway and appmanager containers fail to start with below logs printed:
Gateway Container:
liquibase.exception.DatabaseException: ERROR: no schema has been selected to create in at character XX
AppManager Container:
bad SQL grammar []; nested exception is org-postgresql.util.PSQLException: ERROR: relation "appmanager" does not exist
Environment
- Ververica Platform 2.0 or later with PostgreSQL Database as persistence layer.
Resolution
Since the gateway container could not create persistence tables, appmanager containers could not find the related tables.
In order Ververica Platform to successfully connect to a specific database and schema of PostgreSQL DB, related information needed to be passed on the URL section of PostgreSQL JDBC connector configuration.
Suppose the Ververica platform will use below details to connect PostgreSQL DB:
- PostgreSQL Server Name: your_postgres_server
- PostgreSQL Server Port: 5432
- Database Name: db_vvp
- Schema Name: schema_vvp
Here the persistence jdbc configuration to be used in values.yaml file of Ververica Platform when deploying it:
vvp:
persistence:
type: jdbc
datasource:
url: jdbc:postgresql://your_postgres_server:5432/db_vvp?currentSchema=schema_vvp
Cause
Connection to the given schema was failing because of using schema_name tag in jdbc url instead of currentSchema.