Ban Management

Ban Management

193k Downloads

Offline and Foced Hosts

Gregin opened this issue ยท 5 comments

commented

First of all, I'm sure you're very aware of the offline mode issue.

Even though you can set online mode to true in both bungee(IP forwarding) and spigot, it still doesn't give these UUIDS to bm. Even trying to put bm in offline mode, I am unable to ban players. My first issue comes with the playing being banned but still able to join and the second is this error:

This error only appears on certain players, and not only ones that use uppercase letters. I also completely reset my files and config, along with my tables. The players who do get banned, as mentioned above, can still join.

18.07 04:20:52 [Server] INFO TaterTerminator not found, are you sure they exist?
18.07 04:20:52 [Server] WARN ... 9 more
18.07 04:20:52 [Server] WARN at me.confuser.banmanager.internal.ormlite.stmt.mapped.MappedCreate.insert(MappedCreate.java:91)
18.07 04:20:52 [Server] WARN at me.confuser.banmanager.internal.ormlite.jdbc.JdbcDatabaseConnection.insert(JdbcDatabaseConnection.java:170)
18.07 04:20:52 [Server] WARN at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2310)
18.07 04:20:52 [Server] WARN at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2325)
18.07 04:20:52 [Server] WARN at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2407)
18.07 04:20:52 [Server] WARN at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2111)
18.07 04:20:52 [Server] WARN at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2626)
18.07 04:20:52 [Server] WARN at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2140)
18.07 04:20:52 [Server] WARN at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1986)
18.07 04:20:52 [Server] WARN at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3525)
18.07 04:20:52 [Server] WARN at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3593)
18.07 04:20:52 [Server] WARN at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1039)
18.07 04:20:52 [Server] WARN at com.mysql.jdbc.Util.getInstance(Util.java:382)
18.07 04:20:52 [Server] WARN at com.mysql.jdbc.Util.handleNewInstance(Util.java:407)
18.07 04:20:52 [Server] WARN at java.lang.reflect.Constructor.newInstance(Unknown Source)
18.07 04:20:52 [Server] WARN at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
18.07 04:20:52 [Server] WARN at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
18.07 04:20:52 [Server] WARN at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
18.07 04:20:52 [Server] WARN Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '\x1E\xC3\xCDR\xF9G0\x88\xB4\x03\xF2\xD7\x12{~\xE4' for key 'PRIMARY'
18.07 04:20:52 [Server] WARN at java.lang.Thread.run(Unknown Source)
18.07 04:20:52 [Server] WARN at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
18.07 04:20:52 [Server] WARN at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
18.07 04:20:52 [Server] WARN at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:53)
18.07 04:20:52 [Server] WARN at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftTask.run(CraftTask.java:71)
18.07 04:20:52 [Server] WARN at me.confuser.banmanager.commands.BanCommand$1.run(BanCommand.java:102)
18.07 04:20:52 [Server] WARN at me.confuser.banmanager.storage.PlayerStorage.retrieve(PlayerStorage.java:163)
18.07 04:20:52 [Server] WARN at me.confuser.banmanager.internal.ormlite.dao.BaseDaoImpl.create(BaseDaoImpl.java:310)
18.07 04:20:52 [Server] WARN at me.confuser.banmanager.internal.ormlite.stmt.StatementExecutor.create(StatementExecutor.java:450)
18.07 04:20:52 [Server] WARN at me.confuser.banmanager.internal.ormlite.stmt.mapped.MappedCreate.insert(MappedCreate.java:135)
18.07 04:20:52 [Server] WARN at me.confuser.banmanager.internal.ormlite.misc.SqlExceptionUtil.create(SqlExceptionUtil.java:22)
18.07 04:20:52 [Server] WARN java.sql.SQLException: Unable to run insert stmt on object me.confuser.banmanager.data.PlayerData@7a242479: INSERT INTO bm3_players (id ,name ,ip ,lastSeen ) VALUES (?,?,?,?)
18.07 04:20:52 [Server] INFO Requesting UUIDs for TaterTerminator

In bungee, this is one of the settings I have thought to be the problem solver. What if each server had its own forced hosts?(Factions.servername.com) Could that allow players to be authenticated on the "Factions" server instead of being forwarded from the bungee proxy. The problem could lie in the bungee proxy not properly forwarding it to the server, with the playing joining directly they would be authenticated on Factions, the place where ban manager needs it. Might not make much sense, worth a shot.

forced_hosts:
pvp.md-5.net:

Does the bungee server need to be in online or offline mode?

commented

Please refer to the spigot wiki. Ensure you restart the server when making changes to the spigot.yml file, and not use /reload.

https://www.spigotmc.org/wiki/bungeecord-installation/

Specifically Post-Installation. Ensure your spigot instances are put in offline mode, and that you have setup the bungeecord options correctly. BanManager config onlineMode should remain true.

commented

I'm not familiar to bungeecord, but what does the query do in terms of Ip forwarding?

commented

I'm not sure why I find this so confusing. When doing what you suggested, all players now have the same ip.(all alts of each other). I had this working on an online server, don't know why it isn't now.
Bungee is properly configured

BUNGEE
Ip forward: true
Online mode: true

SPIGOT
bungeecord = false

BANMANAGER
online mode: true

Keep in mind, these are all new tables each time. I have read so many of these issues on git, and each time I fix one thing, another appears. It just keeps rotating. I don't care if my bans reset, I just need a working network banning system. If your bans system is for networks? which ones is it meant for if bungee doesn't working too well?

  • Can't ban players with cap
  • Players can still join when banned
  • Can't find players(uuids)
  • 3 different console errors.
commented

I would also like add this:

19.07 11:03:38 [Server] INFO Loaded 0 ip bans into memory
19.07 11:03:38 [Server] INFO 2015-07-19 11:03:38,559 [DEBUG] JdbcPooledConnectionSource cache released connection #160786600
19.07 11:03:38 [Server] INFO 2015-07-19 11:03:38,559 [DEBUG] SelectIterator closed iterator @1611836039 after 0 rows
19.07 11:03:38 [Server] INFO 2015-07-19 11:03:38,558 [DEBUG] SelectIterator starting iterator @1611836039 for 'SELECT * FROM bmm_ip_bans '
19.07 11:03:38 [Server] INFO 2015-07-19 11:03:38,509 [DEBUG] BaseMappedStatement prepared statement 'SELECT * FROM bmm_ip_bans ' with 0 args
19.07 11:03:38 [Server] INFO 2015-07-19 11:03:38,509 [DEBUG] JdbcPooledConnectionSource reusing connection #160786600
19.07 11:03:38 [Server] INFO 2015-07-19 11:03:38,509 [DEBUG] StatementBuilder built statement SELECT * FROM bmm_ip_bans
19.07 11:03:38 [Server] INFO 2015-07-19 11:03:38,508 [DEBUG] JdbcPooledConnectionSource cache released connection #160786600
19.07 11:03:38 [Server] INFO 2

commented

Firstly, you've enabled debug within BanManager config.yml hence why you're getting those messages.

Second, if you're behind bungeecord

SPIGOT
bungeecord = false

Why is that false in spigot? As I said in my previous post, please read the wiki, or ask on the spigot forums. This issue tracker is for problems with BanManager and not general server setup support.