[INACTIVE][ADMIN] ObuShutTheHellUp v0.3 - No more server can't keep up messages - [860]

Discussion in 'Inactive/Unsupported Plugins' started by OBudista, May 11, 2011.

  1. Offline

    OBudista

    ObuShutTheHellUp

    Version: v0.3
    Download Jar



    DO WHATEVER YOU FEEL LIKE WITH IT
    Older versions:
    v0.2, v0.1

    Tested for:
    • Bukkit: 860
    ObuShutTheHellUp is a plugin that suppresses the [WARNING] Can't keep up! Did the system time change, or is the server overloaded?log message, preventing it from flooding your console/log and hiding important stuff.

    As from v0.2 you are now able to filter any other log message you want by configuring the plugin.

    Known Incompatibilities:
    • SimpleSave: If you have SimpleSave installed in your plugin folder, OnuShutTheHellUp is likely to stop working. To fix this you just have to enable the timed fix functionality.
    Instalation:
    • Place obuShutTheHellUp.jar in your plugins/ directory.
    • (Optional) Alter /plugins/ObuShutTheHellUp/filters.yml to change filters. (file automatically created on the first run).
    Filter Configuration:
    • type
      • 'string' - log entry is filtered if this value is contained in the message's text.
      • 'regex' - log entry is filtered if the message's text matches at least once in the regular expression.
    • value
      • the value to be compared (either by string comparison or by regular expression)
    • level
      • log entry if filtered if the log level is matched.
      • 'ANY' will match any level.
    Example:
    Code:
    {
     
      activateTimer: false,
      timerDelay: 5,
      timerPeriod: 0,
        filters: [
            { type: 'string', value: 'overloaded?', level: 'WARNING' },
            { type: 'regex',  value: 'Done \([0-9]{1}\,{1}[0-9]{1,3}s{1}\)', level: 'ANY'}
        ]
    }
    Troubleshooting:
    1. Getting java.util.regex.Pattern's errors mostly means your regular expression is not well formated. You can find out what is the error in this website. If it is good, please verify it again on this one that actually uses the same library.
    2. If above is ok or if you don't use regular expressions chances are your yml is not well formated. Use this to check it for errors: Online Parser
    Known bugs:
    • None
    Todo:
    • Waiting for user feedback.
    Changelog:

    version 0.3:
    • Solves incompatibilities with other plugins just as SimpleSave.
    version 0.2:
    • Allows for filter addition/edition
    Version 0.1:
    • First release
     

    Attached Files:

  2. Offline

    Nitnelave

    Hoho! SERVER UNSTABLE!
    Actually, since I installed this plugin, I got a lot of errors with other commands.
    One that I think I can pinpoint is when I do a npcx spawngroup command (namely '/npcx spawngroup create patrouille'), it works, but displays a 'An internal error' warning, and outputs that in the log :
    Show Spoiler
    2011-05-19 00:18:15 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'npcx' in plugin npcx v0.0.1
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37)
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:85)
    at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:278)
    at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:682)
    at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:645)
    at org.bukkit.craftbukkit.entity.CraftPlayer.chat(CraftPlayer.java:140)
    at com.sk89q.commandhelper.CommandHelperPlugin.execCommand(CommandHelperPlugin.java:278)
    at com.sk89q.commandhelper.CommandHelperPlugin.runCommand(CommandHelperPlugin.java:105)
    at com.sk89q.commandhelper.CommandHelperPlugin.onCommand(CommandHelperPlugin.java:82)
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:85)
    at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:278)
    at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:682)
    at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:645)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:639)
    at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:32)
    at net.minecraft.server.NetworkManager.a(NetworkManager.java:196)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:75)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:372)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:287)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    Caused by: java.lang.StackOverflowError
    at java.util.regex.Pattern.range(Pattern.java:2360)
    at java.util.regex.Pattern.clazz(Pattern.java:2285)
    at java.util.regex.Pattern.sequence(Pattern.java:1835)
    at java.util.regex.Pattern.expr(Pattern.java:1769)
    at java.util.regex.Pattern.compile(Pattern.java:1477)
    at java.util.regex.Pattern.<init>(Pattern.java:1150)
    at java.util.regex.Pattern.compile(Pattern.java:840)
    at obu.ObuFilter.isLoggable(ObuFilter.java:37)
    at obu.ObuFilter.isLoggable(ObuFilter.java:59)
    at obu.ObuFilter.isLoggable(ObuFilter.java:59)
    at obu.ObuFilter.isLoggable(ObuFilter.java:59)
    at obu.ObuFilter.isLoggable(ObuFilter.java:59)
    with the last line repeating thousands of times (litterally).
    Oh, and also, I just tried doing a reload, and a whole bunch of plugins didn't reload because of :
    Show Spoiler

    2011-05-19 00:56:08 [SEVERE] null loading XSigns v0.7 (Is it up to date?)
    java.lang.StackOverflowError
    at java.util.regex.Pattern.range(Pattern.java:2360)
    at java.util.regex.Pattern.clazz(Pattern.java:2285)
    at java.util.regex.Pattern.sequence(Pattern.java:1835)
    at java.util.regex.Pattern.expr(Pattern.java:1769)
    at java.util.regex.Pattern.compile(Pattern.java:1477)
    at java.util.regex.Pattern.<init>(Pattern.java:1150)
    at java.util.regex.Pattern.compile(Pattern.java:840)
    at obu.ObuFilter.isLoggable(ObuFilter.java:37)
    at obu.ObuFilter.isLoggable(ObuFilter.java:59)
    at obu.ObuFilter.isLoggable(ObuFilter.java:59)
    at obu.ObuFilter.isLoggable(ObuFilter.java:59)
    at obu.ObuFilter.isLoggable(ObuFilter.java:59)
    at obu.ObuFilter.isLoggable(ObuFilter.java:59)
    at obu.ObuFilter.isLoggable(ObuFilter.java:59)
    at obu.ObuFilter.isLoggable(ObuFilter.java:59)
    at obu.ObuFilter.isLoggable(ObuFilter.java:59)
    at obu.ObuFilter.isLoggable(ObuFilter.java:59)
    even though they were all working before the reload... Needless to say, when we're talking about cleaning the log, thousands-of-lines-long messages don't help :p

    EDIT: and then it stops completely the server without saving anything, a few minutes later...
    end of previous log: (open)
    at obu.ObuFilter.isLoggable(ObuFilter.java:59)
    at obu.ObuFilter.isLoggable(ObuFilter.java:59)
    at obu.ObuFilter.isLoggable(ObuFilter.java:59)
    ter.java:59)bu.ObuFilter.isLoggable(ObuFil
    at obu.ObuFilter.isLoggable(ObuFilter.java:59)
    at obu.ObuFilter.isLoggable(ObuFilter.java:59)
    >Server stopped

    (and no there is no copying error, one line is weird... even the error is buggy :p)
     
  3. Offline

    OBudista

    Yes, that is caused by the override on reload. I'll work on a fix ASAP.
     
  4. Offline

    kahlilnc

    So can you stop 'unknown command' from popping up? with this plugn
     
  5. Offline

    OBudista

    If you are refering to the "Unknown console command" then yes.

    This new version ends that stack overflow/crash problem. It also safeguards against any other plugins that might be messing with the logger's filter. Please try and let me know how it went.

    I'll release the code and "officialize" the fix after I get your feedback. :)

    http://dl.dropbox.com/u/2503017/obu/obuShutTheHellUp/0.2.2/obuJustShutTheHellUp.jar

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jul 16, 2016
    kahlilnc likes this.
  6. Offline

    Nitnelave

    I won't be able to test before late tonight

    EDIT: Tested, works fine. I'll update if I have any problem, but for now, all good. Just one thing : as it doesn't load immediately but after a few seconds, a Can't keep up! message creeps[creeper] its way in:p But that's ok, it's for spamming that I use this, not for one little message.
     
  7. This is a really nice plugin helpful for getting rid of unwanted messages.

    Here's a suggestion that can help expand the plugin. It would be nice if you can send the filtered messages to a new file so you can have over text files that store that info.

    So lets say I want to move all error messages to a file it might work like this.

    Code:
    { type: 'string', value: 'could not pass', level: 'SERVER', option: 'file', var: 'errors.txt'}
    Code:
    { type: 'string', value: 'overloaded?', level: 'WARNING',option: 'remove', var: 'null' }
    Or i want to filter out a plugins messages to another file

    Code:
    { type: 'string', value: '[mcMMO]', level: 'INFO', option: 'flatfile', var: 'mcmmo.txt'}
    Or send to sql
    Code:
    { type: 'string', value: '[mcMMO]', level: 'INFO', option: 'sql', var: 'mcmmo_logs'}
    Sorry if I didn't really explain it very well
     
    OBudista likes this.
  8. Offline

    OBudista

    It actually loads at once. Thing is, SimpleSave is loaded right after ObuShutTheHellUp and overrides this. I've set a 5 second delay and a 5 second period for a checking function that verifies the integrity of the filter and see if anyone else tempered with it.

    Next version I'll probably add parameters in the configuration file to change these values.

    I'll probably also work on a replacement functionality and on a save to file (not sql at this moment) option.
     
  9. Offline

    hofec

    hello, please update for latest keep-up messages from RB 798 :) btw. thx for good plugin man !
     
  10. Offline

    Vittek

    Well now the console is spammed with [INFO]False.
    How do I have to set the filter to get rid of that?
     
  11. Offline

    Ratchet

    Code:
        filters: [
            { type: 'string', value: 'overloaded?', level: 'WARNING'},
            { type: 'string', value: 'logged in with entity id', level: 'ANY'},
            { type: 'string', value: 'lost connection', level: 'ANY'},
    these are my filters but i'm still getting them in the log, what am I doing wrong?
     
  12. Offline

    DaddyCool64

    Update MinecartMania :)
     
    Vittek likes this.
  13. Offline

    Vittek

    Damn. Yeah it was indeed MCM.. Thanks! That was getting really annoying.
     
  14. Offline

    OBudista

    ObuShutTheHellUp
    Version: v0.2
    Download Jar - Source

    Older versions:
    v0.1

    Tested for:
    • Bukkit: 766
    ObuShutTheHellUp is a plugin that suppresses the [WARNING] Can't keep up! Did the system time change, or is the server overloaded? log message, preventing it from flooding your console/log and hiding important stuff.

    As from v0.2 you are now able to filter any other log message you want by configuring the plugin.

    Known Incompatibilities:
    • SimpleSave: If you have SimpleSave installed in your plugin folder, OnuShutTheHellUp is likely to stop working. A final fix is being made but you can check the details on how to set it up right now here.
    Instalation:
    • Place obuShutTheHellUp.jar in your plugins/ directory.
    • (Optional) Alter /plugins/ObuShutTheHellUp/filters.yml to change filters. (file automatically created on the first run).
    Filter Configuration:
    • type
      • 'string' - log entry is filtered if this value is contained in the message's text.
      • 'regex' - log entry is filtered if the message's text matches at least once in the regular expression.
    • value
      • the value to be compared (either by string comparison or by regular expression)
    • level
      • log entry if filtered if the log level is matched.
      • 'ANY' will match any level.
    Example:
    Code:
    {
    
        filters: [
            { type: 'string', value: 'overloaded?', level: 'WARNING'},
            { type: 'regex',  value: 'Done \([0-9]{1}\,{1}[0-9]{1,3}s{1}\)', level: 'ANY'},
        ]
    }
    Troubleshooting:
    1. Getting java.util.regex.Pattern's errors mostly means your regular expression is not well formated. You can find out what is the error in this website. If it is good, please verify it again on this one that actually uses the same library.
    Known bugs:
    • None
    Todo:
    • Waiting for user feedback.
    Changelog:

    version 0.2:
    • Allows for filter addition/edition
    Version 0.1:
    • First release


    Okay people, retested it on the new bukkit and added a fix for incompatibilities like SimpleSave. You can now run it whenever you like how many times you like.

    But please keep report the incompatibilities so I can add them to the plugin original post.

    You could also have added a filter entry like this:
    { type: 'string', value: 'False., level: 'ANY'}

    Although as it is now, I expect it would filter a lot more than just that one. Maybe in the next version I'll add an "exactly this string" option to the filters.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jul 16, 2016
  15. Offline

    GehennaGirl

    LOL Obu this plugin definitely made you busy.
     
  16. Offline

    Ratchet


    i'm getting this in my log:

    Code:
    2011-05-29 10:09:32 [INFO] [obuShutTheHellUp version 0.3] Exception while trying to read filters file - File format is bad
    2011-05-29 10:09:32 [INFO] [obuShutTheHellUp version 0.3] Message: while parsing a flow sequence; expected ',' or ']', but got FlowMappingStart
    2011-05-29 10:09:32 [INFO] [obuShutTheHellUp version 0.3] while parsing a flow sequence
     in "<reader>", line 9, column 14:
            filters: [
                     ^
    expected ',' or ']', but got FlowMappingStart
     in "<reader>", line 11, column 9:
                { type: 'string', value: 'Connec ...
                ^
    
    2011-05-29 10:09:32 [INFO] [obuShutTheHellUp version 0.3] Controlled stack trace bellow:
    2011-05-29 10:09:32 [SEVERE] while parsing a flow sequence
     in "<reader>", line 9, column 14:
            filters: [
                     ^
    expected ',' or ']', but got FlowMappingStart
     in "<reader>", line 11, column 9:
                { type: 'string', value: 'Connec ...
                ^
    
    2011-05-29 10:09:32 [SEVERE]     at org.yaml.snakeyaml.parser.ParserImpl$ParseFlowSequenceEntry.produce(ParserImpl.java:641)
    2011-05-29 10:09:32 [SEVERE]     at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:163)
    2011-05-29 10:09:32 [SEVERE]     at org.yaml.snakeyaml.parser.ParserImpl.checkEvent(ParserImpl.java:148)
    2011-05-29 10:09:32 [SEVERE]     at org.yaml.snakeyaml.composer.Composer.composeSequenceNode(Composer.java:203)
    2011-05-29 10:09:32 [SEVERE]     at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:158)
    2011-05-29 10:09:32 [SEVERE]     at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:230)
    2011-05-29 10:09:32 [SEVERE]     at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:160)
    2011-05-29 10:09:32 [SEVERE]     at org.yaml.snakeyaml.composer.Composer.composeDocument(Composer.java:122)
    2011-05-29 10:09:32 [SEVERE]     at org.yaml.snakeyaml.composer.Composer.getSingleNode(Composer.java:105)
    2011-05-29 10:09:32 [SEVERE]     at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:124)
    2011-05-29 10:09:32 [SEVERE]     at org.yaml.snakeyaml.Yaml.load(Yaml.java:264)
    2011-05-29 10:09:32 [SEVERE]     at obu.ShutTheHellUpPlugin.loadFilters(ShutTheHellUpPlugin.java:100)
    2011-05-29 10:09:32 [SEVERE]     at obu.ShutTheHellUpPlugin.onEnable(ShutTheHellUpPlugin.java:37)
    2011-05-29 10:09:32 [SEVERE]     at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:125)
    2011-05-29 10:09:32 [SEVERE]     at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:750)
    2011-05-29 10:09:32 [SEVERE]     at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:253)
    2011-05-29 10:09:32 [SEVERE]     at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:132)
    2011-05-29 10:09:32 [SEVERE]     at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:110)
    2011-05-29 10:09:32 [SEVERE]     at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:218)
    2011-05-29 10:09:32 [SEVERE]     at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:205)
    2011-05-29 10:09:32 [SEVERE]     at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:145)
    2011-05-29 10:09:32 [SEVERE]     at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:265)
    2011-05-29 10:09:32 [SEVERE]     at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    2011-05-29 10:09:32 [INFO] [obuShutTheHellUp version 0.3] Loading default behaviour instead (filtering server can't keep up log only)
    2011-05-29 10:09:32 [INFO] [obuShutTheHellUp version 0.3] Enabled!
    this is my config:
    Code:
    {
    # type:
    #    'string' - log entry is filtered if this value is contained in the message's text.
    #    'regex' - log entry is filtered if the message's text matches at least once in the regular expression.
    # value:
    #    the value to be compared (either by string comparison or by regular expression)
    # level:
    #    'INFO'/'WARNING'/'FATAL'/'ANY'/etc - the value of the log level)
        filters: [
            { type: 'string', value: 'overloaded?', level: 'WARNING' }
            { type: 'string', value: 'Connection reset', level: 'INFO' }
            { type: 'string', value: 'lost connection', level: 'INFO' }
            { type: 'string', value: 'not playing intro song', level: 'INFO' }
        ]
    }
    what am I doing wrong?
     
  17. Offline

    OBudista

    you lack the "," between the filters.
     
  18. Offline

    Ratchet

    thanks, it loads fine now but i'm still getting the strings showing up in the log...?
     
  19. Offline

    OBudista

  20. Offline

    rareshutzu

    818 support? :D
     
  21. Offline

    Nitnelave

    Haven't tested it extensively, but it seems to work.
     
    kahlilnc likes this.
  22. Offline

    OBudista

    I just recompiled and retested for the new bukkit version. Everything is working as it should.
     
  23. Offline

    Pim1234

    thank you so much!

    Code:
            { type: 'string', value: 'quickly', level: 'INFO' }
            { type: 'string', value: 'quickly', level: 'WARNING' }
    is this right to block out

    Code:
    08:46:55 [WARNING] ------ moved too quickly! Elapsed ticks: 1, Distance change: 717.0006937971992
    08:46:55 [INFO] Prevented kicking ------ for reason: "You moved too quickly :( (Hacking?)"
    
    EDIT: no it is not:)

    Code:
    09:00:36 [INFO] [obuShutTheHellUp version 0.3] Exception while trying to read filters file - File format is bad
    what did i do wrong?
    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jul 16, 2016
  24. Offline

    OBudista

    you need a "," between the filter entries.
     
  25. Hey Obu do you know how i can make your plugin not say __Moved wrongly can u help me
     
  26. Offline

    OBudista

    What have you already tried?
     
  27. Offline

    tha d0ctor

    how do I get this to work with simplesave, it really isn't that clear
     
  28. Offline

    OBudista

    Change activateTimer to true and adjust timerDelay (in seconds) so that the fix runs after your server finished loading the plugins.
     
  29. Offline

    tha d0ctor

    thanks, I set the timer to 15 but its still looked like your plugin was getting loaded before simplesave so I changed the jar name to XObushutthehellup and now it works so far
     
  30. Offline

    acetech09

    Is the download link a static link that can work with CraftBukkitUpToDate?

    If so, I'll notify the dev of CButD and get you on the list. If not, please make it one.
     
  31. Offline

    TheBeast808

    It works great to get rid of server can't keep up, but it doesn't work for anything else.
     

Share This Page