aman207 / DonatorExpress

Allows members on your server to view and purchase ranks/items without any hassle.
http://dev.bukkit.org/bukkit-plugins/donator-express/
2 stars 3 forks source link

Error: "The database returned an error" #26

Closed FuzzPucker closed 11 years ago

FuzzPucker commented 11 years ago

Hello,

I'm having some odd issues with trying to use the /donate buy, and /donate upgrade commands. I can't seem to track down exactly whats causing them, it seems quite inconsistent. The primary concern is this database error that happens every once and a while. The errors are posted below.

This message is shown in-game to the player: The database returned an error. Please tell an Admin or Owner about this problem so they can investigate further.

This error shows up in the console: 2013-09-19 06:16:12 [INFO] Fuzz_Pucker issued server command: /donate upgrade 2013-09-19 06:16:12 [SEVERE] com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

The last packet successfully received from the server was 132,202 milliseconds ago. The last packet sent successfully to the server was 0 milliseconds ago. 2013-09-19 06:16:12 [SEVERE] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) 2013-09-19 06:16:12 [SEVERE] at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) 2013-09-19 06:16:12 [SEVERE] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) 2013-09-19 06:16:12 [SEVERE] at java.lang.reflect.Constructor.newInstance(Unknown Source) 2013-09-19 06:16:12 [SEVERE] at com.mysql.jdbc.Util.handleNewInstance(Util.java:407) 2013-09-19 06:16:12 [SEVERE] at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1116) 2013-09-19 06:16:12 [SEVERE] at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3082) 2013-09-19 06:16:12 [SEVERE] at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2968) 2013-09-19 06:16:12 [SEVERE] at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3516) 2013-09-19 06:16:12 [SEVERE] at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1986) 2013-09-19 06:16:12 [SEVERE] at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2140) 2013-09-19 06:16:12 [SEVERE] at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2620) 2013-09-19 06:16:12 [SEVERE] at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2570) 2013-09-19 06:16:12 [SEVERE] at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1474) 2013-09-19 06:16:12 [SEVERE] at net.targetcraft.donatorexpress.CommandListener.onCommand(CommandListener.java:843) 2013-09-19 06:16:12 [SEVERE] at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) 2013-09-19 06:16:12 [SEVERE] at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:192) 2013-09-19 06:16:12 [SEVERE] at org.bukkit.craftbukkit.v1_6_R2.CraftServer.dispatchCommand(CraftServer.java:523) 2013-09-19 06:16:12 [SEVERE] at net.minecraft.server.v1_6_R2.PlayerConnection.handleCommand(PlayerConnection.java:954) 2013-09-19 06:16:12 [SEVERE] at net.minecraft.server.v1_6_R2.PlayerConnection.chat(PlayerConnection.java:872) 2013-09-19 06:16:12 [SEVERE] at net.minecraft.server.v1_6_R2.PlayerConnection.a(PlayerConnection.java:829) 2013-09-19 06:16:12 [SEVERE] at net.minecraft.server.v1_6_R2.Packet3Chat.handle(SourceFile:49) 2013-09-19 06:16:12 [SEVERE] at net.minecraft.server.v1_6_R2.NetworkManager.b(NetworkManager.java:296) 2013-09-19 06:16:12 [SEVERE] at net.minecraft.server.v1_6_R2.PlayerConnection.e(PlayerConnection.java:116) 2013-09-19 06:16:12 [SEVERE] at net.minecraft.server.v1_6_R2.ServerConnection.b(SourceFile:37) 2013-09-19 06:16:12 [SEVERE] at net.minecraft.server.v1_6_R2.DedicatedServerConnection.b(SourceFile:30) 2013-09-19 06:16:12 [SEVERE] at net.minecraft.server.v1_6_R2.MinecraftServer.t(MinecraftServer.java:590) 2013-09-19 06:16:12 [SEVERE] at net.minecraft.server.v1_6_R2.DedicatedServer.t(DedicatedServer.java:226) 2013-09-19 06:16:12 [SEVERE] at net.minecraft.server.v1_6_R2.MinecraftServer.s(MinecraftServer.java:486) 2013-09-19 06:16:12 [SEVERE] at net.minecraft.server.v1_6_R2.MinecraftServer.run(MinecraftServer.java:419) 2013-09-19 06:16:12 [SEVERE] at net.minecraft.server.v1_6_R2.ThreadServerApplication.run(SourceFile:582) 2013-09-19 06:16:12 [SEVERE] Caused by: java.io.EOFException: Can not read response from server. Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost. 2013-09-19 06:16:12 [SEVERE] at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:2529) 2013-09-19 06:16:12 [SEVERE] at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2979) 2013-09-19 06:16:12 [SEVERE] ... 24 more

Any insight would be greatly appreciated.

Thanks,

Fuzz

aman207 commented 11 years ago

2013-09-19 06:16:12 [SEVERE] com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

This is your problem. For some reason, the plugin can not find the database URL. So a couple questions. Does this happen all the time, or just every once in a while? Does /donate check or /donate checkvc [name] work? Who is your database host?

I suspect that its the host that keeps dropping connection.

FuzzPucker commented 11 years ago

This is an intermittent issue, with seemingly no trigger that I can find. The MySQL database is hosted locally on the same VPS. There are several other plugins that interface with the same database constantly and never complain, so I am reluctant to think its the database's issue.

aman207 commented 11 years ago

Huh. Well that is interesting.

Let me do some debugging and get back to you.

FuzzPucker commented 11 years ago

Thanks. Let me know if you want any config/info/pastes. I'm willing to help as much as I can.

aman207 commented 11 years ago

Actually, yes I do. Are you using version 0.6 or 1.5 of the plugin? When you type /donate about what comes up?

FuzzPucker commented 11 years ago

I'm using version 1.5. When I type /donate it gives me the "Correct command usage" and lists the possible commands.

aman207 commented 11 years ago

Sorry

/donate about

Do you happen to know if your host limits the amount of connections you can have to the database? And do you happen to know how many plugins connect to this database?

FuzzPucker commented 11 years ago

'/donate about' returns the following:


DonatorExpress Version 1.5 Plugin developed by: aman207 Webportal developed by: AzroWear http://bit.ly/DonExp


As far as the maximum connections to the database goes, its defaulted at 100 connections. I have not changed this setting. There are currently 4 MineCraft plugins connected to the database. They are DonatorExpress, Prism, Stables, and zPermissions. In addition to this, there is also the DonatorExpress WebPortal connection to this database from a remote location. The rest of the connections are local.

aman207 commented 11 years ago

Alrighty And I have to ask, are you putting a :3306 at the end?

Also do you get any error on startup?

P.S. I am gone for the weekend so I won't be back until Monday.

FuzzPucker commented 11 years ago

I'm using :3307 at the end, as I've changed my default MySQL port. There are no errors on startup.

Have a good weekend. Hopefully we can get this sorted out next week.

aman207 commented 11 years ago

Alrighty I think I know what the problem is. Give me a couple days and I will get back to you with a new .jar

FuzzPucker commented 11 years ago

Beautiful. Thank you. Let me know if you need any other information.

aman207 commented 11 years ago

Try this

https://www.dropbox.com/s/4hy7q3dx7ge4xpp/DonatorExpress.jar

FuzzPucker commented 11 years ago

Thank you! That has fixed the database connection issues, definitely. Thank you very much for your work.

I am however experiencing another user, Secretchaos has described. His first bug, where the YML user config does not record what players "current-package" is after the first purchase, so they can't purchase anything more than the first package as it offers to upgrade them to the second package even if they are already there.

aman207 commented 11 years ago

Yes this was a bug before and is my next task to fix. Apparently I didn't do enough testing. This should be easier to fix.

--- Original Message ---

From: "FuzzPucker" notifications@github.com Sent: September 28, 2013 1:47 AM To: "aman207/DonatorExpress" DonatorExpress@noreply.github.com Cc: "aman207" aman207@hotmail.com Subject: Re: [DonatorExpress] Error: "The database returned an error" (#26)

Thank you! That has fixed the database connection issues, definitely. Thank you very much for your work.

I am however experiencing another user, Secretchaos has described. His first bug, where the YML user config does not record what players "current-package" is after the first purchase, so they can't purchase anything more than the first package as it offers to upgrade them to the second package even if they are already there.


Reply to this email directly or view it on GitHub: https://github.com/aman207/DonatorExpress/issues/26#issuecomment-25293729

aman207 commented 11 years ago

https://www.dropbox.com/s/4hy7q3dx7ge4xpp/DonatorExpress.jar

Try this

FuzzPucker commented 11 years ago

Working perfectly thus far. Thank you very much for your work, I think its time to actually use this now.

aman207 commented 11 years ago

Glad to hear Let me know if you find anything else.