New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SQLException #569
Comments
Are you running in offline mode?
|
Not on the server but it's part of a BungeeCord network which is in online mode. |
Strange. Need some more details. Are you using the local or external database option to sync bans across multiple servers? |
Using the local database. Sorry, I think this is my fault. PwnFilter matched on two different rules and tried to ban the player twice I think. |
That'd be an interesting concurrency use case to cover. Regardless of attempting to ban the player twice, it shouldn't result in an exception. You're running BanManager v5.9 correct? |
No I'm still on 5.8. |
@c0wg0d can you provide an example PwnFlter config that causes this? I'd like to try and reproduce this. |
You just need two rules that both match and don't abort after a ban. Here's an example that would match "apple" and "banana" and cause the error I reported if someone typed "apple banana" in chat. match apple match banana |
@c0wg0d By definition if you are using a bungeecord server, it is on offline mode. |
I recently got a similar issue:
The whole thing create quite a lag which caused about a dozen players connection loose. MySQLd 5.7.18 itself did not log anything abnormal. This was a one time occurrence for now in a long time using BM. |
Another one
|
This stuff is kind a reproducible if multiple team mates trying to punish the same player in a very short period of time. |
Awesome. |
This can also happen if a banned player changes his nickname and try to connect to the server. The new name is applied within BM but if you try to change the ban time, this error occurs. To reproduce:
Using oldnickname instead of newnickname does not work because BM doesn't know the old name anymore. Using the newnickname leads to the duplicate entry error above. I don't know if it is enough to just print out a warning like your commit 966de82 does. Oh and BTW: I guess if you restart the server between 3. and 4., this error doesn't occur, but I'm not sure. A workaround for staff members is first to unban the old name and then ban the new name. |
Can confirm the situation @sigmaroot describes.
When trying to unban the player BM responses that BM 5.14.0 |
I'm not sure what caused this. The ban seems to have worked fine. Any ideas?
[12:56:17 WARN]: java.sql.SQLException: Unable to run insert stmt on object me.confuser.banmanager.data.PlayerBanData@75b9d530: INSERT INTO
player_bans(
player_id,
reason,
actor_id,
created,
updated,
expires) VALUES (?,?,?,?,?,?) [12:56:17 WARN]: at me.confuser.banmanager.internal.ormlite.misc.SqlExceptionUtil.create(SqlExceptionUtil.java:22) [12:56:17 WARN]: at me.confuser.banmanager.internal.ormlite.stmt.mapped.MappedCreate.insert(MappedCreate.java:135) [12:56:17 WARN]: at me.confuser.banmanager.internal.ormlite.stmt.StatementExecutor.create(StatementExecutor.java:450) [12:56:17 WARN]: at me.confuser.banmanager.internal.ormlite.dao.BaseDaoImpl.create(BaseDaoImpl.java:310) [12:56:17 WARN]: at me.confuser.banmanager.storage.PlayerBanStorage.ban(PlayerBanStorage.java:119) [12:56:17 WARN]: at me.confuser.banmanager.commands.BanCommand$1.run(BanCommand.java:136) [12:56:17 WARN]: at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftTask.run(CraftTask.java:71) [12:56:17 WARN]: at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:53) [12:56:17 WARN]: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [12:56:17 WARN]: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [12:56:17 WARN]: at java.lang.Thread.run(Thread.java:745) [12:56:17 WARN]: Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '\xB5\xEE\x1F\x01\x89\xE2I)\xA3e\xE4\x03\x1B\x9AnK' for key 'player_bans_player_idx' [12:56:17 WARN]: at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [12:56:17 WARN]: at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) [12:56:17 WARN]: at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [12:56:17 WARN]: at java.lang.reflect.Constructor.newInstance(Constructor.java:423) [12:56:17 WARN]: at com.mysql.jdbc.Util.handleNewInstance(Util.java:407) [12:56:17 WARN]: at com.mysql.jdbc.Util.getInstance(Util.java:382) [12:56:17 WARN]: at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1039) [12:56:17 WARN]: at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3593) [12:56:17 WARN]: at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3525) [12:56:17 WARN]: at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1986) [12:56:17 WARN]: at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2140) [12:56:17 WARN]: at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2626) [12:56:17 WARN]: at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2111) [12:56:17 WARN]: at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2407) [12:56:17 WARN]: at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2325) [12:56:17 WARN]: at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2310) [12:56:17 WARN]: at me.confuser.banmanager.internal.hikari.pool.ProxyPreparedStatement.executeUpdate(ProxyPreparedStatement.java:61) [12:56:17 WARN]: at me.confuser.banmanager.internal.hikari.pool.HikariProxyPreparedStatement.executeUpdate(HikariProxyPreparedStatement.java) [12:56:17 WARN]: at me.confuser.banmanager.internal.ormlite.jdbc.JdbcDatabaseConnection.insert(JdbcDatabaseConnection.java:170) [12:56:17 WARN]: at me.confuser.banmanager.internal.ormlite.stmt.mapped.MappedCreate.insert(MappedCreate.java:91) [12:56:17 WARN]: ... 9 more
The text was updated successfully, but these errors were encountered: