Omar Mayar
12/13/2022, 3:21 PMUnable to start server: sql schema version compatibility check failed: pq: no pg_hba.conf entry for host "10.13.34.11", user "airbyte", database "temporal", no encryption.Jhonatas Kleinkauff
12/13/2022, 5:44 PMNoah Abramson
12/13/2022, 5:54 PMJhonatas Kleinkauff
12/13/2022, 5:56 PMJhonatas Kleinkauff
12/13/2022, 5:57 PMJhonatas Kleinkauff
12/13/2022, 5:59 PMOmar Mayar
12/13/2022, 6:00 PMOmar Mayar
12/13/2022, 6:00 PMtemporal:
extraEnv:
- name: SQL_TLS
value: trueJhonatas Kleinkauff
12/13/2022, 6:07 PMOmar Mayar
12/13/2022, 6:09 PMDenis Samuylov
12/13/2022, 6:38 PMOmar Mayar
12/13/2022, 6:40 PMDenis Samuylov
12/13/2022, 6:41 PMOmar Mayar
12/13/2022, 8:27 PMOmar Mayar
12/13/2022, 8:28 PMtemporal:
image:
tag: "1.9.2"
extraEnv:
- name: "SQL_TLS"
value: "true"
- name: "SQL_TLS_DISABLE_HOST_VERIFICATION"
value: "true"
- name: "SQL_TLS_ENABLED"
value: "true"
- name: "SQL_HOST_VERIFICATION"
value: "false"Omar Mayar
12/13/2022, 8:28 PMDenis Samuylov
12/13/2022, 8:28 PMDenis Samuylov
12/13/2022, 8:29 PMOmar Mayar
12/13/2022, 8:29 PMOmar Mayar
12/13/2022, 8:30 PMOmar Mayar
12/13/2022, 8:30 PMOmar Mayar
12/13/2022, 8:30 PMDenis Samuylov
12/13/2022, 8:31 PMDenis Samuylov
12/13/2022, 8:31 PMOmar Mayar
12/13/2022, 8:32 PMDenis Samuylov
12/13/2022, 10:04 PMOmar Mayar
12/13/2022, 10:05 PMOmar Mayar
12/13/2022, 10:05 PMDenis Samuylov
12/13/2022, 10:08 PMMessage: Failed to initialize pool: FATAL: remaining connection slots are reserved for non-replication superuser connections. If I connect using a pool, when I install the helm chart, I get: Error: failed pre-install: pod airbyte-airbyte-bootloader failed , and if I check logs, I can see this error:
2022-12-13 22:03:14 INFO o.f.c.i.l.s.Slf4jLog(info):49 - Flyway Community Edition 7.14.0 by Redgate
Exception in thread "main" org.flywaydb.core.internal.exception.FlywaySqlException: Unable to determine the original schema for the connection
----------------------------------------------------------
SQL State : 42P05
Error Code : 0
Message : ERROR: prepared statement "S_2" already existsDenis Samuylov
12/13/2022, 10:09 PMOmar Mayar
12/13/2022, 10:10 PMpooling_mode:"session"Denis Samuylov
12/13/2022, 10:12 PMTransaction as recommended by DigitalOcean. Why would it matter? I try to redeploy nowDenis Samuylov
12/13/2022, 10:13 PMOmar Mayar
12/13/2022, 10:13 PMDenis Samuylov
12/13/2022, 10:15 PMUnable to start server. Error: sql schema version compatibility check failed: pq: no such database: temporal even though I have created it... Checking permissions nowDenis Samuylov
12/13/2022, 10:15 PMOmar Mayar
12/13/2022, 10:16 PMtemporal and temporal_visibility and just ensured that the db user being passed had create permission in all of the dbsOmar Mayar
12/13/2022, 10:18 PMsession instead of transaction i’m going based off of the aiven docs:
Several PostgreSQL features, described in the official PgBouncer features page, are known to be broken by the default transaction-based pooling and must not be used by the application when in this mode.
You must carefully consider the design of the client applications connecting to PgBouncer, otherwise the application may not work as expected.Omar Mayar
12/13/2022, 10:19 PMDenis Samuylov
12/13/2022, 10:28 PMOmar Mayar
12/13/2022, 10:28 PMDenis Samuylov
12/13/2022, 10:29 PMDenis Samuylov
12/13/2022, 10:30 PMCREATE USER airbyte_admin_user WITH PASSWORD 'PASSWORD';
ALTER ROLE airbyte_admin_user SET client_encoding TO 'utf8';
ALTER ROLE airbyte_admin_user SET default_transaction_isolation TO 'read committed';
ALTER ROLE airbyte_admin_user SET timezone TO 'UTC';
CREATE DATABASE airbyte;
GRANT ALL PRIVILEGES ON DATABASE airbyte TO airbyte_admin_user;
CREATE DATABASE temporal;
GRANT ALL PRIVILEGES ON DATABASE temporal TO airbyte_admin_user;
CREATE DATABASE temporal_visibility;
GRANT ALL PRIVILEGES ON DATABASE temporal_visibility TO airbyte_admin_user;Omar Mayar
12/13/2022, 10:31 PMOmar Mayar
12/13/2022, 10:34 PMOmar Mayar
12/13/2022, 10:36 PMOmar Mayar
12/13/2022, 10:36 PMDenis Samuylov
12/13/2022, 10:37 PMairbyte_admin_user , I cannot see the databases.Denis Samuylov
12/13/2022, 10:38 PMDenis Samuylov
12/13/2022, 10:43 PMDatabase: Choose the database that you want to connect to. Each pool can only connect to a single database. But in our case, we need to make sure that we can connect through a pool to 3 databases: airbyte , temporal, and temporal_visibility . How did you address it?Jhonatas Kleinkauff
12/14/2022, 12:48 PMJhonatas Kleinkauff
12/14/2022, 12:49 PMOmar Mayar
12/14/2022, 2:05 PMOmar Mayar
12/14/2022, 2:05 PMJhonatas Kleinkauff
12/14/2022, 4:45 PMOmar Mayar
12/14/2022, 6:03 PMDenis Samuylov
12/15/2022, 12:00 AMairbyte-airbyte-bootloader 0/1 Completed 0 50s
airbyte-connector-builder-server-7fcb5d9c6b-t5wpl 1/1 Running 0 29s
airbyte-cron-6884f9bb5c-fbj7t 1/1 Running 0 29s
airbyte-pod-sweeper-pod-sweeper-77d99c9548-5zb4m 0/1 Running 0 29s
airbyte-server-679c55df86-htrdz 0/1 Running 0 29s
airbyte-temporal-6b8cf5fc45-wtzlm 0/1 Error 2 (18s ago) 29s
airbyte-webapp-6778dcf8bb-c6htx 0/1 Running 0 29s
airbyte-worker-7c8ff98db-cwvng 0/1 Running 0 29sDenis Samuylov
12/15/2022, 12:02 AMUnable to start server. Error: sql schema version compatibility check failed: pq: no such database: temporal . Even though the temporal database exists, but not available to the user if I connect through the pool.Denis Samuylov
12/15/2022, 12:10 AMOmar Mayar
12/15/2022, 2:04 PMtemporal DB and seeing what would happen if you let the helm deployment build it for you?Omar Mayar
12/15/2022, 2:05 PMDenis Samuylov
12/15/2022, 9:28 PM2022/12/15 21:27:33 error creating database:unable to connect to DB, tried default DB names: postgres,defaultdb . It seems that it expects that the databases are pre-created.Omar Mayar
12/16/2022, 1:55 PMDenis Samuylov
12/16/2022, 8:43 PMOmar Mayar
12/16/2022, 8:44 PMMateusz Kijewski
01/10/2023, 3:35 PMDenis Samuylov
01/11/2023, 10:05 AMGleb Prudinsky
02/21/2023, 8:18 PM- name: SQL_TLS
value: 'true'
- name: SQL_TLS_ENABLE
value: 'true'
- name: SQL_TLS_DISABLE_HOST_VERIFICATION
value: 'true'
- name: SQL_TLS_ENABLE
value: 'true'
- name: SSL
value: 'true'
After add that env’s connection was successful.
Reference: https://github.com/temporalio/temporal/issues/2293#
Also, I think it would be a good idea to add these variables to helm chart. What do you think, @Jhonatas Kleinkauff ?Jhonatas Kleinkauff
02/22/2023, 12:42 PMMarcos Marx (Airbyte)
02/22/2023, 4:44 PMAndrey Groza
03/13/2023, 5:44 PM2023-03-13 17:39:35 INFO i.a.d.c.DatabaseAvailabilityCheck(lambda$isDatabaseConnected$1):75 - Testing airbyte configs database connection...
2023-03-13 17:40:05 ERROR i.a.d.c.DatabaseAvailabilityCheck(lambda$isDatabaseConnected$1):78 - Failed to verify database connection.
org.jooq.exception.DataAccessException: Error getting connection from data source HikariDataSource (HikariPool-2)
at org.jooq_3.17.8.POSTGRES.debug(Unknown Source) ~[?:?]
at org.jooq.impl.DataSourceConnectionProvider.acquire(DataSourceConnectionProvider.java:90) ~[jooq-3.17.8.jar:?]
at org.jooq.impl.DefaultExecuteContext.connection(DefaultExecuteContext.java:560) ~[jooq-3.17.8.jar:?]
at org.jooq.impl.AbstractQuery.execute(AbstractQuery.java:296) ~[jooq-3.17.8.jar:?]
at org.jooq.impl.AbstractResultQuery.fetchLazy(AbstractResultQuery.java:301) ~[jooq-3.17.8.jar:?]
at org.jooq.impl.AbstractResultQuery.fetchLazyNonAutoClosing(AbstractResultQuery.java:322) ~[jooq-3.17.8.jar:?]
at org.jooq.impl.SelectImpl.fetchLazyNonAutoClosing(SelectImpl.java:2861) ~[jooq-3.17.8.jar:?]
at org.jooq.impl.ResultQueryTrait.fetchOne(ResultQueryTrait.java:509) ~[jooq-3.17.8.jar:?]
at org.jooq.impl.Tools.attach(Tools.java:1526) ~[jooq-3.17.8.jar:?]
at org.jooq.impl.DefaultDSLContext.fetchOne(DefaultDSLContext.java:4662) ~[jooq-3.17.8.jar:?]
at org.jooq.impl.DefaultDSLContext.lambda$fetchValue$49(DefaultDSLContext.java:4682) ~[jooq-3.17.8.jar:?]
at org.jooq.impl.Tools.attach(Tools.java:1526) ~[jooq-3.17.8.jar:?]
at org.jooq.impl.DefaultDSLContext.fetchValue(DefaultDSLContext.java:4682) ~[jooq-3.17.8.jar:?]
at org.jooq.impl.DefaultDSLContext.fetchValue(DefaultDSLContext.java:4696) ~[jooq-3.17.8.jar:?]
at org.jooq.impl.DefaultDSLContext.fetchExists(DefaultDSLContext.java:4778) ~[jooq-3.17.8.jar:?]
at io.airbyte.db.check.DatabaseAvailabilityCheck.lambda$isDatabaseConnected$0(DatabaseAvailabilityCheck.java:76) ~[io.airbyte.airbyte-db-db-lib-0.42.0.jar:?]
at io.airbyte.db.Database.query(Database.java:23) ~[io.airbyte.airbyte-db-db-lib-0.42.0.jar:?]
at io.airbyte.db.check.DatabaseAvailabilityCheck.lambda$isDatabaseConnected$1(DatabaseAvailabilityCheck.java:76) ~[io.airbyte.airbyte-db-db-lib-0.42.0.jar:?]
at io.airbyte.db.check.DatabaseAvailabilityCheck.check(DatabaseAvailabilityCheck.java:47) ~[io.airbyte.airbyte-db-db-lib-0.42.0.jar:?]
at io.airbyte.db.init.DatabaseInitializer.initialize(DatabaseInitializer.java:45) ~[io.airbyte.airbyte-db-db-lib-0.42.0.jar:?]
at io.airbyte.bootloader.Bootloader.initializeDatabases(Bootloader.java:200) ~[io.airbyte-airbyte-bootloader-0.42.0.jar:?]
at io.airbyte.bootloader.Bootloader.load(Bootloader.java:101) ~[io.airbyte-airbyte-bootloader-0.42.0.jar:?]
at io.airbyte.bootloader.Application.main(Application.java:22) ~[io.airbyte-airbyte-bootloader-0.42.0.jar:?]
Caused by: java.sql.SQLTransientConnectionException: HikariPool-2 - Connection is not available, request timed out after 30000ms.
at com.zaxxer.hikari.pool.HikariPool.createTimeoutException(HikariPool.java:696) ~[HikariCP-5.0.1.jar:?]
at com.zaxxer.hikari.pool.HikariPool.getConnection(HikariPool.java:181) ~[HikariCP-5.0.1.jar:?]
at com.zaxxer.hikari.pool.HikariPool.getConnection(HikariPool.java:146) ~[HikariCP-5.0.1.jar:?]
at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:100) ~[HikariCP-5.0.1.jar:?]
at org.jooq.impl.DataSourceConnectionProvider.acquire(DataSourceConnectionProvider.java:87) ~[jooq-3.17.8.jar:?]
... 21 more
Caused by: org.postgresql.util.PSQLException: FATAL: remaining connection slots are reserved for non-replication superuser connections
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2676) ~[postgresql-42.5.0.jar:42.5.0]
at org.postgresql.core.v3.QueryExecutorImpl.readStartupMessages(QueryExecutorImpl.java:2788) ~[postgresql-42.5.0.jar:42.5.0]
at org.postgresql.core.v3.QueryExecutorImpl.<init>(QueryExecutorImpl.java:174) ~[postgresql-42.5.0.jar:42.5.0]
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:290) ~[postgresql-42.5.0.jar:42.5.0]
at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:49) ~[postgresql-42.5.0.jar:42.5.0]
at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:247) ~[postgresql-42.5.0.jar:42.5.0]
at org.postgresql.Driver.makeConnection(Driver.java:434) ~[postgresql-42.5.0.jar:42.5.0]
at org.postgresql.Driver.connect(Driver.java:291) ~[postgresql-42.5.0.jar:42.5.0]
at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138) ~[HikariCP-5.0.1.jar:?]
at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:359) ~[HikariCP-5.0.1.jar:?]
at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:201) ~[HikariCP-5.0.1.jar:?]
at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:470) ~[HikariCP-5.0.1.jar:?]
at com.zaxxer.hikari.pool.HikariPool$PoolEntryCreator.call(HikariPool.java:733) ~[HikariCP-5.0.1.jar:?]
at com.zaxxer.hikari.pool.HikariPool$PoolEntryCreator.call(HikariPool.java:712) ~[HikariCP-5.0.1.jar:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:317) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
at java.lang.Thread.run(Thread.java:1589) ~[?:?]
2023-03-13 17:40:05 INFO i.a.d.c.DatabaseAvailabilityCheck(check):49 - Database is not ready yet. Please wait a moment, it might still be initializing...
2023-03-13 17:40:11 INFO i.m.r.Micronaut(lambda$start$0):115 - Embedded Application shutting down
Do you have any idea why this might happen?Omar Mayar
03/13/2023, 9:27 PMOmar Mayar
03/13/2023, 9:27 PMAndrey Groza
03/14/2023, 7:53 AMpremsurawut
09/13/2023, 2:26 PM[Fx] ERROR Failed to initialize custom logger: could not build arguments for function "<http://go.uber.org/fx|go.uber.org/fx>".(*App).constructCustomLogger.func2
/go/pkg/mod/go.uber.org/fx@v1.18.2/app.go:414:
failed to build fxevent.Logger:
could not build arguments for function "<http://go.temporal.io/server/temporal|go.temporal.io/server/temporal>".glob..func8
/home/builder/temporal/temporal/fx.go:1025:
failed to build log.Logger:
received non-nil error from function "<http://go.temporal.io/server/temporal|go.temporal.io/server/temporal>".ServerOptionsProvider
/home/builder/temporal/temporal/fx.go:159:
sql schema version compatibility check failed: unable to read DB schema version keyspace/database: spw_airbyte_temporal error: pq: relation "schema_version" does not exist
Unable to create server. Error: could not build arguments for function "<http://go.uber.org/fx|go.uber.org/fx>".(*App).constructCustomLogger.func2 (/go/pkg/mod/go.uber.org/fx@v1.18.2/app.go:414): failed to build fxevent.Logger: could not build arguments for function "<http://go.temporal.io/server/temporal|go.temporal.io/server/temporal>".glob..func8 (/home/builder/temporal/temporal/fx.go:1025): failed to build log.Logger: received non-nil error from function "<http://go.temporal.io/server/temporal|go.temporal.io/server/temporal>".ServerOptionsProvider (/home/builder/temporal/temporal/fx.go:159): sql schema version compatibility check failed: unable to read DB schema version keyspace/database: spw_airbyte_temporal error: pq: relation "schema_version" does not exist.
I have set these values in values.yaml
temporal:
enabled: true
image:
repository: temporalio/auto-setup
pullPolicy: IfNotPresent
tag: "1.20.1"
extraEnv:
- name: DBNAME
value: "spw_airbyte_temporal"
- name: VISIBILITY_DBNAME
value: spw_airbyte_temporal_visibility
- name: SQL_TLS
value: "true"
- name: SQL_TLS_ENABLE
value: "true"
- name: SQL_TLS_DISABLE_HOST_VERIFICATION
value: "true"
- name: SQL_TLS_ENABLE
value: "true"
- name: SSL
value: "true"Alex Drawbond
11/22/2023, 5:00 PMpremsurawut
12/28/2023, 8:29 AMSKIP_DB_CREAT variable then it works.
extraEnv:
- name: DBNAME # TEMPORAL_DB
value: "spw_airbyte_temporal"
- name: VISIBILITY_DBNAME # VISIBILITY_DB
value: spw_airbyte_temporal_visibility
- name: SKIP_DB_CREATE
value: "true"