Ban Management

Ban Management

193k Downloads

Commands not working after machine move

Castiella opened this issue ยท 6 comments

commented
  • Server Software:

  • Server Version: PAPER SPIGOT 1.12.2

  • BanManager Version: 5.15.0

  • Online/Offline mode: Online

  • Bungeecoord online/offline mode (if applicable): n/a

BanManager config.yml:

# 
# Aliases will be found and blocked automatically, e.g. msg will block tell
debug: false
databases:
  local:
    enabled: true
    host: 
    port: 
    name: 
    user: 
    password: 
    mysql-host: 
    maxConnections: 10
    useSSL: false
    verifyServerCertificate: false
    leakDetection: 3000
    tables:
      players: bm_players
      playerBans: bm_player_bans
      playerBanRecords: bm_player_ban_records
      playerMutes: bm_player_mutes
      playerMuteRecords: bm_player_mute_records
      playerKicks: bm_player_kicks
      playerNotes: bm_player_notes
      playerHistory: bm_player_history
      playerReports: bm_player_reports
      playerReportLocations: bm_player_report_locations
      playerReportStates: bm_player_report_states
      playerReportCommands: bm_player_report_commands
      playerReportComments: bm_player_report_comments
      playerWarnings: bm_player_warnings
      ipBans: bm_ip_bans
      ipBanRecords: bm_ip_ban_records
      ipMutes: bm_ip_mutes
      ipMuteRecords: bm_ip_mute_records
      ipRangeBans: bm_ip_range_bans
      ipRangeBanRecords: bm_ip_range_ban_records
      rollbacks: bm_rollbacks
      nameBans: bm_name_bans
      nameBanRecords: bm_name_ban_records
  global:
    enabled: false
    host: 127.0.0.1
    port: 3306
    name: global_bans
    user: root
    password: ''
    maxConnections: 10
    useSSL: false
    verifyServerCertificate: false
    leakDetection: 3000
    tables:
      playerBans: bm_player_ban_all
      playerUnbans: bm_player_unban_all
      playerMutes: bm_player_mute_all
      playerUnmutes: bm_player_unmute_all
      playerNotes: bm_player_note_all
      ipBans: bm_ip_ban_all
      ipUnbans: bm_ip_unban_all
mutedCommandBlacklist:
- msg
softMutedCommandBlacklist:
- msg
duplicateIpCheck: true
bypassDuplicateChecks:
- 0.0.0.0
- 127.0.0.1
logKicks: true
logIps: true
displayNotifications: true
broadcastOnSync: false
timeLimits: {}
reportCooldown: 10
warningCooldown: 10
warningActions:
  enabled: false
warningMute: false
hooks:
  enabled: false
checkForUpdates: true
offlineAutoComplete: false
punishAlts: false
denyAlts: false
cleanUp:
  kicks: 30
  banRecords: 0
  ipBanRecords: 0
  ipMuteRecords: 0
  muteRecords: 0
  readWarnings: 0
  unreadWarnings: 0
maxOnlinePerIp: 0
maxMultiaccountsRecently: 0
multiaccountsTime: 300
checkOnJoin: false
createNoteReasons: false
onlineMode: true
chatPriority: normal

Describe your issue:

Warns in console:

[10:36:32 WARN]: java.sql.SQLException: Unable to run insert stmt on object me.confuser.banmanager.data.PlayerHistoryData@212697e3: INSERT INTO `bm_player_history` (`player_id` ,`ip` ,`join` ,`leave` ) VALUES (?,?,?,?)
[10:36:32 WARN]: at me.confuser.banmanager.internal.ormlite.misc.SqlExceptionUtil.create(SqlExceptionUtil.java:22)
[10:36:32 WARN]: at me.confuser.banmanager.internal.ormlite.stmt.mapped.MappedCreate.insert(MappedCreate.java:135)
[10:36:32 WARN]: at me.confuser.banmanager.internal.ormlite.stmt.StatementExecutor.create(StatementExecutor.java:450)
[10:36:32 WARN]: at me.confuser.banmanager.internal.ormlite.dao.BaseDaoImpl.create(BaseDaoImpl.java:310)
[10:36:32 WARN]: at me.confuser.banmanager.listeners.LeaveListener$1.run(LeaveListener.java:35)
[10:36:32 WARN]: at org.bukkit.craftbukkit.v1_13_R2.scheduler.CraftTask.run(CraftTask.java:82)
[10:36:32 WARN]: at org.bukkit.craftbukkit.v1_13_R2.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:52)
[10:36:32 WARN]: at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22)
[10:36:32 WARN]: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[10:36:32 WARN]: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[10:36:32 WARN]: at java.lang.Thread.run(Thread.java:748)
[10:36:32 WARN]: Caused by: java.sql.SQLException: Field 'id' doesn't have a default value
[10:36:32 WARN]: at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:965)
[10:36:32 WARN]: at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3978)
[10:36:32 WARN]: at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3914)
[10:36:32 WARN]: at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2530)
[10:36:32 WARN]: at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2683)
[10:36:32 WARN]: at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2495)
[10:36:32 WARN]: at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1903)
[10:36:32 WARN]: at com.mysql.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2124)
[10:36:32 WARN]: at com.mysql.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2058)
[10:36:32 WARN]: at com.mysql.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:5158)
[10:36:32 WARN]: at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2043)
[10:36:32 WARN]: at me.confuser.banmanager.internal.hikari.pool.ProxyPreparedStatement.executeUpdate(ProxyPreparedStatement.java:61)
[10:36:32 WARN]: at me.confuser.banmanager.internal.hikari.pool.HikariProxyPreparedStatement.executeUpdate(HikariProxyPreparedStatement.java)
[10:36:32 WARN]: at me.confuser.banmanager.internal.ormlite.jdbc.JdbcDatabaseConnection.insert(JdbcDatabaseConnection.java:170)
[10:36:32 WARN]: at me.confuser.banmanager.internal.ormlite.stmt.mapped.MappedCreate.insert(MappedCreate.java:91)
[10:36:32 WARN]: ... 9 more

When a player does /ban or /warn or any BM command they get "an internal error has occurred"

This has happened since we moved machine, im not sure what is going on and i hope someone can help

Thanks, let me know if theres anything else you need

commented

what command is run to create the table?

because last time i did it it didn't work properly

commented

Looks like an issue with your database. Did you restore the MySQL database from a backup?

commented

we moved the MSQL database to a new one :)

commented

Check the tables, it's stating the id field is missing a default value, suggesting auto increment isn't set.

commented

Could I possibly pay you to look at my database? I really need this fixed

commented

or anyone for that matter? i am desperate