hasura / hasura/graphql-engine

mysql8 connection error

Open
#9,803 1 comment 0 reactions 0 assignees View on GitHub
k/bug t/data-connectors
Dominant language
TypeScript
Stars
32.1k
Forks
3k
PR merge metrics
PR metrics pending

Description

### Version Information

Server Version: v2.30.1-cloud.1

### Environment

cloud

### What is the current behaviour?

trying to connect to mysql data source and getting an error

### What is the expected behaviour?

no error

### How to reproduce the issue?

1. add mysql source
2. put in the connection string as formatted from docs
3. see error popup

### Please provide any traces or logs that could help here.

```
[
{
"message": {
"stacktrace": "java.lang.IllegalArgumentException: Invalid min size: greater than max size\n\tat io.agroal.api.configuration.supplier.AgroalConnectionPoolConfigurationSupplier.validate(AgroalConnectionPoolConfigurationSupplier.java:306)\n\tat io.agroal.api.configuration.supplier.AgroalConnectionPoolConfigurationSupplier.get(AgroalConnectionPoolConfigurationSupplier.java:338)\n\tat io.agroal.api.configuration.supplier.AgroalConnectionPoolConfigurationSupplier.get(AgroalConnectionPoolConfigurationSupplier.java:29)\n\tat io.agroal.api.configuration.supplier.AgroalDataSourceConfigurationSupplier.connectionPoolConfiguration(AgroalDataSourceConfigurationSupplier.java:55)\n\tat io.agroal.api.configuration.supplier.AgroalDataSourceConfigurationSupplier.connectionPoolConfiguration(AgroalDataSourceConfigurationSupplier.java:62)\n\tat io.hasura.services.AgroalDataSourceService.mkAgroalDataSourceConfigurationSupplier(AgroalDataSourceService.kt:192)\n\tat io.hasura.services.AgroalDataSourceService.createDataSource(AgroalDataSourceService.kt:145)\n\tat io.hasura.services.AgroalDataSourceService.createTracingDataSource(AgroalDataSourceService.kt:158)\n\tat io.hasura.services.AgroalDataSourceService.createDataSourceFromConnInfo(AgroalDataSourceService.kt:169)\n\tat io.hasura.services.AgroalDataSourceService_Subclass.createDataSourceFromConnInfo$$superforward(Unknown Source)\n\tat io.hasura.services.AgroalDataSourceService_Subclass$$function$$1.apply(Unknown Source)\n\tat io.quarkus.arc.impl.AroundInvokeInvocationContext.proceed(AroundInvokeInvocationContext.java:77)\n\tat io.quarkus.arc.impl.AroundInvokeInvocationContext.proceed(AroundInvokeInvocationContext.java:66)\n\tat io.quarkus.opentelemetry.runtime.tracing.cdi.WithSpanInterceptor.span(WithSpanInterceptor.java:66)\n\tat io.quarkus.opentelemetry.runtime.tracing.cdi.WithSpanInterceptor_Bean.intercept(Unknown Source)\n\tat io.quarkus.arc.impl.InterceptorInvocation.invoke(InterceptorInvocation.java:42)\n\tat io.quarkus.arc.impl.AroundInvokeInvocationContext.perform(AroundInvokeInvocationContext.java:34)\n\tat io.quarkus.arc.impl.InvocationContexts.performAroundInvoke(InvocationContexts.java:27)\n\tat io.hasura.services.AgroalDataSourceService_Subclass.createDataSourceFromConnInfo(Unknown Source)\n\tat io.hasura.services.AgroalDataSourceService.createDataSourceFromConnInfo$default(AgroalDataSourceService.kt:163)\n\tat io.hasura.services.dataConnectors.BaseDataConnectorService$getSchema$dataSource$1.invoke(BaseDataConnectorService.kt:119)\n\tat io.hasura.services.dataConnectors.BaseDataConnectorService$getSchema$dataSource$1.invoke(BaseDataConnectorService.kt:118)\n\tat io.hasura.services.dataConnectors.BaseDataConnectorService.getSchema$lambda$2(BaseDataConnectorService.kt:118)\n\tat com.github.benmanes.caffeine.cache.LocalCache.lambda$statsAware$2(LocalCache.java:167)\n\tat com.github.benmanes.caffeine.cache.UnboundedLocalCache.lambda$computeIfAbsent$2(UnboundedLocalCache.java:294)\n\tat java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1708)\n\tat com.github.benmanes.caffeine.cache.UnboundedLocalCache.computeIfAbsent(UnboundedLocalCache.java:290)\n\tat com.github.benmanes.caffeine.cache.LocalCache.computeIfAbsent(LocalCache.java:112)\n\tat com.github.benmanes.caffeine.cache.LocalManualCache.get(LocalManualCache.java:62)\n\tat io.hasura.services.dataConnectors.BaseDataConnectorService.getSchema(BaseDataConnectorService.kt:118)\n\tat io.hasura.services.dataConnectors.MySQLDataConnectorService_Subclass.getSchema$$superforward(Unknown Source)\n\tat io.hasura.services.dataConnectors.MySQLDataConnectorService_Subclass$$function$$7.apply(Unknown Source)\n\tat io.quarkus.arc.impl.AroundInvokeInvocationContext.proceed(AroundInvokeInvocationContext.java:77)\n\tat io.quarkus.arc.impl.AroundInvokeInvocationContext.proceed(AroundInvokeInvocationContext.java:66)\n\tat io.quarkus.opentelemetry.runtime.tracing.cdi.WithSpanInterceptor.span(WithSpanInterceptor.java:66)\n\tat io.quarkus.opentelemetry.runtime.tracing.cdi.WithSpanInterceptor_Bean.intercept(Unknown Source)\n\tat io.quarkus.arc.impl.InterceptorInvocation.invoke(InterceptorInvocation.java:42)\n\tat io.quarkus.arc.impl.AroundInvokeInvocationContext.perform(AroundInvokeInvocationContext.java:34)\n\tat io.quarkus.arc.impl.InvocationContexts.performAroundInvoke(InvocationContexts.java:27)\n\tat io.hasura.services.dataConnectors.MySQLDataConnectorService_Subclass.getSchema(Unknown Source)\n\tat io.hasura.controllers.DataConnectorResource.getSchema(DataConnectorResource.kt:101)\n\tat io.hasura.controllers.DataConnectorResource_Subclass.getSchema$$superforward(Unknown Source)\n\tat io.hasura.controllers.DataConnectorResource_Subclass$$function$$4.apply(Unknown Source)\n\tat io.quarkus.arc.impl.AroundInvokeInvocationContext.proceed(AroundInvokeInvocationContext.java:77)\n\tat io.quarkus.arc.impl.AroundInvokeInvocationContext.proceed(AroundInvokeInvocationContext.java:66)\n\tat io.quarkus.opentelemetry.runtime.tracing.cdi.WithSpanInterceptor.span(WithSpanInterceptor.java:66)\n\tat io.quarkus.opentelemetry.runtime.tracing.cdi.WithSpanInterceptor_Bean.intercept(Unknown Source)\n\tat io.quarkus.arc.impl.InterceptorInvocation.invoke(InterceptorInvocation.java:42)\n\tat io.quarkus.arc.impl.AroundInvokeInvocationContext.perform(AroundInvokeInvocationContext.java:34)\n\tat io.quarkus.arc.impl.InvocationContexts.performAroundInvoke(InvocationContexts.java:27)\n\tat io.hasura.controllers.DataConnectorResource_Subclass.getSchema(Unknown Source)\n\tat io.hasura.controllers.DataConnectorResource$quarkusrestinvoker$getSchema_70be934be362aead1d391ec2f6c6b1634c65116c.invoke(Unknown Source)\n\tat org.jboss.resteasy.reactive.server.handlers.InvocationHandler.handle(InvocationHandler.java:29)\n\tat io.quarkus.resteasy.reactive.server.runtime.QuarkusResteasyReactiveRequestContext.invokeHandler(QuarkusResteasyReactiveRequestContext.java:141)\n\tat org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext.run(AbstractResteasyReactiveContext.java:145)\n\tat io.quarkus.vertx.core.runtime.VertxCoreRecorder$14.runWith(VertxCoreRecorder.java:576)\n\tat org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513)\n\tat org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538)\n\tat org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:29)\n\tat org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:29)\n\tat io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)\n\tat java.base/java.lang.Thread.run(Thread.java:833)\n"
},
"reason": "Inconsistent object: Invalid min size: greater than max size",
"type": "source"
}
]
```

### Any possible solutions/workarounds you're aware of?

none

### Keywords

mysql

Contributor guide

Open the contributing guide

Research direction

Start with the stack-trace entry points in AgroalDataSourceService.kt, especially lines 192, 169, and 145, then follow MySQLDataConnectorService.getSchema and DataConnectorResource.kt:101. Reproduce the MySQL source connection using the documented connection string and identify why Agroal rejects the pool configuration; done means the source connects and schema retrieval no longer returns the validation error.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, kotlin, mysql
Domain
backend, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.