Dynmap-Forge/Fabric

Dynmap-Forge/Fabric

888k Downloads

Failed connections to multiple MySql versions in the most recent DynMap versions

jchoyt opened this issue ยท 11 comments

commented

Issue Description: Dynmap won't connect to a known-working MySql server. This may be a duplicate of issue #3277 which was closed due to age. May also be related to issue #3451 because I got that error message once as well but only the first time with the SNAPSHOT version noted below, and then it reverted to the pastebin error message. Specifics:

  • Dynmap Version: 3.3 beta 3 and beta 4 and the commit from 15 hours ago (sha c887df5)
  • Server Version: spigot 1.18.1 dated 1/17/22 (3405-Spigot-f4ff00f--d10c35e)
  • Pastebin of Configuration.txt: https://pastebin.com/FZXz5YVL
  • Server Host (if applicable): BeastNode
  • Pastebin of crashlogs or other relevant logs: https://pastebin.com/gtQSb770
  • Other Relevant Data/Screenshots: N/A
  • Steps to Replicate: Install noted versions of Spigot and DynMap (and CoreProtect 20.4, which works with MySQL)
  • Fails on MySql 5.1.73 and 5.7.23 ... but not 5.5.56
  • CoreProtect v20.4 has this problem with MySql 5.1.73, but not the other two versions and is running fine currently. The MySql server is fine, accepting connections, and working correctly. I can also connect using the CLI for mysql 8.0.27
  • JDBC driver is mysql-connector-java-8.0.27.jar

[ x ] I have looked at all other issues and this is not a duplicate of any open ticket (see above)
[ x ] I have been able to replicate this

commented

seems that dynmap has no access to the server, could be that the credentials are wrong, or the credentials are not allowed to be used externally.

commented

CoreProtect is accessing the same MySql server using the same credentials, which haven't changed since before the move to spigot 1.18.1 from 1.17.1

commented

you didn't remove the # before the flags, which is commented out rn

commented

For the extra connection flags? No, I didn't I'd rather use SSL. That flag was never in the config file before this. It came in when I blew away the old config and redid it thinking that would help.

commented

flags: "?allowReconnect=true&autoReconnect=true" these are the defaults, maybe try them?

commented

could be it cannot connect because that user is already in use by coreprotect, could you try to add another user and password and see if that fixes the problem? also you have storagetype filetree and mysql defined, only one is supported, comment out the type:filetree at line 26 in configuration.txt

commented

Tried. No change, but thank you for the suggestion.

commented

Oh VERY nice catch. Dangers of trashing the old config file...

Unfortunately I can't add a second user because that's out of my control (hosting company sets this). Besides, this configuration has been working for years.

Sadly still didn't work. I'm just going to keep building new versions, I guess.

commented

The only remedy is to turn off SSL connections to the DB server. Which is sad, but at least a lead. I tried five different 3.3 beta builds and all failed.

commented

You're getting into useSSL behaviors, which have 'evolved' in the MySQL world over time:

"Wed Jan 06 12:03:21 SGT 2021 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification." (from https://www.b4x.com/android/forum/threads/solved-server-warning-when-using-mysql-connector-java-5-1-49-bin.126226/) - the default behaviors are server vs JDBC specific, which is a headache.

So, unless you've got a trust store, useSSL=false is an option, or useSSL=true&verifyServerCertificate=false might be an option (that would do an encrypted link while not needing the certificate required to verify the identity of the server to be installed in a local trust store, which is what is needed to verify a server certificate for MySQL).

commented

Thank you....very helpful.. I'll make sure my hosting company knows.