Ban Management

Ban Management

193k Downloads

Paper 65 (1.14.2) and BM 6.0.1 MySQL Connection error

jascotty2 opened this issue ยท 3 comments

commented

Having an error on our main server that's not showing up on my test server:

[21:17:47] [Server thread/WARN]: java.sql.SQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 10 times. Giving up.
[21:17:47] [Server thread/WARN]: 	at me.confuser.banmanager.internal.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:110)
[21:17:47] [Server thread/WARN]: 	at me.confuser.banmanager.internal.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
[21:17:47] [Server thread/WARN]: 	at me.confuser.banmanager.internal.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:89)
[21:17:47] [Server thread/WARN]: 	at me.confuser.banmanager.internal.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:63)
[21:17:47] [Server thread/WARN]: 	at me.confuser.banmanager.internal.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:73)
[21:17:47] [Server thread/WARN]: 	at me.confuser.banmanager.internal.mysql.cj.jdbc.ConnectionImpl.connectWithRetries(ConnectionImpl.java:905)
[21:17:47] [Server thread/WARN]: 	at me.confuser.banmanager.internal.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:830)
[21:17:47] [Server thread/WARN]: 	at me.confuser.banmanager.internal.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:455)
[21:17:47] [Server thread/WARN]: 	at me.confuser.banmanager.internal.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:240)
[21:17:47] [Server thread/WARN]: 	at me.confuser.banmanager.internal.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:199)
[21:17:47] [Server thread/WARN]: 	at me.confuser.banmanager.internal.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138)
[21:17:47] [Server thread/WARN]: 	at me.confuser.banmanager.internal.hikari.pool.PoolBase.newConnection(PoolBase.java:353)
[21:17:47] [Server thread/WARN]: 	at me.confuser.banmanager.internal.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:201)
[21:17:47] [Server thread/WARN]: 	at me.confuser.banmanager.internal.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:473)
[21:17:47] [Server thread/WARN]: 	at me.confuser.banmanager.internal.hikari.pool.HikariPool.checkFailFast(HikariPool.java:562)
[21:17:47] [Server thread/WARN]: 	at me.confuser.banmanager.internal.hikari.pool.HikariPool.<init>(HikariPool.java:115)
[21:17:47] [Server thread/WARN]: 	at me.confuser.banmanager.internal.hikari.HikariDataSource.getConnection(HikariDataSource.java:112)
[21:17:47] [Server thread/WARN]: 	at me.confuser.banmanager.internal.ormlite.jdbc.DataSourceConnectionSource.initialize(DataSourceConnectionSource.java:104)
[21:17:47] [Server thread/WARN]: 	at me.confuser.banmanager.internal.ormlite.jdbc.DataSourceConnectionSource.<init>(DataSourceConnectionSource.java:71)
[21:17:47] [Server thread/WARN]: 	at me.confuser.banmanager.BanManager.setupConnection(BanManager.java:348)
[21:17:47] [Server thread/WARN]: 	at me.confuser.banmanager.BanManager.setupConnections(BanManager.java:306)
[21:17:47] [Server thread/WARN]: 	at me.confuser.banmanager.BanManager.onEnable(BanManager.java:134)
[21:17:47] [Server thread/WARN]: 	at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263)
[21:17:47] [Server thread/WARN]: 	at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:338)
[21:17:47] [Server thread/WARN]: 	at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:419)
[21:17:47] [Server thread/WARN]: 	at com.rylinaux.plugman.util.PluginUtil.load(PluginUtil.java:366)
[21:17:47] [Server thread/WARN]: 	at com.rylinaux.plugman.command.LoadCommand.execute(LoadCommand.java:114)
[21:17:47] [Server thread/WARN]: 	at com.rylinaux.plugman.PlugManCommandHandler.onCommand(PlugManCommandHandler.java:95)
[21:17:47] [Server thread/WARN]: 	at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45)
[21:17:47] [Server thread/WARN]: 	at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:159)
[21:17:47] [Server thread/WARN]: 	at org.bukkit.craftbukkit.v1_14_R1.CraftServer.dispatchCommand(CraftServer.java:736)
[21:17:47] [Server thread/WARN]: 	at org.bukkit.craftbukkit.v1_14_R1.CraftServer.dispatchServerCommand(CraftServer.java:698)
[21:17:47] [Server thread/WARN]: 	at net.minecraft.server.v1_14_R1.DedicatedServer.handleCommandQueue(DedicatedServer.java:457)
[21:17:47] [Server thread/WARN]: 	at net.minecraft.server.v1_14_R1.DedicatedServer.b(DedicatedServer.java:419)
[21:17:47] [Server thread/WARN]: 	at net.minecraft.server.v1_14_R1.MinecraftServer.a(MinecraftServer.java:1060)
[21:17:47] [Server thread/WARN]: 	at net.minecraft.server.v1_14_R1.MinecraftServer.run(MinecraftServer.java:904)
[21:17:47] [Server thread/WARN]: 	at java.lang.Thread.run(Thread.java:748)
[21:17:47] [Server thread/WARN]: Caused by: me.confuser.banmanager.internal.mysql.cj.exceptions.InvalidConnectionAttributeException: The server time zone value 'CDT' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support.
[21:17:47] [Server thread/WARN]: 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[21:17:47] [Server thread/WARN]: 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
[21:17:47] [Server thread/WARN]: 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
[21:17:47] [Server thread/WARN]: 	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
[21:17:47] [Server thread/WARN]: 	at me.confuser.banmanager.internal.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:61)
[21:17:47] [Server thread/WARN]: 	at me.confuser.banmanager.internal.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:85)
[21:17:47] [Server thread/WARN]: 	at me.confuser.banmanager.internal.mysql.cj.util.TimeUtil.getCanonicalTimezone(TimeUtil.java:132)
[21:17:47] [Server thread/WARN]: 	at me.confuser.banmanager.internal.mysql.cj.protocol.a.NativeProtocol.configureTimezone(NativeProtocol.java:2241)
[21:17:47] [Server thread/WARN]: 	at me.confuser.banmanager.internal.mysql.cj.protocol.a.NativeProtocol.initServerSession(NativeProtocol.java:2265)
[21:17:47] [Server thread/WARN]: 	at me.confuser.banmanager.internal.mysql.cj.jdbc.ConnectionImpl.initializePropsFromServer(ConnectionImpl.java:1319)
[21:17:47] [Server thread/WARN]: 	at me.confuser.banmanager.internal.mysql.cj.jdbc.ConnectionImpl.connectWithRetries(ConnectionImpl.java:868)
[21:17:47] [Server thread/WARN]: 	... 31 more

Paperspigot 65,
BanManager 6.0.1
MySQL 5.5.60-0+deb7u1-log

Works fine on MySQL 10.3.14-MariaDB
Are older database servers no longer supported, then?

commented
[21:17:47] [Server thread/WARN]: Caused by: me.confuser.banmanager.internal.mysql.cj.exceptions.InvalidConnectionAttributeException: The server time zone value 'CDT' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support.

Older databases are supported, it seems the newer mysql client has issues with mapping MySQL timezones to Java. Can you try the following build? https://ci.frostcast.net/job/BanManager/38/

commented

That build works great! Thanks!

On an off note, I can't get the project to compile with the provided POM because of a repo error - any way to fix this?

Caused by: org.apache.maven.wagon.TransferFailedException: Failed to transfer file: https://repo.dustplanet.de/artifactory/libs-release-local/net/gravitydevelopment/updater/updater/3.0.3/updater-3.0.3.pom. Return code is: 503 , ReasonPhrase:Service Unavailable.
commented

Indeed, the travis builds are failing because of it. I've opened an issue over at timbru31/updater#28 If it's not resolved soon, I'll host it on the Frostcast CI server.