You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After upgrading to 1.19.3: java.sql.SQLException: No suitable driver found for jdbc:mysql://something.rds.amazonaws.com:3306/mysql
Description
Was working fine with 1.17.3. After upgrading to 1.19.3, FusionAuth failed to connect to MySQL with a weird error.
Affects versions
error: FusionAuth 1.19.3, 1.19.2., 1.19.1, 1.19.0
working: FusionAuth 1.17.3, FusionAuth 1.18.8
Kubernetes 1.18
AWS RDS MySQL 8.0.20
Steps to reproduce
Steps to reproduce the behavior:
Run FusionAuth 1.19.0 - 1.19.3 using Kubernetes (1.18) Helm chart, AWS RDS MySQL 8.0.20
Check logs
Setting Helm value database.tls to either true or false has no effect. (My configuration uses true which means JDBC url contains ?sslmode=require)
Expected behavior
Runs, just like in FusionAuth 1.17.3 or 1.18.8. Below is log for 1.18.8 but using database that was already upgraded to 1.19.0.
---------------------------------------------------------------------------------------------------------
---------------------------------- Entering Silent Configuration Mode -----------------------------------
---------------------------------------------------------------------------------------------------------
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.inversoft.lang.ClassLoaderTools (file:/usr/local/fusionauth/fusionauth-app/web/WEB-INF/lib/inversoft-database-0.4.13.jar) to method java.net.URLClassLoader.addURL(java.net.URL)
WARNING: Please consider reporting this to the maintainers of com.inversoft.lang.ClassLoaderTools
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Sep 12, 2020 10:18:20.319 AM INFO com.inversoft.maintenance.db.JDBCMaintenanceModeDatabaseService - Database Version [1.19.0]
Sep 12, 2020 10:18:20.321 AM INFO com.inversoft.maintenance.db.JDBCMaintenanceModeDatabaseService - Latest Migration Version [1.18.2]
Sep 12, 2020 10:18:20.327 AM INFO io.fusionauth.api.configuration.PropertiesFileFusionAuthConfiguration - Loading FusionAuth configuration file [/usr/local/fusionauth/config/fusionauth.properties]
Sep 12, 2020 10:18:20.330 AM INFO io.fusionauth.api.configuration.PropertiesFileFusionAuthConfiguration - Dynamically set property [fusionauth-app.url] set to [http://10.244.0.213:9011]
Sep 12, 2020 10:18:20.330 AM INFO io.fusionauth.api.configuration.PropertiesFileFusionAuthConfiguration - Override property [fusionauth-app.search-engine-type], set to [database] from ENV.FUSIONAUTH_SEARCH_ENGINE_TYPE
Sep 12, 2020 10:18:20.330 AM INFO io.fusionauth.api.configuration.PropertiesFileFusionAuthConfiguration - Set Max HTTP header size to [10240].
Sep 12, 2020 10:18:20.412 AM INFO com.inversoft.maintenance.db.JDBCMaintenanceModeDatabaseService - Database Version [1.19.0]
Sep 12, 2020 10:18:20.412 AM INFO com.inversoft.maintenance.db.JDBCMaintenanceModeDatabaseService - Latest Migration Version [1.18.2]
Sep 12, 2020 10:18:20.414 AM INFO io.fusionauth.app.maintenance.FusionAuthMaintenanceModeWorkflow - Determine database status : ACTIVE
Sep 12, 2020 10:18:20.417 AM INFO io.fusionauth.app.maintenance.FusionAuthMaintenanceModeWorkflow - Determine search status : SERVER_DOWN [http://localhost:9021]
Sep 12, 2020 10:18:20.418 AM INFO org.primeframework.mvc.servlet.PrimeServletContextListener - Initializing Prime
Sep 12, 2020 10:18:20.418 AM INFO io.fusionauth.app.maintenance.guice.FusionAuthMaintenanceModeModule -
Screenshots
tty: ignoring all arguments
not a tty
You are using a deprecated configuration property of [fusionauth-app.cookie-same-site-policy] in [fusionauth.properties]. The new variable name is [fusionauth-app.http.cookie.same-site-policy]
NOTE: Picked up JDK_JAVA_OPTIONS: --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
NOTE: Picked up JDK_JAVA_OPTIONS: --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
12-Sep-2020 09:58:52.974 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [/opt/openjdk/lib/server:/opt/openjdk/lib:/opt/openjdk/../lib:/usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib]
12-Sep-2020 09:58:53.303 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-9011"]
12-Sep-2020 09:58:53.327 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
12-Sep-2020 09:58:53.345 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["https-jsse-nio-9013"]
12-Sep-2020 09:58:53.615 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
12-Sep-2020 09:58:53.623 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-127.0.0.1-9019"]
12-Sep-2020 09:58:53.624 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
12-Sep-2020 09:58:53.625 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 1134 ms
12-Sep-2020 09:58:53.633 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
12-Sep-2020 09:58:53.633 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.5.53
Sep 12, 2020 9:58:55 AM org.apache.jasper.servlet.TldScanner scanJars
INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
2020-09-12 9:58:55.844 AM INFO io.fusionauth.api.configuration.PropertiesFileFusionAuthConfiguration - Loading FusionAuth configuration file [/usr/local/fusionauth/config/fusionauth.properties]
2020-09-12 9:58:55.858 AM INFO io.fusionauth.api.configuration.PropertiesFileFusionAuthConfiguration - Dynamically set property [fusionauth-app.url] set to [http://10.244.0.129:9011]
2020-09-12 9:58:55.859 AM INFO com.inversoft.configuration.BasePropertiesFileInversoftConfiguration -
- Overriding default value of property [database.mysql.enforce-utf8mb4] with value [true]
- Overriding default value of property [database.mysql.connector-version] with value [8.0.21]
- Overriding default value of property [SEARCH_TYPE] with value [elasticsearch]
- Overriding default value of property [fusionauth-app.http.max-header-size] with value [10240]
2020-09-12 9:58:55.860 AM WARN com.inversoft.configuration.BasePropertiesFileInversoftConfiguration - Your FusionAuth configuration file [/usr/local/fusionauth/fusionauth-app/apache-tomcat/../../config/fusionauth.properties] needs attention. Here are the warnings:
- You are using a deprecated configuration property name of [DATABASE_ROOT_USER]. The new allowed names for that property are [database.root.username]
2020-09-12 9:58:56.551 AM INFO io.fusionauth.api.configuration.PropertiesFileFusionAuthConfiguration - Loading FusionAuth configuration file [/usr/local/fusionauth/config/fusionauth.properties]
2020-09-12 9:58:56.552 AM INFO io.fusionauth.api.configuration.PropertiesFileFusionAuthConfiguration - Dynamically set property [fusionauth-app.url] set to [http://10.244.0.129:9011]
2020-09-12 9:58:56.552 AM INFO com.inversoft.configuration.BasePropertiesFileInversoftConfiguration -
- Overriding default value of property [database.mysql.enforce-utf8mb4] with value [true]
- Overriding default value of property [database.mysql.connector-version] with value [8.0.21]
- Overriding default value of property [SEARCH_TYPE] with value [elasticsearch]
- Overriding default value of property [fusionauth-app.http.max-header-size] with value [10240]
2020-09-12 9:58:56.552 AM WARN com.inversoft.configuration.BasePropertiesFileInversoftConfiguration - Your FusionAuth configuration file [/usr/local/fusionauth/fusionauth-app/apache-tomcat/../../config/fusionauth.properties] needs attention. Here are the warnings:
- You are using a deprecated configuration property name of [DATABASE_ROOT_USER]. The new allowed names for that property are [database.root.username]
2020-09-12 9:58:56.689 AM INFO com.inversoft.maintenance.DefaultMaintenanceModeSilentConfigurationWorkflow -
---------------------------------------------------------------------------------------------------------
---------------------------------- Entering Silent Configuration Mode -----------------------------------
---------------------------------------------------------------------------------------------------------
2020-09-12 9:58:56.701 AM ERROR com.inversoft.maintenance.db.DatabaseSilentConfigurationWorkflowTask - Encountered an error while running silent mode
java.lang.IllegalStateException: Unable to capture database lock. This indicates that the database either doesn't support locks or is misconfigured.
at com.inversoft.maintenance.db.JDBCMaintenanceModeDatabaseService.lockDatabase(JDBCMaintenanceModeDatabaseService.java:284)
at com.inversoft.maintenance.db.DatabaseSilentConfigurationWorkflowTask.perform(DatabaseSilentConfigurationWorkflowTask.java:43)
at com.inversoft.maintenance.DefaultMaintenanceModeSilentConfigurationWorkflow.perform(DefaultMaintenanceModeSilentConfigurationWorkflow.java:40)
at com.inversoft.maintenance.servlet.MaintenanceModePrimeServletContextListener.contextInitialized(MaintenanceModePrimeServletContextListener.java:53)
at io.fusionauth.app.primeframework.FusionAuthAppPrimeServletContextListener.contextInitialized(FusionAuthAppPrimeServletContextListener.java:28)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4701)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5167)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1412)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1402)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
at java.base/java.lang.Thread.run(Thread.java:832)
Caused by: java.sql.SQLException: No suitable driver found for jdbc:mysql://something.ap-southeast-1.rds.amazonaws.com:3306/mysql
at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:702)
at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:228)
at com.inversoft.maintenance.db.JDBCMaintenanceModeDatabaseService.lockDatabase(JDBCMaintenanceModeDatabaseService.java:267)
... 13 common frames omitted
2020-09-12 9:58:56.701 AM INFO org.primeframework.mvc.servlet.PrimeServletContextListener - Initializing Prime
2020-09-12 9:58:56.815 AM INFO io.fusionauth.api.configuration.PropertiesFileFusionAuthConfiguration - Loading FusionAuth configuration file [/usr/local/fusionauth/config/fusionauth.properties]
2020-09-12 9:58:56.815 AM INFO io.fusionauth.api.configuration.PropertiesFileFusionAuthConfiguration - Dynamically set property [fusionauth-app.url] set to [http://10.244.0.129:9011]
2020-09-12 9:58:56.816 AM INFO com.inversoft.configuration.BasePropertiesFileInversoftConfiguration -
- Overriding default value of property [database.mysql.enforce-utf8mb4] with value [true]
- Overriding default value of property [database.mysql.connector-version] with value [8.0.21]
- Overriding default value of property [SEARCH_TYPE] with value [elasticsearch]
- Overriding default value of property [fusionauth-app.http.max-header-size] with value [10240]
2020-09-12 9:58:56.816 AM WARN com.inversoft.configuration.BasePropertiesFileInversoftConfiguration - Your FusionAuth configuration file [/usr/local/fusionauth/fusionauth-app/apache-tomcat/../../config/fusionauth.properties] needs attention. Here are the warnings:
- You are using a deprecated configuration property name of [DATABASE_ROOT_USER]. The new allowed names for that property are [database.root.username]
12-Sep-2020 09:58:56.852 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-9011"]
12-Sep-2020 09:58:56.920 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["https-jsse-nio-9013"]
12-Sep-2020 09:58:56.981 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-127.0.0.1-9019"]
12-Sep-2020 09:58:57.047 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 3421 ms
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.inversoft.lang.ClassLoaderTools (file:/usr/local/fusionauth/fusionauth-app/web/WEB-INF/lib/inversoft-database-0.5.2.jar) to method java.net.URLClassLoader.addURL(java.net.URL)
WARNING: Please consider reporting this to the maintainers of com.inversoft.lang.ClassLoaderTools
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Sep 12, 2020 10:02:53 AM org.elasticsearch.client.sniff.Sniffer run
SEVERE: error while sniffing nodes
java.lang.RuntimeException
at org.elasticsearch.client.RestClient.extractAndWrapCause(RestClient.java:857)
at org.elasticsearch.client.RestClient.performRequest(RestClient.java:259)
at org.elasticsearch.client.RestClient.performRequest(RestClient.java:246)
at org.elasticsearch.client.sniff.ElasticsearchNodesSniffer.sniff(ElasticsearchNodesSniffer.java:105)
at org.elasticsearch.client.sniff.Sniffer.sniff(Sniffer.java:209)
at org.elasticsearch.client.sniff.Sniffer$Task.run(Sniffer.java:139)
at org.elasticsearch.client.sniff.Sniffer$1.run(Sniffer.java:82)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
at java.base/java.lang.Thread.run(Thread.java:832)
Caused by: java.nio.channels.CancelledKeyException
at java.base/sun.nio.ch.SelectionKeyImpl.ensureValid(SelectionKeyImpl.java:74)
at java.base/sun.nio.ch.SelectionKeyImpl.interestOps(SelectionKeyImpl.java:93)
at org.apache.http.impl.nio.reactor.IOSessionImpl.getEventMask(IOSessionImpl.java:136)
at org.apache.http.impl.nio.DefaultNHttpClientConnection.consumeInput(DefaultNHttpClientConnection.java:264)
at org.apache.http.impl.nio.client.InternalIODispatch.onInputReady(InternalIODispatch.java:81)
at org.apache.http.impl.nio.client.InternalIODispatch.onInputReady(InternalIODispatch.java:39)
at org.apache.http.impl.nio.reactor.AbstractIODispatch.inputReady(AbstractIODispatch.java:114)
at org.apache.http.impl.nio.reactor.BaseIOReactor.readable(BaseIOReactor.java:162)
at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(AbstractIOReactor.java:337)
at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents(AbstractIOReactor.java:315)
at org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:276)
at org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:104)
at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:591)
... 1 more
Sep 12, 2020 10:03:11 AM org.elasticsearch.client.sniff.Sniffer run
SEVERE: error while sniffing nodes
org.apache.http.ConnectionClosedException: Connection closed unexpectedly
at org.elasticsearch.client.RestClient.extractAndWrapCause(RestClient.java:839)
at org.elasticsearch.client.RestClient.performRequest(RestClient.java:259)
at org.elasticsearch.client.RestClient.performRequest(RestClient.java:246)
at org.elasticsearch.client.sniff.ElasticsearchNodesSniffer.sniff(ElasticsearchNodesSniffer.java:105)
at org.elasticsearch.client.sniff.Sniffer.sniff(Sniffer.java:209)
at org.elasticsearch.client.sniff.Sniffer$Task.run(Sniffer.java:139)
at org.elasticsearch.client.sniff.Sniffer$1.run(Sniffer.java:82)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
at java.base/java.lang.Thread.run(Thread.java:832)
Caused by: org.apache.http.ConnectionClosedException: Connection closed unexpectedly
at org.apache.http.nio.protocol.HttpAsyncRequestExecutor.closed(HttpAsyncRequestExecutor.java:146)
at org.apache.http.impl.nio.client.InternalIODispatch.onClosed(InternalIODispatch.java:71)
at org.apache.http.impl.nio.client.InternalIODispatch.onClosed(InternalIODispatch.java:39)
at org.apache.http.impl.nio.reactor.AbstractIODispatch.disconnected(AbstractIODispatch.java:100)
at org.apache.http.impl.nio.reactor.BaseIOReactor.sessionClosed(BaseIOReactor.java:277)
at org.apache.http.impl.nio.reactor.AbstractIOReactor.processClosedSessions(AbstractIOReactor.java:449)
at org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:283)
at org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:104)
at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:591)
... 1 more
I can confirm that mysql-connector-java-8.0.21.jar exists inside the Docker container, but for some reason it cannot use it:
Also shows same issue as #852 (but this one is different issue). Setting FUSIONAUTH_SEARCH_ENGINE_TYPE: database has no effect on "No suitable driver found for jdbc:mysql" issue.
The text was updated successfully, but these errors were encountered:
ceefour
changed the title
After upgrading to 1.19.3: java.sql.SQLException: No suitable driver found for jdbc:mysql://something.rds.amazonaws.com:3306/mysql
After upgrading to 1.19.0 - 1.19.3: java.sql.SQLException: No suitable driver found for jdbc:mysql://something.rds.amazonaws.com:3306/mysql
Sep 12, 2020
This looks to be a bug. I believe what is happening is that the silent mode lock check is happening before we download the JDBC connector.
Since you now see the Jar in the classpath, it should work the second time through. Another work around I think is to go through maintenance mode instead of using silent mode.
You can disable silent mode by setting fusionauth-app.silent-mode=false or using the environment variable FUSIONAUTH_APP_SILENT_MODE=false.
Since you now see the Jar in the classpath, it should work the second time through. Another work around I think is to go through maintenance mode instead of using silent mode.
@robotdan problem is that in Kubernetes I don't think there's a way to "restart" a pod for "second time".
Anyway, I'm happy that this is scheduled for 1.19.4, thank you! 👍 Currently I'm sticking with 1.18.8 which is working great (and I had no problems with 1.17.3 anyway... but I was worried that if I stay to long with old versions, it'll be too hard to upgrade later on).
After upgrading to 1.19.3: java.sql.SQLException: No suitable driver found for jdbc:mysql://something.rds.amazonaws.com:3306/mysql
Description
Was working fine with 1.17.3. After upgrading to 1.19.3, FusionAuth failed to connect to MySQL with a weird error.
Affects versions
Steps to reproduce
Steps to reproduce the behavior:
Setting Helm value
database.tls
to eithertrue
orfalse
has no effect. (My configuration usestrue
which means JDBC url contains?sslmode=require
)Expected behavior
Runs, just like in FusionAuth 1.17.3 or 1.18.8. Below is log for 1.18.8 but using database that was already upgraded to 1.19.0.
Screenshots
I can confirm that
mysql-connector-java-8.0.21.jar
exists inside the Docker container, but for some reason it cannot use it:Platform
Additional context
Similar error to #364 but cause is different.
Also shows same issue as #852 (but this one is different issue). Setting
FUSIONAUTH_SEARCH_ENGINE_TYPE: database
has no effect on "No suitable driver found for jdbc:mysql" issue.The text was updated successfully, but these errors were encountered: