[INACTIVE][ADMN] PingWatcher 2.4.1 - Essential tool to run a lag-free server [677]

Discussion in 'Inactive/Unsupported Plugins' started by Zi0P4tch0, Apr 11, 2011.

  1. Offline

    Zi0P4tch0

    This plugin kicks players with a non-decent ping.

    UPDATE 2.3.3:
    Fixed known bugs.
    Code improved.
    Time interval min value set to 3.

    UPDATE 2.3.5:
    Minor bug fixes

    UPDATE 2.4:
    "/pingme" command available for clients that play on Linux servers (still implementing Windows & Mac version).
    Ops are now excluded from ping check.

    UPDATE 2.4.1:
    Improved ping check response.

    Minecraft servers are buggy and they really suffer from bad pings.
    Give this simple plugin a try, you will not regret it!

    Screenshots:

    [​IMG]

    [​IMG]
    [​IMG]
    Download:

    http://dl.dropbox.com/u/26014957/PingWatcher2.jar

    Donate a dollar to keep my coffee mug always full :)
    [​IMG]

    ------------------------------------------------------------------------

    Changelog:
    2.4.1:
    -Improved ping check response.
    2.4:
    - Added /pingme command (works only if client is on a Linux server).
    - Ops exclusion from pingcheck.
    2.3.5:
    - Minor bug fixes.
    2.3.3:
    - Fixed some bugs, code improved.
    2.3.1:
    -Plugin skips LAN clients. (removed, was really buggy)
    -Added property "login-message"
    2.1:
    - Added command: kickprobability.
    2.0:
    - Completely rewritten and improved.
    1.3.1:
    -custom messages (goodping, pingwarn)
    1.3:
    - warning mode: warn clients / do not kick them!
    1.2.1:
    - Increased the priority for the "OnWorldSave" event.
    1.2:
    - Ping check after a time interval (optional):
    Plugin configuration file: added "time-interval" property.
    1.1:
    - Plugin configuration file: added "plugin-limit" property.
    1.0:
    - Initial release.

    To-do:
    Nothing

    If you're experiencing bugs or you think that the plugin is not working correctly, feel free to contact me.
    I'll answer A.S.A.P.

    Suggestions are welcome too :)

    Zi0P4tch0

    Updated :)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 13, 2016
  2. Offline

    dervonz

    Windows, CB677, Sun (version unknown)
     
  3. Offline

    Zi0P4tch0

    2.4 Beta is out for linux servers!
    Added "/pingme" command!
    I'll wait for your feedbacks :)

    2.4 stable coming in a few hours ("pingme" cmd will work only for Linux. Soon I will implement the Windows and Mac version)

    I've promoted 2.4 from beta to release version. Enjoy!

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 13, 2016
  4. Offline

    Lecksy

    Hello! I get this warning when the /pingme command is used.
    Code:
    01:43:06 [INFO] [PingWatcher]: processing ping request for player mirador.
    01:43:09 [WARNING] Can't keep up! Did the system time change, or is the server overloaded?
    
    Also it takes a really long time to retrieve the ping :(
    Code:
    01:47:16 [INFO] <Lecksy> doing /pingme now
    01:47:47 [INFO] [PingWatcher]: executing ping ranking algorithm.
    01:48:07 [INFO] [PingWatcher]: processing ping request for player Lecksy.
    01:48:10 [WARNING] Can't keep up! Did the system time change, or is the server overloaded?
    
    It works great otherwise! I'm running CB677 on Ubuntu :)

    Edit: PingWatcher2.jar creates a directory called PingWatcher, and it overrides any saves in the config with the default. Renaming PingWatcher2.jar to PingWatcher.jar seemed to fix it though with no immediate effects. Just so you know!
     
    Zi0P4tch0 likes this.
  5. Offline

    Zi0P4tch0

    It's a necessary consequence.
    I will try to optimize the timings :)
    Thanks for reporting!
     
  6. Offline

    Ben91

    Hello.

    Thanks for this plugin man !!

    Version 2.3.5 was working fine. With 2.4, if I try "/pingme", there is an error :

    Code:
    2011-04-17 14:51:58 [INFO] [PingWatcher]: processing ping request for player Ben.
    2011-04-17 14:51:58 [SEVERE] [PingWatcher]: IOException (Cannot run program "ping" (in directory "."): java.io.IOException: error=12, Cannot allocate memory).
    Tried when op and normal.

    I'm using a Linux Server, CraftBukkit Build 677 and my minecraft server don't run on root user (rights problem ?).

    Cheers.

    ++

    PS: Ooooops and now, critical error :

    Code:
    2011-04-17 14:52:58 [SEVERE] [PingWatcher]: IOException (Cannot run program "ping" (in directory "."): java.io.IOException: error=12, Cannot allocate memory).
    2011-04-17 14:54:26 [WARNING] Can't keep up! Did the system time change, or is the server overloaded?
    2011-04-17 14:54:38 [INFO] [PingWatcher]: executing ping ranking algorithm.
    2011-04-17 14:54:38 [SEVERE] java.lang.NullPointerException
    2011-04-17 14:54:38 [SEVERE]     at Zi0P4tch0.PingWatcher.PingWatcher$1.run(PingWatcher.java:102)
    2011-04-17 14:54:38 [SEVERE]     at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:122)
    2011-04-17 14:54:38 [SEVERE]     at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:356)
    2011-04-17 14:54:38 [SEVERE]     at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:283)
    2011-04-17 14:54:38 [SEVERE]     at net.minecraft.server.ThreadServerApplication.run(SourceFile:375)
    2011-04-17 14:54:38 [SEVERE] Unexpected exception
    java.lang.NullPointerException
        at Zi0P4tch0.PingWatcher.PingWatcher$1.run(PingWatcher.java:102)
        at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:122)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:356)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:283)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:375)
    
    No error with previous verion...

    Good luck.
     
    Zi0P4tch0 likes this.
  7. Offline

    Zi0P4tch0

    Thanks for reporting.
    The "/pingme" command fails because it needs the "ping" program to be accessible from the shell.
    Reguarding the second issue, I'm still investigating.

    updated!

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 13, 2016
  8. Offline

    Ben91

    Tested 2.4.1. Same error as before.

    Code:
    2011-04-17 14:51:58 [INFO] [PingWatcher]: processing ping request for player Ben.
    2011-04-17 14:51:58 [SEVERE] [PingWatcher]: IOException (Cannot run program "ping" (in directory "."): java.io.IOException: error=12, Cannot allocate memory).
    But yes, it's faster :)

    Cheers.

    ++
     
  9. Offline

    DeltaDevil

    New error :
    [PingWatcher]: ExecuteException (Process exited with an error: 143 (Exit value: 143)).
    Running Ubuntu 10 on 2GHZ with 2GB RAM, on Sun Java 6


    Also crashes server when cheching ping.
     
  10. Offline

    Lecksy

    I'm getting that error too, I'm able to ping the server okay but regular players cannot. :(
     
  11. Offline

    Zi0P4tch0

    Problem is that when "ping" external program is called, a new process is created.
    This new process has the same heap dimension of the Java program (the caller program).
    The only way to overcome this is this command:

    Code:
    sudo echo 1 > /proc/sys/vm/overcommit_memory


    If you have a lot of RAM, you won't get the error :)

    pingme command has been removed, it's causing a lot of problems
    i will implement it a.s.a.p in native code
    download again the jar (version it's still 2.4.1)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 13, 2016
  12. Offline

    Ben91

    What's going on with java and memory allocation ???

    I'm running an Ubuntu 10.10 x64 and OpenJDK x64. I have 3 GB of RAM.

    If : MC Server is running with 2GB (=~ 600MB free !!)
    (java -Xincgc -Xmx2G -jar minecraft_server.jar)
    Then :

    Code:
    java -version
    Error occurred during initialization of VM
    Could not reserve enough space for object heap
    Could not create the Java virtual machine.
    and

    Code:
    2011-04-17 14:51:58 [INFO] [PingWatcher]: processing ping request for player Ben.
    2011-04-17 14:51:58 [SEVERE] [PingWatcher]: IOException (Cannot run program "ping" (in directory "."): java.io.IOException: error=12, Cannot allocate memory).

    If : MC Server is running with 1GB (=~ 1600MB free !!)
    (java -Xincgc -Xmx1G -jar minecraft_server.jar)
    Then :
    java -version, works and "/pingme" too...

    Between, I have always this error :

    Code:
    2011-04-18 12:36:59 [INFO] [PingWatcher]: executing ping ranking algorithm.
    2011-04-18 12:36:59 [SEVERE] java.lang.NullPointerException
    2011-04-18 12:36:59 [SEVERE]     at Zi0P4tch0.PingWatcher.PingWatcher$1.run(PingWatcher.java:112)
    2011-04-18 12:36:59 [SEVERE]     at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:122)
    2011-04-18 12:36:59 [SEVERE]     at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:356)
    2011-04-18 12:36:59 [SEVERE]     at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:283)
    2011-04-18 12:36:59 [SEVERE]     at net.minecraft.server.ThreadServerApplication.run(SourceFile:375)
    2011-04-18 12:36:59 [SEVERE] Unexpected exception
    java.lang.NullPointerException
        at Zi0P4tch0.PingWatcher.PingWatcher$1.run(PingWatcher.java:112)
        at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:122)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:356)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:283)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:375)
    Don't understand...

    Don't say me that a ping need the same quantity of memory that MC server (WTF ????) and what about java -version ????

    Help please.

    Cheers.

    ++

    PS: I'm inquiring about your command
    Code:
    sudo echo 1 > /proc/sys/vm/overcommit_memory
     
  13. Offline

    Zi0P4tch0

    Read the previous posts.
    I have removed the ping command, I will implement it again from scratch (better implementation of course).
    Ping need same RAM of MC server because the MC server process is cloned.
    About the command: http://www.win.tue.nl/~aeb/linux/lk/lk-9.html (9.6 paragraph)
    It's a safe command most of the times.
    I suggest you to download again the jar file (it's same version, but without ping command).
     
  14. Offline

    Waffletastic

    How do we edit the config?
     
  15. Offline

    Zi0P4tch0

    If you start the plugin for the first time, a new configuration file will be generated in the directory "<SERVER>/plugins/PingWatcher". The config file is "config.yml".
    The file is a list of key-value properties.
    Edit the values in order to edit the configuration :)
     
  16. Offline

    Ben91

    Ok thanks.

    Keep your good work :)

    ++
     
    Zi0P4tch0 likes this.
  17. Offline

    gilgatex

    I tried to get this working, but at the first pingcheck interval, I got this error message and it locked up my server (all connections timed out)

    Code:
    2011-04-18 16:56:07 [INFO] [PingWatcher]: executing ping ranking algorithm.
    2011-04-18 16:56:07 [SEVERE] java.lang.NullPointerException
    2011-04-18 16:56:07 [SEVERE] 	at Zi0P4tch0.PingWatcher.PingWatcher$1.run(PingWatcher.java:104)
    2011-04-18 16:56:07 [SEVERE] 	at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:122)
    2011-04-18 16:56:07 [SEVERE] 	at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:356)
    2011-04-18 16:56:07 [SEVERE] 	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:283)
    2011-04-18 16:56:07 [SEVERE] 	at net.minecraft.server.ThreadServerApplication.run(SourceFile:375)
    2011-04-18 16:56:07 [SEVERE] Unexpected exception
    java.lang.NullPointerException
    
    	at Zi0P4tch0.PingWatcher.PingWatcher$1.run(PingWatcher.java:104)
    
    	at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:122)
    
    	at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:356)
    
    	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:283)
    
    	at net.minecraft.server.ThreadServerApplication.run(SourceFile:375)
    
     
  18. Offline

    Jorrdan

    Seems to be working :)

    Just wish there was a command to tell your ping xD
     
  19. Offline

    RaaF

    Hi Dude I have problem...
    look what the pingwatcher do to me after 5 min when he need to scan ping:

    Code:
    2011-04-19 03:11:37 [INFO] [PingWatcher]: executing ping ranking algorithm.
    2011-04-19 03:11:37 [SEVERE] java.lang.NullPointerException
    2011-04-19 03:11:37 [SEVERE]     at Zi0P4tch0.PingWatcher.PingWatcher$1.run(PingWatcher.java:104)
    2011-04-19 03:11:37 [SEVERE]     at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:122)
    2011-04-19 03:11:37 [SEVERE]     at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:356)
    2011-04-19 03:11:37 [SEVERE]     at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:283)
    2011-04-19 03:11:37 [SEVERE]     at net.minecraft.server.ThreadServerApplication.run(SourceFile:375)
    2011-04-19 03:11:37 [SEVERE] Unexpected exception
    java.lang.NullPointerException
        at Zi0P4tch0.PingWatcher.PingWatcher$1.run(PingWatcher.java:104)
        at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:122)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:356)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:283)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:375)
    
    PLZZ HELPP
     
  20. Offline

    Raptor2213


    Doesn't create this directory for me. Using PingWatcher 2.4.1 with CB 277.
    Randomly started working and created the dirrectory...
     
  21. Offline

    Zi0P4tch0

    From now on, I will stop working on this plugin.
    Free time is not my friend in these days
    Thank to all who supported!
     
  22. Offline

    thecoolwolf

    then plz hand it over to someone else o: it seems like a great plugin for my server :3
     
  23. Offline

    blindsarcasm

    I can't download it, please put the latest release for all?
     
  24. Offline

    xeology

    If you know where the source can be found I'll take over.
     
  25. Offline

    Ben91

    What a great news ! Thanks.

    Hmmm, no source shared, for the moment...

    Did you / can you ask to the author if he can share his sources or give them to you ? Else, we can ask.

    Cheers.

    ++
     
  26. Offline

    xeology

    anyone got the jar to this? I can decompile it!
     
  27. Offline

    wassilij

  28. Offline

    DieselFaka

    oO where is config? i see just jar
     
  29. Offline

    Xiben

    uhu maybe update the link...
     

Share This Page