[2.3.1] Unable to connect to MySQL server that is not localhost
jwflory opened this issue · 10 comments
Hello,
I was using the latest version of CommunityBridge (2.3.1), and I had changed the database.binding-address option to just my server IP. For example…
...
binding-address: 555.55.55.555
...
However, immediately upon reloading my configuration, I was greeted by this error.
INFO (CONSOLE) Reloading CommunityBridge configuration...
INFO Detected locale: en
WARN The achievements.yml file is empty.
ERROR Could not connect to MySQL Server:The configuration parameter "localSocketAddress" has been set to a network interface not available for use by the JVM.
ERROR Disabling CommunityBridge due to previous error.
INFO Reload succeeded. Loaded from: config.yml
I dug through your code a bit to see if I could find anything related to this error since it wasn't in the config.yml file, and I was able to find this. https://github.com/iain-davis/CommunityBridge/blob/development/src/org/communitybridge/main/DatabaseHandler.java#L39
So, after that, I went back to the configuration and tried this…
...
binding-address: jdbc:mysql://555.55.55.555
...
And after reloading the configuration…
INFO (CONSOLE) Reloading CommunityBridge configuration...
INFO Detected locale: en
WARN The achievements.yml file is empty.
ERROR Could not connect to MySQL Server:Communications link failure
INFO The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
ERROR Disabling CommunityBridge due to previous error.
INFO Reload succeeded. Loaded from: config.yml
I traded one error for another error.
Any ideas on what is going wrong here?
Thanks!
Binding address should not be the address of the MySQL server. It is the address that the MySQL client "binds" to on the Minecraft Server. Usually it is localhost, but in some hosting situations it won't be. For example, a machine may have multiple addresses and require different programs bind to different addresses.
That last one is a separate issue (See #171). Apparently there is a version of Minecraft (which are you using?) that changed the behavior of getStringList (it used to return an empty list, but now is returning null, when the property is unavailable).
I'm hoping in around my evening appointments this evening that I can get that bug and another fixed and another release put out.
Ohh, I see. Well, I just tried both the localhost option and the minecraft option, and here were my results.
localhost:
[18:02:06] [Server thread/INFO]: [CommunityBridge] (CONSOLE) Reloading CommunityBridge configuration...
[18:02:06] [Server thread/INFO]: [CommunityBridge] Detected locale: en
[18:02:06] [Server thread/WARN]: [CommunityBridge] The achievements.yml file is empty.
[18:02:06] [Server thread/ERROR]: [CommunityBridge] Could not connect to MySQL Server:Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
[18:02:06] [Server thread/ERROR]: [CommunityBridge] Disabling CommunityBridge due to previous error.
[18:02:06] [Server thread/INFO]: [CommunityBridge] Reload succeeded. Loaded from: config.yml
minecraft:
[18:12:41] [Server thread/INFO]: [CommunityBridge] (CONSOLE) Reloading CommunityBridge configuration...
[18:12:41] [Server thread/INFO]: [CommunityBridge] Detected locale: en
[18:12:41] [Server thread/WARN]: [CommunityBridge] The achievements.yml file is empty.
[18:12:41] [Server thread/WARN]: Unexpected exception while parsing console command "cbreload"
org.bukkit.command.CommandException: Unhandled exception executing command 'cbreload' in plugin CommunityBridge v2.3.1.431
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) ~[spigot.jar:git-Spigot-1455]
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:180) ~[spigot.jar:git-Spigot-1455]
at org.bukkit.craftbukkit.v1_7_R3.CraftServer.dispatchCommand(CraftServer.java:722) ~[spigot.jar:git-Spigot-1455]
at org.bukkit.craftbukkit.v1_7_R3.CraftServer.dispatchServerCommand(CraftServer.java:709) [spigot.jar:git-Spigot-1455]
at net.minecraft.server.v1_7_R3.DedicatedServer.aB(DedicatedServer.java:319) [spigot.jar:git-Spigot-1455]
at net.minecraft.server.v1_7_R3.DedicatedServer.v(DedicatedServer.java:284) [spigot.jar:git-Spigot-1455]
at net.minecraft.server.v1_7_R3.MinecraftServer.u(MinecraftServer.java:576) [spigot.jar:git-Spigot-1455]
at net.minecraft.server.v1_7_R3.MinecraftServer.run(MinecraftServer.java:482) [spigot.jar:git-Spigot-1455]
at net.minecraft.server.v1_7_R3.ThreadServerApplication.run(SourceFile:628) [spigot.jar:git-Spigot-1455]
Caused by: java.lang.NullPointerException
at org.communitybridge.main.Configuration.analyze(Configuration.java:517) ~[?:?]
at org.communitybridge.main.CommunityBridge.enableSQL(CommunityBridge.java:336) ~[?:?]
at org.communitybridge.main.CommunityBridge.activate(CommunityBridge.java:89) ~[?:?]
at org.communitybridge.main.Configuration.reload(Configuration.java:1181) ~[?:?]
at org.communitybridge.main.CBCommandExecutor.commandReload(CBCommandExecutor.java:145) ~[?:?]
at org.communitybridge.main.CBCommandExecutor.onCommand(CBCommandExecutor.java:47) ~[?:?]
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[spigot.jar:git-Spigot-1455]
... 8 more
@iain-davis I am using the latest version of Spigot v1465, which is standard 1.7.9.
New release which fixes a couple of bugs. I recommend setting the 'binding-address' configuration option to blank or remove it entirely; as I've changed its behavior again.
You can find the new version here: http://dev.bukkit.org/bukkit-plugins/communitybridge-fm/files/31-community-bridge-v2-3-2-build-437/
@iain-davis: Seems like solving one issue has lead to another!
I am using v2.3.2.437. For the binding-address option, I left it blank as you recommended. I also did have groups set as default. I think the issue last time was that I didn't have the tick marks for each group.
[21:00:05] [Server thread/ERROR]: Error occurred while enabling CommunityBridge v2.3.2.437 (Is it up to date?)
java.lang.NullPointerException
at org.communitybridge.main.Configuration.analyze(Configuration.java:511) ~[?:?]
at org.communitybridge.main.CommunityBridge.enableSQL(CommunityBridge.java:336) ~[?:?]
at org.communitybridge.main.CommunityBridge.activate(CommunityBridge.java:89) ~[?:?]
at org.communitybridge.main.CommunityBridge.onEnable(CommunityBridge.java:68) ~[?:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:250) ~[spigot.jar:git-Spigot-1465]
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:324) [spigot.jar:git-Spigot-1465]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:405) [spigot.jar:git-Spigot-1465]
at org.bukkit.craftbukkit.v1_7_R3.CraftServer.loadPlugin(CraftServer.java:467) [spigot.jar:git-Spigot-1465]
at org.bukkit.craftbukkit.v1_7_R3.CraftServer.enablePlugins(CraftServer.java:385) [spigot.jar:git-Spigot-1465]
at net.minecraft.server.v1_7_R3.MinecraftServer.n(MinecraftServer.java:359) [spigot.jar:git-Spigot-1465]
at net.minecraft.server.v1_7_R3.MinecraftServer.g(MinecraftServer.java:333) [spigot.jar:git-Spigot-1465]
at net.minecraft.server.v1_7_R3.MinecraftServer.a(MinecraftServer.java:289) [spigot.jar:git-Spigot-1465]
at net.minecraft.server.v1_7_R3.DedicatedServer.init(DedicatedServer.java:193) [spigot.jar:git-Spigot-1465]
at net.minecraft.server.v1_7_R3.MinecraftServer.run(MinecraftServer.java:450) [spigot.jar:git-Spigot-1465]
at net.minecraft.server.v1_7_R3.ThreadServerApplication.run(SourceFile:628) [spigot.jar:git-Spigot-1465]
[21:00:32] [Server thread/INFO]: [CommunityBridge] (CONSOLE) Reloading CommunityBridge configuration...
[21:00:32] [Server thread/INFO]: [CommunityBridge] Detected locale: en
[21:00:32] [Server thread/WARN]: [CommunityBridge] The achievements.yml file is empty.
[21:00:32] [Server thread/WARN]: Unexpected exception while parsing console command "cbreload"
org.bukkit.command.CommandException: Unhandled exception executing command 'cbreload' in plugin CommunityBridge v2.3.2.437
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) ~[spigot.jar:git-Spigot-1465]
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:180) ~[spigot.jar:git-Spigot-1465]
at org.bukkit.craftbukkit.v1_7_R3.CraftServer.dispatchCommand(CraftServer.java:728) ~[spigot.jar:git-Spigot-1465]
at org.bukkit.craftbukkit.v1_7_R3.CraftServer.dispatchServerCommand(CraftServer.java:715) [spigot.jar:git-Spigot-1465]
at net.minecraft.server.v1_7_R3.DedicatedServer.aB(DedicatedServer.java:319) [spigot.jar:git-Spigot-1465]
at net.minecraft.server.v1_7_R3.DedicatedServer.v(DedicatedServer.java:284) [spigot.jar:git-Spigot-1465]
at net.minecraft.server.v1_7_R3.MinecraftServer.u(MinecraftServer.java:576) [spigot.jar:git-Spigot-1465]
at net.minecraft.server.v1_7_R3.MinecraftServer.run(MinecraftServer.java:482) [spigot.jar:git-Spigot-1465]
at net.minecraft.server.v1_7_R3.ThreadServerApplication.run(SourceFile:628) [spigot.jar:git-Spigot-1465]
Caused by: java.lang.NullPointerException
at org.communitybridge.main.Configuration.analyze(Configuration.java:511) ~[?:?]
at org.communitybridge.main.CommunityBridge.enableSQL(CommunityBridge.java:336) ~[?:?]
at org.communitybridge.main.CommunityBridge.activate(CommunityBridge.java:89) ~[?:?]
at org.communitybridge.main.Configuration.reload(Configuration.java:1168) ~[?:?]
at org.communitybridge.main.CBCommandExecutor.commandReload(CBCommandExecutor.java:145) ~[?:?]
at org.communitybridge.main.CBCommandExecutor.onCommand(CBCommandExecutor.java:47) ~[?:?]
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[spigot.jar:git-Spigot-1465]
... 8 more
For what it's worth, I tried downgrading to v2.3.1 and I received this as my output.
[21:09:39] [Server thread/INFO]: [CommunityBridge] Enabling CommunityBridge v2.3.1.431
[21:09:39] [Server thread/INFO]: [CommunityBridge] Detected locale: en
[21:09:39] [Server thread/WARN]: [CommunityBridge] The achievements.yml file is empty.
[21:09:39] [Server thread/INFO]: [CommunityBridge] Log level : config
<insert normal startup info here>
[21:09:39] [Server thread/ERROR]: [CommunityBridge] Could not connect to MySQL Server:Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
[21:09:39] [Server thread/ERROR]: [CommunityBridge] Disabling CommunityBridge due to previous error.
Same issue actually except this time the default list I set wasn't returned either. Give this one a try:
https://github.com/iain-davis/CommunityBridge-Files/blob/master/CommunityBridge.jar
@iain-davis: Sadly, I'm having the same issue again.
[10:04:07] [Server thread/INFO]: [CommunityBridge] Enabling CommunityBridge v2.3.3.439
[10:04:07] [Server thread/INFO]: [CommunityBridge] Detected locale: en
[10:04:07] [Server thread/WARN]: [CommunityBridge] The achievements.yml file is empty.
[10:04:07] [Server thread/INFO]: [CommunityBridge] Log level : config
[10:04:07] [Server thread/INFO]: [CommunityBridge] Plugin metrics enabled : true
[10:04:07] [Server thread/INFO]: [CommunityBridge] Use achievements : false
[10:04:07] [Server thread/INFO]: [CommunityBridge] Permissions system : PEX
[10:04:07] [Server thread/INFO]: [CommunityBridge] Economy enabled : false
[10:04:07] [Server thread/INFO]: [CommunityBridge] Autosync : true
[10:04:07] [Server thread/INFO]: [CommunityBridge] Autosync every : 20 minutes
[10:04:07] [Server thread/INFO]: [CommunityBridge] Synchronize during join event : true
[10:04:07] [Server thread/INFO]: [CommunityBridge] Synchronize during quit event : true
[10:04:07] [Server thread/INFO]: [CommunityBridge] Application url : http://crystalcraftmc.com
[10:04:07] [Server thread/INFO]: [CommunityBridge] Date Format : yyyy-MM-dd hh:mm:ss a
[10:04:07] [Server thread/INFO]: [CommunityBridge] Database hostname : [censored]
[10:04:07] [Server thread/INFO]: [CommunityBridge] Database port : [censored]
[10:04:07] [Server thread/INFO]: [CommunityBridge] Database name : [censored]
[10:04:07] [Server thread/INFO]: [CommunityBridge] Database username : [censored]
[10:04:07] [Server thread/INFO]: [CommunityBridge] Linking auto reminder : true
[10:04:07] [Server thread/INFO]: [CommunityBridge] Linking auto reminder every : 10 minutes
[10:04:07] [Server thread/INFO]: [CommunityBridge] Linking notify registered : false
[10:04:07] [Server thread/INFO]: [CommunityBridge] Linking notify unregistered : true
[10:04:07] [Server thread/INFO]: [CommunityBridge] Linking kick unregistered : false
[10:04:07] [Server thread/INFO]: [CommunityBridge] Linking unregistered group : default
[10:04:07] [Server thread/INFO]: [CommunityBridge] Linking registered group : Members
[10:04:07] [Server thread/INFO]: [CommunityBridge] Linking notify player of group : true
[10:04:07] [Server thread/INFO]: [CommunityBridge] Linking reg former unregistered only : true
[10:04:07] [Server thread/INFO]: [CommunityBridge] Linking uses key-value pair : false
[10:04:07] [Server thread/INFO]: [CommunityBridge] Linking table name : xf_user
[10:04:07] [Server thread/INFO]: [CommunityBridge] Linking user ID column : user_id
[10:04:07] [Server thread/INFO]: [CommunityBridge] Linking player name column : uuid
[10:04:07] [Server thread/INFO]: [CommunityBridge] Avatars config enabled : false
[10:04:07] [Server thread/INFO]: [CommunityBridge] Post count config enabled : true
[10:04:07] [Server thread/INFO]: [CommunityBridge] Post count table name : xf_user
[10:04:07] [Server thread/INFO]: [CommunityBridge] Post count user ID column : user_id
[10:04:07] [Server thread/INFO]: [CommunityBridge] Post count post count column : message_count
[10:04:07] [Server thread/INFO]: [CommunityBridge] Require avatars : false
[10:04:07] [Server thread/INFO]: [CommunityBridge] Require minimum posts : false
[10:04:07] [Server thread/INFO]: [CommunityBridge] Tracking statistics : false
[10:04:07] [Server thread/INFO]: [CommunityBridge] Primary group table : xf_user
[10:04:07] [Server thread/INFO]: [CommunityBridge] Primary group user id column : user_id
[10:04:07] [Server thread/INFO]: [CommunityBridge] Primary group group id column : user_group_id
[10:04:07] [Server thread/INFO]: [CommunityBridge] Primary group uses key : false
[10:04:07] [Server thread/INFO]: [CommunityBridge] Secondary group table : xf_user
[10:04:07] [Server thread/INFO]: [CommunityBridge] Secondary group user id column : user_id
[10:04:07] [Server thread/INFO]: [CommunityBridge] Secondary group group id column : secondary_group_ids
[10:04:07] [Server thread/INFO]: [CommunityBridge] Secondary group storage method : single
[10:04:07] [Server thread/INFO]: [CommunityBridge] Secondary group id delimiter : ,
[10:04:07] [Server thread/INFO]: [CommunityBridge] Simple synchronization enabled : true
[10:04:07] [Server thread/INFO]: [CommunityBridge] Simple synchronization direction : two-way
[10:04:07] [Server thread/INFO]: [CommunityBridge] Simple synchronization firstdirection: web-application
[10:04:07] [Server thread/INFO]: [CommunityBridge] Simple synchronization notification : true
[10:04:07] [Server thread/INFO]: [CommunityBridge] Simple synchronization P-groups : [Members, Moderators, Admins, Owners]
[10:04:07] [Server thread/INFO]: [CommunityBridge] Ban synchronization enabled : false
[10:04:07] [Server thread/ERROR]: Error occurred while enabling CommunityBridge v2.3.3.439 (Is it up to date?)
java.lang.NullPointerException
at org.communitybridge.main.Configuration.analyze(Configuration.java:511) ~[?:?]
at org.communitybridge.main.CommunityBridge.enableSQL(CommunityBridge.java:336) ~[?:?]
at org.communitybridge.main.CommunityBridge.activate(CommunityBridge.java:89) ~[?:?]
at org.communitybridge.main.CommunityBridge.onEnable(CommunityBridge.java:68) ~[?:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:250) ~[spigot.jar:git-Spigot-1465]
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:324) [spigot.jar:git-Spigot-1465]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:405) [spigot.jar:git-Spigot-1465]
at org.bukkit.craftbukkit.v1_7_R3.CraftServer.loadPlugin(CraftServer.java:467) [spigot.jar:git-Spigot-1465]
at org.bukkit.craftbukkit.v1_7_R3.CraftServer.enablePlugins(CraftServer.java:385) [spigot.jar:git-Spigot-1465]
at net.minecraft.server.v1_7_R3.MinecraftServer.n(MinecraftServer.java:359) [spigot.jar:git-Spigot-1465]
at net.minecraft.server.v1_7_R3.MinecraftServer.g(MinecraftServer.java:333) [spigot.jar:git-Spigot-1465]
at net.minecraft.server.v1_7_R3.MinecraftServer.a(MinecraftServer.java:289) [spigot.jar:git-Spigot-1465]
at net.minecraft.server.v1_7_R3.DedicatedServer.init(DedicatedServer.java:193) [spigot.jar:git-Spigot-1465]
at net.minecraft.server.v1_7_R3.MinecraftServer.run(MinecraftServer.java:450) [spigot.jar:git-Spigot-1465]
at net.minecraft.server.v1_7_R3.ThreadServerApplication.run(SourceFile:628) [spigot.jar:git-Spigot-1465]
[10:04:43] [Server thread/INFO]: [CommunityBridge] (CONSOLE) Reloading CommunityBridge configuration...
[10:04:43] [Server thread/INFO]: [CommunityBridge] Detected locale: en
[10:04:43] [Server thread/WARN]: [CommunityBridge] The achievements.yml file is empty.
[10:04:43] [Server thread/WARN]: Unexpected exception while parsing console command "cbreload"
org.bukkit.command.CommandException: Unhandled exception executing command 'cbreload' in plugin CommunityBridge v2.3.3.439
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) ~[spigot.jar:git-Spigot-1465]
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:180) ~[spigot.jar:git-Spigot-1465]
at org.bukkit.craftbukkit.v1_7_R3.CraftServer.dispatchCommand(CraftServer.java:728) ~[spigot.jar:git-Spigot-1465]
at org.bukkit.craftbukkit.v1_7_R3.CraftServer.dispatchServerCommand(CraftServer.java:715) [spigot.jar:git-Spigot-1465]
at net.minecraft.server.v1_7_R3.DedicatedServer.aB(DedicatedServer.java:319) [spigot.jar:git-Spigot-1465]
at net.minecraft.server.v1_7_R3.DedicatedServer.v(DedicatedServer.java:284) [spigot.jar:git-Spigot-1465]
at net.minecraft.server.v1_7_R3.MinecraftServer.u(MinecraftServer.java:576) [spigot.jar:git-Spigot-1465]
at net.minecraft.server.v1_7_R3.MinecraftServer.run(MinecraftServer.java:482) [spigot.jar:git-Spigot-1465]
at net.minecraft.server.v1_7_R3.ThreadServerApplication.run(SourceFile:628) [spigot.jar:git-Spigot-1465]
Caused by: java.lang.NullPointerException
at org.communitybridge.main.Configuration.analyze(Configuration.java:511) ~[?:?]
at org.communitybridge.main.CommunityBridge.enableSQL(CommunityBridge.java:336) ~[?:?]
at org.communitybridge.main.CommunityBridge.activate(CommunityBridge.java:89) ~[?:?]
at org.communitybridge.main.Configuration.reload(Configuration.java:1170) ~[?:?]
at org.communitybridge.main.CBCommandExecutor.commandReload(CBCommandExecutor.java:145) ~[?:?]
at org.communitybridge.main.CBCommandExecutor.onCommand(CBCommandExecutor.java:47) ~[?:?]
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[spigot.jar:git-Spigot-1465]
... 8 more