Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metabase over postgresql protocol broken in 3.1 #5809

Closed
jackfischer opened this issue Jul 18, 2023 · 2 comments
Closed

Metabase over postgresql protocol broken in 3.1 #5809

jackfischer opened this issue Jul 18, 2023 · 2 comments
Assignees

Comments

@jackfischer
Copy link
Contributor

jackfischer commented Jul 18, 2023

  • EdgeDB Version: 3.1
  • EdgeDB CLI Version: 3.4.0+4d95a2c
  • OS Version: debian 10.13 and macos 10.13

Steps to Reproduce:

  1. Configure metabase connection against postgresql protocol in 3.0, can successfully query
  2. Upgrade to 3.1
  3. Metabase begins throwing the following error,
2023-07-18 11:01:21,801 ERROR events.sync-database :: Error syncing Database 2
java.sql.SQLException: An SQLException was provoked by the following failure: com.mchange.v2.resourcepool.ResourcePoolException: Attempted to use a closed or broken resource pool
	at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:118)
	at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:77)
	at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:74)
	at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:694)
	at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:140)
	at clojure.java.jdbc$get_connection.invokeStatic(jdbc.clj:372)
	at clojure.java.jdbc$get_connection.invoke(jdbc.clj:274)
	at clojure.java.jdbc$get_connection.invokeStatic(jdbc.clj:343)
	at clojure.java.jdbc$get_connection.invoke(jdbc.clj:274)
	at metabase.driver.sql_jdbc.sync.describe_database$describe_database.invokeStatic(describe_database.clj:163)
	at metabase.driver.sql_jdbc.sync.describe_database$describe_database.invoke(describe_database.clj:160)
	at metabase.driver.sql_jdbc$fn__105175.invokeStatic(sql_jdbc.clj:75)
	at metabase.driver.sql_jdbc$fn__105175.invoke(sql_jdbc.clj:73)
	at clojure.lang.MultiFn.invoke(MultiFn.java:234)
	at metabase.sync.fetch_metadata$fn__83479$db_metadata__83484$fn__83485.invoke(fetch_metadata.clj:15)
	at metabase.sync.fetch_metadata$fn__83479$db_metadata__83484.invoke(fetch_metadata.clj:12)
	at metabase.sync.sync_metadata$fn__85893$sync_db_metadata_BANG___85898$fn__85899.invoke(sync_metadata.clj:58)
	at metabase.sync.sync_metadata$fn__85893$sync_db_metadata_BANG___85898.invoke(sync_metadata.clj:55)
	at metabase.events.sync_database$process_sync_database_event$fn__103599.invoke(sync_database.clj:40)
	at clojure.core$binding_conveyor_fn$fn__5823.invoke(core.clj:2047)
	at clojure.lang.AFn.call(AFn.java:18)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at java.base/java.lang.Thread.run(Thread.java:1623)
Caused by: com.mchange.v2.resourcepool.ResourcePoolException: Attempted to use a closed or broken resource pool
	at com.mchange.v2.resourcepool.BasicResourcePool.ensureNotBroken(BasicResourcePool.java:1824)
	at com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:611)
	at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:554)
	at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:594)
         ... this line duplicated many times
	at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:594)
	at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutAndMarkConnectionInUse(C3P0PooledConnectionPool.java:758)
	at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:685)
	... 21 more
  1. Downgrade, queries succeed again.

Interestingly, authentication still works. If you intentionally break the credentials they fail and vice versa. Only queries fail.

@msullivan
Copy link
Member

It seems like this is already fixed on master and stable/3.x... but I'm not yet sure what broke it in 3.1 and which fix fixed it.

@msullivan
Copy link
Member

Alright, it was broken by #5685 and fixed by #5776.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants