Application RemoteToolkit - Restarts + crash detection + auto saves + remote console!

Discussion in 'Bukkit Tools' started by drdanick, Jan 15, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    drdanick

    Minecraft RemoteToolkit
    -Less downtime, more fun for your players, more power to you!

    Are you a Minecraft server administrator? Do you value up-time and stability? Do you fancy the ability to remotely control your server, both in-game and out of game, in a myriad of useful ways from a plethora of different devices?
    If you answered yes to any of the above, then the Minecraft RemoteToolkit is for you!


    What the Minecraft RemoteToolkit Plugin and Wrapper do for you:
    • Provides almost perfect server uptime with no need for action from an owner/administrator!
    • Have your server save and restart at any time period with configurable restart warnings!
    • The Toolkit guarantees a restart within the set restart period, even if your server crashes, becomes unresponsive, or encounters a "SEVERE" exception!
    • Remotely control every function of the Toolkit, even from your smart phone!
    • Full remote console access via telnet with support for multiple terminal types!
    • Telnet daemon conforms to current Telnet related RFCs!
    • Customizable alert messages!
    • Fully extendable though 3rd party modules!
    • Full feature set works with most craftbukkit builds!
    • Most features work with any Minecraft server variation, even vanilla!
    • Telnet can be disabled!
    For server administrators
    Download - Release 10, Alpha 15.3 [CB 1.7.2-R0.2] (wget friendly)
    Instructions & Documentation

    For developers
    UDP API REV 8 | Documentation
    Module API | Coming soon!

    For everyone
    Official IRC channel
    #remotetoolkit @ irc.esper.net


    "Help! I've downloaded it, but I do not know how to get it working!"
    Stop! Before you give up or ask for help, make sure you have read the step-by-step installation instructions on the wiki page. If you are still having problems, please do not be hesitant to post a request for help on this thread or in the IRC channel - no matter how simple your problem seems.


    Todo


    [​IMG][​IMG]
    Any donation would be very much appreciated. I'm but a poor University student, and I sacrifice quite a lot of unpaid time to keep the Toolkit updates and support flowing.

    Thank you to the following who have chosen to support the Toolkit through a donation:
    Deren909, marshall007, Vittek, clanslots, meee, KyneSilverhide, szoller, hungoverfurball, Lama_0, Viet, acc1dent, joby890, Liger_XT5
     
    Last edited: May 6, 2017
  2. Offline

    freman

    When working on the backup function, it'd be nice if you could make it execute a custom command after the save all - I don't tar/zip/rar my backups, instead I use rdiff to only save the changed chunks not the whole map (saves space)
     
  3. Offline

    drdanick

    In essence, that's what my backup component does. It creates a tree of MD5 sums of the block data in the chunks, meaning only chunks that have had their block data changed are backed up, not just chunks that have had their timestamps changed (which happens the moment a player steps near a chunk. I made a large post about this, though I'm not sure you saw it?
    --- merged: Jan 26, 2011 5:59 PM ---
    @sumTard @Nipper done! Try the new link.
     
  4. Any way of using JRE 7 ?
     
  5. Offline

    drdanick

    The JRE is typically capable of running bytecode whose target version is earlier than that of the runtime. However, I haven't tested anything with 7, it hasn't been released and so I will not support it until it is.
     
  6. What about JRE6 x64 then?
     
  7. Offline

    drdanick

    It should work fine.
     
  8. But how to run it using JRE x64? I have instaled both x64 and x86, is there any option to set it?
     
  9. Offline

    drdanick

    Type java -version in a console. That should tell you which version of the JRE is tied to that command. if it is not the one you want, you're going to have to enter the fully qualified path to the java executable you want to use when launching a program. Or change some of your environment variables.
     
  10. Ok i managed to run it with JRE7. :) It has about 40% better performance on my computer.
    --- merged: Jan 27, 2011 7:55 AM ---
    Thx for help.
    Is there any way, to change **Server is saving the map** message?
     
  11. Offline

    Vlyn91

    So, how do you save playerfiles?

    The problem I had with my restartmacro (not plugin):
    Save-all only saves the map...
    And Player Items / Position and so on is only saved at logout OR kick of the player.
    I still need to find a way to /kick *
    :-/

    How did you manage that?
     
  12. Offline

    arcenion

    i would like to know if you could make an android app for your remote that would be really cool
     
  13. Offline

    Snip3d

    Is there anyway to tell if the server is actually doing the save-all command? I don't see it being printed in the console. The ingame message will also be helpful when the server performs a save-all. Thanks

    EDIT: Oh I fail. the save-all feature works great. Although I have a new problem.

    I'm use to typing "stop" into the server console window to stop the server but now when I do that the server continues to run and I have to go into my processes to shut it down. Any ideas?
     
  14. Offline

    tekac

    Minecraft Remote Toolkit V1.0_b14_6 ALPHA
    Initializing...
    Loading toolkit properties...Done.
    Starting wrapper...
    Starting UDP listen server on port 25561
    2011-01-27 16:12:48 [INFO] Starting minecraft server version Beta 1.2_01
    java.lang.NullPointerException
    at com.drdanick.McRKit.Wrapper.enqueueStringToShells(Wrapper.java:462)
    at com.drdanick.McRKit.Wrapper.access$000(Wrapper.java:18)
    at com.drdanick.McRKit.Wrapper$3.run(Wrapper.java:234)
    Preparing spawn area: 4%
    java.lang.NullPointerException
    at com.drdanick.McRKit.Wrapper.enqueueStringToShells(Wrapper.java:462)
    at com.drdanick.McRKit.Wrapper.access$000(Wrapper.java:18)
    at com.drdanick.McRKit.Wrapper$2.run(Wrapper.java:207)

    I keep getting this error ...
     
    dslip likes this.
  15. Offline

    sumTard

    is there any way to stop the server from performing one of the recurring save-alls right before or after its about to restart? it happened to us today and it completely threw the server off balance and it wouldnt restart properly. I kept getting errors that player could not be removed because he was no longer in the chunk, therefore stopping the server from going ahead with the restart.
     
  16. Offline

    dslip

    I am getting the same error, using craftbukkit build 162
     
  17. Offline

    drdanick

    Not yet, I will implement a way to alter all of the messages soon.

    stop does the trick ;)


    Working on it. Although, since I now have the web interface, which can be used from an Android device, it is not at the top of my priorities. I will get it done at some point ;)

    Enter .stopwrapper in the console. If you want to know what the other wrapper commands are, enter .help

    Found the problem. It will only occur if you have disabled telnet in the properties file. I'll upload a fix shortly.

    Edit: Done. Re-download it. ;)

    --- merged: Jan 28, 2011 12:09 PM ---
    That is not good at all. I assumed that saves would be synchronized, so multiple saves at the same time would not cause a problem. I'll fix it in the next update. Until then, make sure you set a restart period such that it does not occur on a restart.
     
  18. Offline

    outi

    Is it possible to invoke auto-restart when the server can't perform /save-all? We don't need unnecessary periodical restarts.
     
  19. Offline

    drdanick

    The server should be restarted before it gets to that point. If it crashes through a save, or has to restart after a crash there is a great chance some of the map will be corrupted or not all of the chunks end up being saved.
    I've experienced that a lot, and was one of the reasons I wrote this wrapper in the first place.

    However, I will definitely implement some sort of crash detection (this will probably be tied into the plugin component), but it is not at all recommended to allow the server to crash before a restart.
     
  20. Offline

    Xemnas33

    Hmm can't get it to send or maybe even recieve the UDP package from my iPhone which is odd. I've filled everything in correctly but it doesn't want to work. =/
     
  21. Offline

    Vlyn91

    Sorry, but it doesn't.

    I always use:
    save-all
    stop

    And after that I start the server again.

    This way the playerfiles are NOT saved! As I said: ONLY on logout or kick of the player!
    I tried it many times and my players complained about item loss and a "reset" of the server (The map was ok, the playerfiles not).

    Restarts with save-all + stop offers duping! Log out (For saving), Log in, throw your stuff in a chest / on the floor (Diamonds for example) and because of save-all they're saved! When you stay logged in till the server stop you'll be set back to the point you logged in first. Now you duped your stuff on a SMP server, congrats!
    -Fixed: Never use save-all and instantly after it stop.

    Because of duping issues it's not a good idea to simply warn your players with: "Log out or you'll lose your items" 1-5 minutes before restart...
     
  22. Offline

    drdanick

    You are completely incorrect. I have just verified myself that the stop command does indeed force a save of ALL cached data, including player data. Both a check of the md5 sums before and after a save, and an in-game check to see that it worked support my claim that it does work.
    If you are having problems, there is something else wrong, possibly with your script. Although, I cannot imagine what it would be. The only difference from my stop method is that you force a save-all before a restart, which is completely redundant as the server will force a save of cached data on the stop command.

    I am going to have it kick all of the players before a restart soon, I even have a method of doing this from the wrapper. But again, it is not needed to save player data.

    Edit: I have just asked about this in the irc channel #bukkit. Save-all does not force a save of player data, but stop does. Remove the save-all from your script ;)

    Try performing a restart from http://www.drdanick.com/mcremote/index.php
    If it does not work, that means that you need to forward UDP port 25561 on your router.
     
  23. Offline

    Xemnas33

    Yeah thanks very much forwarding worked :)
     
  24. Offline

    Brack

    Hey drdanick, just wanted to say thanks alot for the work you've done on this. Made my life alot easier.

    Would it be possible to have options for how verbose the wrapper is? Maybe a line in the config that had flags for each command (Save, Restart etc) which would toggle on or off displaying the message. Its just every time the server saves I see:

    [Server] **SERVER IS SAVING THE MAP **
    (CONSOLE: Forcing save..)
    (CONSOLE: Save complete.)
    [Server] **MAP SAVE IS COMPLETE **

    I'd like to have the option to be only notified by either the Console or the Server. ;)
    (if there is currently a way to do this or this is already planned, please enlighten me)
     
  25. Offline

    Vlyn91

    Interesting, without save-all it suddenly works :confused:

    Gonna test it a while, but thanks
     
  26. Offline

    drdanick

    Both of those lines are from the server, not the wrapper. The [Server] messages are the notices that are sent to players, the other is printed when a save-all occurs. I try to have my wrapper print as little to the console as possible.

    My guess is that it does not perform a save on stop if a save-all was performed recently. I might look into that. If that's the case, then I need to ensure that an automatic save-all does not occur close to a restart. Thank you for bringing my attention to this. :)
     
  27. Offline

    Vlyn91

    Np, thanks for your infos :)

    Now I can finally auto-restart my server without losing playerfiles :D
     
  28. Offline

    Kane

    I so wish there was a way to detect java.lang.ArrayIndexOutOfBoundsException: -1 so we can have it reboot automatically. It's the only reason I refuse to switch to 1.2 :(
     
  29. Offline

    drdanick

    It's possible to detect that string on the console output and act accordingly, the problem is judging what caused the exception in the first place. java.lang.ArrayIndexOutOfBoundsException: -1 is a common exception, and if a plugin were to throw it, we wouldn't want the server to restart :p

    What i'm working on is a method of checking whether a server is responding normally every few minutes. If it isn't, then it will force a restart.
     
  30. Offline

    Kane

    well here is the full error:
    http://getsatisfaction.com/mojang/t...la_java_lang_arrayindexoutofboundsexception_1


    Look near the bottom for the latest but I could give you a string that comes 100%:
    Code:
        at net.minecraft.server.ChunkCache.a(SourceFile:38)
        at net.minecraft.server.ChunkCache.c(SourceFile:103)
    That there is never spat out ever (check all logs) only when its this bug..


    Here is the bug I had a couple times today causing it to semi crash (in game players lag out) (outside players get out stream and such errors)

    THE GOOD NEWS IT NEEDS just a simple stop command it still resets fine <3

    Code:
    java.lang.ArrayIndexOutOfBoundsException: -1
        at net.minecraft.server.ChunkCache.a(SourceFile:38)
        at net.minecraft.server.ChunkCache.c(SourceFile:103)
        at net.minecraft.server.Pathfinder.a(SourceFile:158)
        at net.minecraft.server.Pathfinder.a(SourceFile:120)
        at net.minecraft.server.Pathfinder.b(SourceFile:96)
        at net.minecraft.server.Pathfinder.a(SourceFile:64)
        at net.minecraft.server.Pathfinder.a(SourceFile:37)
        at net.minecraft.server.Pathfinder.a(SourceFile:22)
        at net.minecraft.server.World.a(SourceFile:1707)
        at net.minecraft.server.EntityCreature.d(EntityCreature.java:72)
        at net.minecraft.server.EntityLiving.o(EntityLiving.java:590)
        at net.minecraft.server.EntityMobs.o(EntityMobs.java:37)
        at net.minecraft.server.EntityLiving.b_(EntityLiving.java:225)
        at net.minecraft.server.EntityMobs.b_(EntityMobs.java:41)
        at net.minecraft.server.EntityCreeper.b_(EntityCreeper.java:53)
        at net.minecraft.server.World.a(SourceFile:1116)
        at net.minecraft.server.WorldServer.a(WorldServer.java:41)
        at net.minecraft.server.World.f(SourceFile:1092)
        at net.minecraft.server.World.c(SourceFile:1071)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:260)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:197)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:512)



    Code:
    java.lang.ArrayIndexOutOfBoundsException: -1
        at net.minecraft.server.ChunkCache.a(SourceFile:38)
        at net.minecraft.server.ChunkCache.c(SourceFile:103)
        at net.minecraft.server.Pathfinder.a(SourceFile:158)
        at net.minecraft.server.Pathfinder.a(SourceFile:120)
        at net.minecraft.server.Pathfinder.b(SourceFile:94)
        at net.minecraft.server.Pathfinder.a(SourceFile:64)
        at net.minecraft.server.Pathfinder.a(SourceFile:37)
        at net.minecraft.server.Pathfinder.a(SourceFile:22)
        at net.minecraft.server.World.a(SourceFile:1707)
        at net.minecraft.server.EntityCreature.d(EntityCreature.java:72)
        at net.minecraft.server.EntityLiving.o(EntityLiving.java:590)
        at net.minecraft.server.EntityMobs.o(EntityMobs.java:37)
        at net.minecraft.server.EntitySkeleton.o(EntitySkeleton.java:54)
        at net.minecraft.server.EntityLiving.b_(EntityLiving.java:225)
        at net.minecraft.server.EntityMobs.b_(EntityMobs.java:41)
        at net.minecraft.server.World.a(SourceFile:1116)
        at net.minecraft.server.WorldServer.a(WorldServer.java:41)
        at net.minecraft.server.World.f(SourceFile:1092)
        at net.minecraft.server.World.c(SourceFile:1071)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:260)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:197)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:512)
     
  31. Offline

    Brack

    Are you sure about this? I'm sure you know alot more about this stuff than I do, but when I run my server with my craftbukkit server starter and I run the command save-all I only see:

    (CONSOLE: Forcing save..)
    (CONSOLE: Save complete.)

    As opposed to the 4 lines I see when I run your wrapper. Again, I'm probably just missing something, but I'd like to get it figured out. :)
     
Thread Status:
Not open for further replies.

Share This Page