Minepacks

Minepacks

2M Downloads

Mysql problem

codereese opened this issue · 9 comments

commented

The console will report an error when the player opens the backpack, and there will be duplicate usernames in the database.

[00:29:17 WARN]: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '2' for key 'PRIMARY'
[00:29:17 WARN]: at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[00:29:17 WARN]: at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
[00:29:17 WARN]: at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
[00:29:17 WARN]: at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
[00:29:17 WARN]: at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
[00:29:17 WARN]: at com.mysql.jdbc.Util.getInstance(Util.java:408)
[00:29:17 WARN]: at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936)
[00:29:17 WARN]: at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3973)
[00:29:17 WARN]: at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3909)
[00:29:17 WARN]: at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2527)
[00:29:17 WARN]: at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2680)
[00:29:17 WARN]: at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2484)
[00:29:17 WARN]: at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1858)
[00:29:17 WARN]: at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1197)
[00:29:17 WARN]: at at.pcgamingfreaks.MinepacksStandalone.libs.com.zaxxer.hikari.pool.ProxyPreparedStatement.execute(ProxyPreparedStatement.java:44)
[00:29:17 WARN]: at at.pcgamingfreaks.MinepacksStandalone.libs.com.zaxxer.hikari.pool.HikariProxyPreparedStatement.execute(HikariProxyPreparedStatement.java)
[00:29:17 WARN]: at at.pcgamingfreaks.MinepacksStandalone.Bukkit.Database.SQL.runStatement(SQL.java:272)
[00:29:17 WARN]: at at.pcgamingfreaks.MinepacksStandalone.Bukkit.Database.SQL.lambda$runStatementAsync$0(SQL.java:261)
[00:29:17 WARN]: at org.bukkit.craftbukkit.v1_12_R1.scheduler.CraftTask.run(CraftTask.java:64)
[00:29:17 WARN]: at org.bukkit.craftbukkit.v1_12_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:52)
[00:29:17 WARN]: at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22)
[00:29:17 WARN]: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[00:29:17 WARN]: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[00:29:17 WARN]: at java.lang.Thread.run(Thread.java:748)

commented

I use 2.0.6

commented

Please provide me with your config (remove the database user and password before uploading it)

commented
commented

Can you please provide me with at least 5 more lines of the log right before the error message

commented

776 issued server command: /backpack
[00:34:33] [Craft Scheduler Thread - 98/WARN]: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '95' for key 'PRIMARY'
[00:34:33] [Craft Scheduler Thread - 98/WARN]: at sun.reflect.GeneratedConstructorAccessor350.newInstance(Unknown Source)
[00:34:33] [Craft Scheduler Thread - 98/WARN]: at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
[00:34:33] [Craft Scheduler Thread - 98/WARN]: at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
[00:34:33] [Craft Scheduler Thread - 98/WARN]: at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
[00:34:33] [Craft Scheduler Thread - 98/WARN]: at com.mysql.jdbc.Util.getInstance(Util.java:408)
[00:34:33] [Craft Scheduler Thread - 98/WARN]: at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936)
[00:34:33] [Craft Scheduler Thread - 98/WARN]: at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3973)
[00:34:33] [Craft Scheduler Thread - 98/WARN]: at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3909)
[00:34:33] [Craft Scheduler Thread - 98/WARN]: at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2527)
[00:34:33] [Craft Scheduler Thread - 98/WARN]: at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2680)
[00:34:33] [Craft Scheduler Thread - 98/WARN]: at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2484)
[00:34:33] [Craft Scheduler Thread - 98/WARN]: at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1858)
[00:34:33] [Craft Scheduler Thread - 98/WARN]: at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1197)
[00:34:33] [Craft Scheduler Thread - 98/WARN]: at at.pcgamingfreaks.MinepacksStandalone.libs.com.zaxxer.hikari.pool.ProxyPreparedStatement.execute(ProxyPreparedStatement.java:44)
[00:34:33] [Craft Scheduler Thread - 98/WARN]: at at.pcgamingfreaks.MinepacksStandalone.libs.com.zaxxer.hikari.pool.HikariProxyPreparedStatement.execute(HikariProxyPreparedStatement.java)
[00:34:33] [Craft Scheduler Thread - 98/WARN]: at at.pcgamingfreaks.MinepacksStandalone.Bukkit.Database.SQL.runStatement(SQL.java:272)
[00:34:33] [Craft Scheduler Thread - 98/WARN]: at at.pcgamingfreaks.MinepacksStandalone.Bukkit.Database.SQL.lambda$runStatementAsync$0(SQL.java:261)
[00:34:33] [Craft Scheduler Thread - 98/WARN]: at org.bukkit.craftbukkit.v1_12_R1.scheduler.CraftTask.run(CraftTask.java:64)
[00:34:33] [Craft Scheduler Thread - 98/WARN]: at org.bukkit.craftbukkit.v1_12_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:52)
[00:34:33] [Craft Scheduler Thread - 98/WARN]: at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22)
[00:34:33] [Craft Scheduler Thread - 98/WARN]: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[00:34:33] [Craft Scheduler Thread - 98/WARN]: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[00:34:33] [Craft Scheduler Thread - 98/WARN]: at java.lang.Thread.run(Thread.java:748)
[00:34:33] [Server thread/INFO]: <•第一•[SVIP+]sw镇子se商店北北[6]> 商店新上了一批蛋 想要的可以来看看
[00:34:36] [User Authenticator #6/INFO]: UUID of player Xue_ba is 16512ff3-3387-4fcc-a4a3-bd489de2a869
[00:34:36] [Server thread/INFO]: Xue_ba[/110.89.6.19:41534] logged in with entity id 27438 at ([world]-4985.417278471253, 79.0, -5717.4307458960375)
[00:34:36] [Craft Scheduler Thread - 105/INFO]: [云隙] Now Max Player is 80
[00:34:36] [Server thread/INFO]: [云隙] ====================================
[00:34:36] [Server thread/INFO]: [云隙] [会员][VIP]Xue_ba[9]愉快的加入了我们~
[00:34:36] [Server thread/INFO]: [云隙] ====================================
[00:34:37] [Server thread/INFO]: A_Joker issued server command: /hub
[00:34:38] [Server thread/INFO]: 逆光是你哥 issued server command: /tpahere 零
[00:34:39] [Server thread/INFO]: A_Joker lost connection: Disconnected
[00:34:39] [Server thread/INFO]: [云隙] Saved A_Joker Lv0-150-vip1
[00:34:39] [Server thread/INFO]: 穆臣ono issued server command: /w sd
[00:34:39] [Server thread/INFO]: 小航 issued server command: /sell
[00:34:39] [Server thread/INFO]: <☺稚友[4]> 我去
[00:34:40] [Server thread/INFO]: 逆光是你哥 issued server command: /tpahere 零
[00:34:41] [Server thread/INFO]: 穆臣ono issued server command: /w sa
[00:34:41] [Server thread/INFO]: Chris issued server command: /menu
[00:34:42] [Server thread/INFO]: Chris issued server command: /backpack
[00:34:42] [Craft Scheduler Thread - 109/WARN]: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '73' for key 'PRIMARY'
[00:34:42] [Craft Scheduler Thread - 109/WARN]: at sun.reflect.GeneratedConstructorAccessor350.newInstance(Unknown Source)
[00:34:42] [Craft Scheduler Thread - 109/WARN]: at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
[00:34:42] [Craft Scheduler Thread - 109/WARN]: at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
[00:34:42] [Craft Scheduler Thread - 109/WARN]: at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
[00:34:42] [Craft Scheduler Thread - 109/WARN]: at com.mysql.jdbc.Util.getInstance(Util.java:408)
[00:34:42] [Craft Scheduler Thread - 109/WARN]: at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936)
[00:34:42] [Craft Scheduler Thread - 109/WARN]: at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3973)
[00:34:42] [Craft Scheduler Thread - 109/WARN]: at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3909)
[00:34:42] [Craft Scheduler Thread - 109/WARN]: at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2527)
[00:34:42] [Craft Scheduler Thread - 109/WARN]: at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2680)
[00:34:42] [Craft Scheduler Thread - 109/WARN]: at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2484)
[00:34:42] [Craft Scheduler Thread - 109/WARN]: at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1858)
[00:34:42] [Craft Scheduler Thread - 109/WARN]: at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1197)
[00:34:42] [Craft Scheduler Thread - 109/WARN]: at at.pcgamingfreaks.MinepacksStandalone.libs.com.zaxxer.hikari.pool.ProxyPreparedStatement.execute(ProxyPreparedStatement.java:44)
[00:34:42] [Craft Scheduler Thread - 109/WARN]: at at.pcgamingfreaks.MinepacksStandalone.libs.com.zaxxer.hikari.pool.HikariProxyPreparedStatement.execute(HikariProxyPreparedStatement.java)
[00:34:42] [Craft Scheduler Thread - 109/WARN]: at at.pcgamingfreaks.MinepacksStandalone.Bukkit.Database.SQL.runStatement(SQL.java:272)
[00:34:42] [Craft Scheduler Thread - 109/WARN]: at at.pcgamingfreaks.MinepacksStandalone.Bukkit.Database.SQL.lambda$runStatementAsync$0(SQL.java:261)
[00:34:42] [Craft Scheduler Thread - 109/WARN]: at org.bukkit.craftbukkit.v1_12_R1.scheduler.CraftTask.run(CraftTask.java:64)
[00:34:42] [Craft Scheduler Thread - 109/WARN]: at org.bukkit.craftbukkit.v1_12_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:52)
[00:34:42] [Craft Scheduler Thread - 109/WARN]: at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22)
[00:34:42] [Craft Scheduler Thread - 109/WARN]: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[00:34:42] [Craft Scheduler Thread - 109/WARN]: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[00:34:42] [Craft Scheduler Thread - 109/WARN]: at java.lang.Thread.run(Thread.java:748)
[00:34:43] [Server thread/INFO]: 穆臣ono issued server command: /w se
[00:34:44] [Server thread/INFO]: <☺稚友[4]> 咋那么多
[00:34:45] [Server thread/INFO]: 楚江ono issued server command: /hub
[00:34:45] [Server thread/INFO]: 零Zero issued server command: /tpaccept
[00:34:46] [Server thread/INFO]: 北北 issued server command: /see
[00:34:46] [Server thread/INFO]: 楚江ono lost connection: Disconnected
[00:34:46] [Server thread/INFO]: [云隙] Saved 楚江ono Lv7-942-vip1
[00:34:47] [Server thread/INFO]: 776 issued server command: /menu
[00:34:47] [Server thread/INFO]: Xue_ba issued server command: /menu
[00:34:48] [Server thread/INFO]: 776 issued server command: /plot home
[00:34:48] [Server thread/INFO]: Xue_ba issued server command: /backpack
[00:34:48] [Craft Scheduler Thread - 109/WARN]: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '2' for key 'PRIMARY'
[00:34:48] [Craft Scheduler Thread - 109/WARN]: at sun.reflect.GeneratedConstructorAccessor350.newInstance(Unknown Source)
[00:34:48] [Craft Scheduler Thread - 109/WARN]: at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
[00:34:48] [Craft Scheduler Thread - 109/WARN]: at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
[00:34:48] [Craft Scheduler Thread - 109/WARN]: at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
[00:34:48] [Craft Scheduler Thread - 109/WARN]: at com.mysql.jdbc.Util.getInstance(Util.java:408)
[00:34:48] [Craft Scheduler Thread - 109/WARN]: at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936)
[00:34:48] [Craft Scheduler Thread - 109/WARN]: at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3973)
[00:34:48] [Craft Scheduler Thread - 109/WARN]: at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3909)
[00:34:48] [Craft Scheduler Thread - 109/WARN]: at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2527)
[00:34:48] [Craft Scheduler Thread - 109/WARN]: at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2680)
[00:34:48] [Craft Scheduler Thread - 109/WARN]: at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2484)
[00:34:48] [Craft Scheduler Thread - 109/WARN]: at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1858)
[00:34:48] [Craft Scheduler Thread - 109/WARN]: at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1197)
[00:34:48] [Craft Scheduler Thread - 109/WARN]: at at.pcgamingfreaks.MinepacksStandalone.libs.com.zaxxer.hikari.pool.ProxyPreparedStatement.execute(ProxyPreparedStatement.java:44)
[00:34:48] [Craft Scheduler Thread - 109/WARN]: at at.pcgamingfreaks.MinepacksStandalone.libs.com.zaxxer.hikari.pool.HikariProxyPreparedStatement.execute(HikariProxyPreparedStatement.java)
[00:34:48] [Craft Scheduler Thread - 109/WARN]: at at.pcgamingfreaks.MinepacksStandalone.Bukkit.Database.SQL.runStatement(SQL.java:272)
[00:34:48] [Craft Scheduler Thread - 109/WARN]: at at.pcgamingfreaks.MinepacksStandalone.Bukkit.Database.SQL.lambda$runStatementAsync$0(SQL.java:261)
[00:34:48] [Craft Scheduler Thread - 109/WARN]: at org.bukkit.craftbukkit.v1_12_R1.scheduler.CraftTask.run(CraftTask.java:64)
[00:34:48] [Craft Scheduler Thread - 109/WARN]: at org.bukkit.craftbukkit.v1_12_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:52)
[00:34:48] [Craft Scheduler Thread - 109/WARN]: at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22)
[00:34:48] [Craft Scheduler Thread - 109/WARN]: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[00:34:48] [Craft Scheduler Thread - 109/WARN]: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[00:34:48] [Craft Scheduler Thread - 109/WARN]: at java.lang.Thread.run(Thread.java:748)
[00:34:52] [Server thread/INFO]: Xue_ba issued server command: /hub
[00:34:53] [Server thread/INFO]: 小航 issued server command: /menu
[00:34:54] [Server thread/INFO]: Xue_ba lost connection: Disconnected

commented

I try to change UseUUIDs to false and rebuild the table, but the problem same
And UseBungeeCord is true

commented

It is probably caused by the Cooldown.Sync option. Since you add the cooldown to the player when they join the server enabling sync is redundant and you could just disable it.

commented

The problem is solved! Thank you very much!

commented

This release should implement a fix for the sync option: https://github.com/GeorgH93/Minepacks/releases/tag/v2.0.7