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

Springboot 2.5.x and above with mariadb driver gives java.sql.SQLNonTransientConnectionException: (conn=11812758) Connection is closed #5102

Closed
debashreepratap11 opened this issue Sep 26, 2022 · 2 comments
Labels
status/need-feedback Calling participant to provide feedback

Comments

@debashreepratap11
Copy link

debashreepratap11 commented Sep 26, 2022

Description:

I am trying to deploy Spring cloud data flow using helm on a kubernetes cluster.
There are few applications which are registered in SCDF. Applications with Spring boot version 2.1.x runs successfully and the applications above 2.5.x gives database connectivity error .

Steps to reproduce:

Deploy Spring-cloud-dataflow on a kubernetes cluster using MYSQL connection properties and MariaDB Driver ,once it is deployed import spring boot application that has spring boot version 2.5.12 or above configured.
From the spring cloud data flow dashboard try to launch the task.

Command to Deploy

helm3 --kube-context my-cluster install my-release bitnami/spring-cloud-dataflow --namespace my-namespace --set server.service.type=NodePort --set server.image.tag=2.9.2-debian-10-r0 --set rabbitmq.enabled=false --set kafka.enabled=false --set skipper.enabled=false --set mariadb.enabled=false --set 'externalDatabase.dataflow.url=jdbc:mysql://..rds.amazonaws.com:3306/dataflow?useSSL=false' --set usePipelineAuth=false --set useBatchMultiSend=false --set allowPublicKeyRetrieval=true --set externalDatabase.dataflow.username=username --set externalDatabase.password=pwd --set externalDatabase.driver=org.mariadb.jdbc.Driver --set server.configuration.batchEnabled=true --set server.configuration.streamingEnabled=false --set server.livenessProbe.enabled=false --set server.readinessProbe.enabled=false --set externalDatabase.hibernateDialect=org.hibernate.dialect.MySQL5Dialect --set server.resources.limits.memory=16Gi --set server.resources.limits.cpu=15 --set server.resources.requests.memory=2Gi --set server.resources.requests.cpu=1000m --set server.ingress.enabled=true --set server.ingress.hostname=lab-development-dataflow-v2.dev.miqdigital.com --set server.ingress.ingressClassName= --set server.ingress.apiVersion=networking.k8s.io/v1 --set server.composedTaskRunner.image.tag=2.9.2-debian-10-r0 --set deployer.environmentVariables=SPRING_PROFILES_ACTIVE=integration --set deployer.resources.limits.cpu=2 --set deployer.resources.limits.memory=6Gi --set deployer.resources.requests.cpu=0.5 --set deployer.resources.requests.memory=2Gi --set deployer.podSecurityContext.runAsUser=0

Additional context:

Error Log:
spring-cloud-dataflow 08:34:02.81
spring-cloud-dataflow 08:34:02.81 Welcome to the Bitnami spring-cloud-dataflow container
spring-cloud-dataflow 08:34:02.81 Subscribe to project updates by watching https://github.com/bitnami/bitnami-docker-spring-cloud-dataflow
spring-cloud-dataflow 08:34:02.81 Submit issues and feature requests at https://github.com/bitnami/bitnami-docker-spring-cloud-dataflow/issues
spring-cloud-dataflow 08:34:02.81
spring-cloud-dataflow 08:34:02.81 INFO ==> ** Starting Spring Cloud Data Flow setup **
spring-cloud-dataflow 08:34:02.82 INFO ==> Validating settings in SPRING_CLOUD_DATAFLOW_* env vars
spring-cloud-dataflow 08:34:02.83 INFO ==> ** Spring Cloud Data Flow setup finished! **
spring-cloud-dataflow 08:34:02.83 INFO ==> ** Starting Spring Cloud Data Flow **
2022-09-27 08:34:05.101 INFO 1 --- [kground-preinit] o.h.validator.internal.util.Version : HV000001: Hibernate Validator 6.2.2.Final


/ | _ __ _ __() __ __ _ / | | ___ _ _ | |
_
| '
| '
| | '
\ / | | | | |/ _ \| | | |/ _ |
) | |) | | | | | | | (| | | |
| | () | || | (| |
|/| .__/|| ||| ||_, | _||_/ _,|_,|
____ || _ |/ __________
| _ \ __ | | __ _ | | | _____ __ \ \ \ \ \
| | | |/ | __/ _ | | | | |/ _ \ \ /\ / / \ \ \ \ \
| |
| | (
| | || (
| | | | | | () \ V V / / / / / / /
|/ _,|__,| || |_|_
_/ _/_/ /////_/
Spring Cloud Data Flow Server (v2.9.3)
2022-09-27 08:34:05.814 INFO 1 --- [ main] b.c.PropertySourceBootstrapConfiguration : Located property source: [BootstrapPropertySource {name='bootstrapProperties-mariadb-password'}]
2022-09-27 08:34:05.841 INFO 1 --- [ main] o.s.c.d.s.s.DataFlowServerApplication : The following 1 profile is active: "kubernetes"
2022-09-27 08:34:06.761 INFO 1 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode!
2022-09-27 08:34:06.762 INFO 1 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data Map repositories in DEFAULT mode.
2022-09-27 08:34:06.945 INFO 1 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 170 ms. Found 1 Map repository interfaces.
2022-09-27 08:34:07.259 INFO 1 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode!
2022-09-27 08:34:07.261 INFO 1 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.
2022-09-27 08:34:07.268 INFO 1 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 1 ms. Found 0 JPA repository interfaces.
2022-09-27 08:34:07.464 INFO 1 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode!
2022-09-27 08:34:07.465 INFO 1 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.
2022-09-27 08:34:07.515 INFO 1 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 50 ms. Found 5 JPA repository interfaces.
2022-09-27 08:34:07.866 INFO 1 --- [ main] o.s.cloud.context.scope.GenericScope : BeanFactory id=0141b655-ee73-31fe-80a4-6ce5a5469dbc
2022-09-27 08:34:08.482 INFO 1 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)
2022-09-27 08:34:08.494 INFO 1 --- [ main] o.a.coyote.http11.Http11NioProtocol : Initializing ProtocolHandler ["http-nio-8080"]
2022-09-27 08:34:08.495 INFO 1 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2022-09-27 08:34:08.495 INFO 1 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.58]
2022-09-27 08:34:08.555 INFO 1 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2022-09-27 08:34:08.843 INFO 1 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
2022-09-27 08:34:10.408 ERROR 1 --- [ main] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Exception during pool initialization.
java.sql.SQLNonTransientConnectionException: Could not connect to address=(host=MyDBURL-1.rds.amazonaws.com)(port=3306)(type=master) : (conn=12581339) could not load system variables
at org.mariadb.jdbc.internal.util.exceptions.ExceptionFactory.createException(ExceptionFactory.java:73)
at org.mariadb.jdbc.internal.util.exceptions.ExceptionFactory.create(ExceptionFactory.java:197)
at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.connectWithoutProxy(AbstractConnectProtocol.java:1394)
at org.mariadb.jdbc.internal.util.Utils.retrieveProxy(Utils.java:635)
at org.mariadb.jdbc.MariaDbConnection.newConnection(MariaDbConnection.java:150)
at org.mariadb.jdbc.Driver.connect(Driver.java:89)
at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138)
at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:364)
at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:206)
at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:476)
at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:561)
at com.zaxxer.hikari.pool.HikariPool.(HikariPool.java:115)
at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:112)
at org.springframework.jdbc.datasource.DataSourceUtils.fetchConnection(DataSourceUtils.java:159)
at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:117)
at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:80)
at org.springframework.jdbc.support.JdbcUtils.extractDatabaseMetaData(JdbcUtils.java:337)
at org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration$LocationResolver.getDatabaseDriver(FlywayAutoConfiguration.java:351)
at org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration$LocationResolver.resolveLocations(FlywayAutoConfiguration.java:334)
at org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration$FlywayConfiguration.configureProperties(FlywayAutoConfiguration.java:178)
at org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration$FlywayConfiguration.flyway(FlywayAutoConfiguration.java:119)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:638)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1352)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1154)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:908)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:145)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:448)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:339)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1365)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1354)
at org.springframework.cloud.dataflow.server.single.DataFlowServerApplication.main(DataFlowServerApplication.java:52)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:108)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:58)
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:88)
Caused by: java.sql.SQLNonTransientConnectionException: (conn=12581339) could not load system variables
at org.mariadb.jdbc.internal.util.exceptions.ExceptionFactory.createException(ExceptionFactory.java:73)
at org.mariadb.jdbc.internal.util.exceptions.ExceptionFactory.create(ExceptionFactory.java:188)
at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.requestSessionDataWithShow(AbstractConnectProtocol.java:1114)
at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.readPipelineAdditionalData(AbstractConnectProtocol.java:1075)
at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.postConnectionQueries(AbstractConnectProtocol.java:885)
at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.createConnection(AbstractConnectProtocol.java:600)
at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.connectWithoutProxy(AbstractConnectProtocol.java:1389)
... 53 common frames omitted
Caused by: java.sql.SQLNonTransientConnectionException: (conn=12581339) Connection is closed
at org.mariadb.jdbc.internal.util.exceptions.ExceptionFactory.createException(ExceptionFactory.java:73)
at org.mariadb.jdbc.internal.util.exceptions.ExceptionFactory.create(ExceptionFactory.java:192)
at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.cmdPrologue(AbstractQueryProtocol.java:1946)
at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.executeQuery(AbstractQueryProtocol.java:249)
at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.requestSessionDataWithShow(AbstractConnectProtocol.java:1089)
... 57 common frames omitted
2022-09-27 08:34:10.409 WARN 1 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flyway' defined in class path resource [org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.flywaydb.core.Flyway]: Factory method 'flyway' threw exception; nested exception is java.lang.IllegalStateException: org.springframework.jdbc.support.MetaDataAccessException: Could not get Connection for extracting meta-data; nested exception is org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is java.sql.SQLNonTransientConnectionException: Could not connect to address=(host=MyDBURL-1.rds.amazonaws.com)(port=3306)(type=master) : (conn=12581339) could not load system variables
2022-09-27 08:34:10.411 INFO 1 --- [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
2022-09-27 08:34:10.463 ERROR 1 --- [ main] o.s.boot.SpringApplication : Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flyway' defined in class path resource [org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.flywaydb.core.Flyway]: Factory method 'flyway' threw exception; nested exception is java.lang.IllegalStateException: org.springframework.jdbc.support.MetaDataAccessException: Could not get Connection for extracting meta-data; nested exception is org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is java.sql.SQLNonTransientConnectionException: Could not connect to address=(host=MyDBURL.rds.amazonaws.com)(port=3306)(type=master) : (conn=12581339) could not load system variables
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:658)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:638)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1352)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1154)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:908)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:145)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:448)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:339)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1365)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1354)
at org.springframework.cloud.dataflow.server.single.DataFlowServerApplication.main(DataFlowServerApplication.java:52)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:108)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:58)
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:88)
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.flywaydb.core.Flyway]: Factory method 'flyway' threw exception; nested exception is java.lang.IllegalStateException: org.springframework.jdbc.support.MetaDataAccessException: Could not get Connection for extracting meta-data; nested exception is org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is java.sql.SQLNonTransientConnectionException: Could not connect to address=(host=MyDBURL.rds.amazonaws.com)(port=3306)(type=master) : (conn=12581339) could not load system variables
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185)
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653)
... 29 common frames omitted
Caused by: java.lang.IllegalStateException: org.springframework.jdbc.support.MetaDataAccessException: Could not get Connection for extracting meta-data; nested exception is org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is java.sql.SQLNonTransientConnectionException: Could not connect to address=(host=MyDBURL.rds.amazonaws.com)(port=3306)(type=master) : (conn=12581339) could not load system variables
at org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration$LocationResolver.getDatabaseDriver(FlywayAutoConfiguration.java:355)
at org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration$LocationResolver.resolveLocations(FlywayAutoConfiguration.java:334)
at org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration$FlywayConfiguration.configureProperties(FlywayAutoConfiguration.java:178)
at org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration$FlywayConfiguration.flyway(FlywayAutoConfiguration.java:119)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
... 30 common frames omitted
Caused by: org.springframework.jdbc.support.MetaDataAccessException: Could not get Connection for extracting meta-data; nested exception is org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is java.sql.SQLNonTransientConnectionException: Could not connect to address=(host=MyDBURL-1.rds.amazonaws.com)(port=3306)(type=master) : (conn=12581339) could not load system variables
at org.springframework.jdbc.support.JdbcUtils.extractDatabaseMetaData(JdbcUtils.java:363)
at org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration$LocationResolver.getDatabaseDriver(FlywayAutoConfiguration.java:351)
... 38 common frames omitted
Caused by: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is java.sql.SQLNonTransientConnectionException: Could not connect to address=(host=MyDBURL.rds.amazonaws.com)(port=3306)(type=master) : (conn=12581339) could not load system variables
at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:83)
at org.springframework.jdbc.support.JdbcUtils.extractDatabaseMetaData(JdbcUtils.java:337)
... 39 common frames omitted
Caused by: java.sql.SQLNonTransientConnectionException: Could not connect to address=(host=MyDBURL.rds.amazonaws.com)(port=3306)(type=master) : (conn=12581339) could not load system variables
at org.mariadb.jdbc.internal.util.exceptions.ExceptionFactory.createException(ExceptionFactory.java:73)
at org.mariadb.jdbc.internal.util.exceptions.ExceptionFactory.create(ExceptionFactory.java:197)
at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.connectWithoutProxy(AbstractConnectProtocol.java:1394)
at org.mariadb.jdbc.internal.util.Utils.retrieveProxy(Utils.java:635)
at org.mariadb.jdbc.MariaDbConnection.newConnection(MariaDbConnection.java:150)
at org.mariadb.jdbc.Driver.connect(Driver.java:89)
at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138)
at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:364)
at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:206)
at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:476)
at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:561)
at com.zaxxer.hikari.pool.HikariPool.(HikariPool.java:115)
at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:112)
at org.springframework.jdbc.datasource.DataSourceUtils.fetchConnection(DataSourceUtils.java:159)
at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:117)
at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:80)
... 40 common frames omitted
Caused by: java.sql.SQLNonTransientConnectionException: (conn=12581339) could not load system variables
at org.mariadb.jdbc.internal.util.exceptions.ExceptionFactory.createException(ExceptionFactory.java:73)
at org.mariadb.jdbc.internal.util.exceptions.ExceptionFactory.create(ExceptionFactory.java:188)
at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.requestSessionDataWithShow(AbstractConnectProtocol.java:1114)
at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.readPipelineAdditionalData(AbstractConnectProtocol.java:1075)
at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.postConnectionQueries(AbstractConnectProtocol.java:885)
at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.createConnection(AbstractConnectProtocol.java:600)
at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.connectWithoutProxy(AbstractConnectProtocol.java:1389)
... 53 common frames omitted
Caused by: java.sql.SQLNonTransientConnectionException: (conn=12581339) Connection is closed
at org.mariadb.jdbc.internal.util.exceptions.ExceptionFactory.createException(ExceptionFactory.java:73)
at org.mariadb.jdbc.internal.util.exceptions.ExceptionFactory.create(ExceptionFactory.java:192)
at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.cmdPrologue(AbstractQueryProtocol.java:1946)
at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.executeQuery(AbstractQueryProtocol.java:249)
at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.requestSessionDataWithShow(AbstractConnectProtocol.java:1089)
... 57 common frames omitted

@github-actions github-actions bot added the status/need-triage Team needs to triage and take a first look label Sep 26, 2022
@markpollack
Copy link
Contributor

The error log you are showing looks like when you start the Data Flow server, it can not connect to the Database and not that there are problems deploying boot 2.5 applications.

e.g the line

java.sql.SQLNonTransientConnectionException: Could not connect to address=(host=MyDBURL-1.rds.amazonaws.com)(port=3306)(type=master) : (conn=12581339) could not load system variables

is in the startup log of the server.

Can you please confirm this, as there is conflicting info in this report.

Some googling around came up with this ticket that maybe useful - sysown/proxysql#2523

This connection string

"jdbc:mariadb://localhost:6033/test?fastConnect=true&tcpNoDelay=true&autoReconnect=true&sessionVariables=net_write_timeout=7200"

did not work, but adding two @@ before the sessionVariables argument worked

jdbc:mariadb://192.168.23.234:6033/c4?fastConnect=true&tcpNoDelay=true&autoReconnect=true&sessionVariables=@@session.net_write_timeout=7200

See if you can update the connection string in the helm chart to pass in a write timeout.

@markpollack markpollack added status/need-feedback Calling participant to provide feedback and removed status/need-triage Team needs to triage and take a first look labels Sep 29, 2022
@cppwfs
Copy link
Contributor

cppwfs commented Jul 22, 2024

Closing due to inactivity. If closed in error please let us know.

@cppwfs cppwfs closed this as completed Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/need-feedback Calling participant to provide feedback
Projects
None yet
Development

No branches or pull requests

3 participants