[ADMN] RemoteToolkit [R10 a15] - Restarts + crash detection + auto saves + remote console! [1.7.2]

Discussion in 'Archived: Plugin Releases' started by drdanick, Jan 16, 2011.

     
  1. Offline

    drdanick

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    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)

    For developers
    Module API | Coming soon!

    For everyone
    Official IRC channel


    "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.

    Changelog
    Release 10, Alpha 1



    [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:

    This post has been edited 119 times. It was last edited by drdanick Oct 27, 2014.
  2.  
  3. Offline

    Kilandor

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Done, it will remember all fields except password. Better for security since the pass would be plainly visible in HTML otherwise.

    I also set it to timeout on trying to read, before it would just "hang".

    This likely wouldn't work on most webhosts, as fsock is usually disallowed, or non standard ports aren't allowed/etc.

    PHP:
    <?php
    error_reporting
    (E_ALL E_NOTICE);

    if(
    $_POST['submit'])
    {
        
    $error = (empty($_POST['ip'])) ? 'You must enter a IP/Host<br />' '';
        
    $error = (empty($_POST['port'])) ? 'You must enter a Port<br />' '';
        
    $error = (empty($_POST['user'])) ? 'You must enter a Username<br />' '';
        
    $error = (empty($_POST['pass'])) ? 'You must enter a Password<br />' '';

        if(!
    $error)
        {
            
    $fp fsockopen('udp://'.$_POST['ip'], $_POST['port'], $errno$errstr);
            if (!
    $fp)
                echo 
    '<span style="color:red;">ERROR: '.$errno.' - '.$errstr.'<br />\n';
            else
            {
                
    fwrite($fp$_POST['command'].':'.$_POST['user'].':'.$_POST['pass']);
                
    stream_set_timeout($fp5);
                echo 
    '<span style="color:green;">'.fread($fp128).'</span>';
                
    fclose($fp);
            }
        }
    }
    echo 
    '<html><body>
    '
    .((!empty($error)) ? '<div style="color:red;">'.$error.'</div><br />' '').'
    <form action="restarter.php" method="post">
    IP/Host: <input type="text" name="ip" value="'
    .$_POST['ip'].'" /> Port: <input type="text" name="port" value="'.$_POST['port'].'" /><br />
    Username: <input type="text" name="user" value="'
    .$_POST['user'].'" /> Pass: <input type="password" name="pass" /><br />
    <select name="command">
    <option value="version">Version</option>
    <option value="enable">Enable Restarts</option>
    <option value="disable">Disable Restarts</option>
    <option value="restart">Restart</option>
    <option value="forcerestart">Force Restart</option>
    <option value="forcestop">Force Stop</option>
    </select>
    <input type="submit" value="submit" name="submit" />
    </form></body></html>'
    ;
    ?>
    Edit: Doh I see you got a web version working already how you mentioned, oh well, it was only like 2m of work anyways :)
  4. Offline

    drdanick

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Haha, indeed I did! I'll replace it with your new version, it seems more polished.
  5. Offline

    Brack

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    I just started testing this out on my server and so far I'm really liking what I see. So far everything's been working for me except the "Stop" command. I'm using the latest version of your wrapper as of this morning, with Bukkit build 115. I don't receive any errors, just no response whatsoever.

    Also is it possible when I issue a Restart command (either normal or forced) for it to have a count down on the server for a specified time before restarting? I tried changing "forced-restart-delay" thinking that might be what I wanted, but it didn't seem to be doing anything.

    Again, really liking what I've seen so far, just had those 2 issues.
  6. Offline

    drdanick

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Odd, all the commands are piped straight through to the server console, so that shouldn't happen. It might be a problem with that bukkit build, have you tried the latest build?

    Oh, i've had that suggested to me before. One I have a few important updates out of the way i'll work on it.
  7. Offline

    nossr50

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    This plugin is excellent, could you put in a command to stop the wrapper from the server console?
  8. Offline

    drdanick

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Yes, that's close to the top of my To-Do list.
  9. Offline

    Kilandor

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    This may be in your To-Do but it would be nice if you could remote exec console commands.

    Also it doesn't seem to kick players before a restart. Which is kinda annoying cause it just shuts down and get error message or sometimes causes client crash
  10. Offline

    drdanick

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    I can't add kick messages to the wrapper, that's the plugins job. Don't worry, I'll have the plugin component out soon enough!
    As for the console, I have been working on something like that for a while now, stay tuned.


    In other news, I have a preview version of the backup component up for everyone to have a play around with!
    What is special about this backup system is that it is a difference backup system. What that means is that only the chunks that have actually been changed are backed up! This means after an initial backup of a 1GB map, successive backups made every few hours can be as little as 20MB, while preserving every change that was made!
    A backup system was in the pipeline for quite some time now, even when this was still an hMod plugin, but I felt that if I were going to support full backups in the toolkit, it would have to offer something that other backup plugins just don't offer. Backing up an entire world folder every time a backup is to be made is just down right silly. Worlds contain thousands of chunks, many of which are never even changed after their creation. Why repeatedly back things up that are never changed? There is no point in that kind of redundancy!

    So anyway, here it is: Preview 1

    How to use it:

    (READ THIS FIRST!!)
    Now I haven't integrated this into the wrapper yet for a reason. It's a preview version, nothing has been optimized. CPU and memory usage is fairly large, but don't let that deter you. Memory usage can be limited with the Xmx and Xms flags if wanted, and it is completely happy running with very little memory. I have not made the effort to limit CPU usage yet, so it can be quite tolling. The upside of that is that backups are usually completed very fast (being a difference backup system, there is a lot more to do than just make copies of files!). I will allow the CPU "breaks" to be user changeable, so you will have full control over how taxing the program is on your system.

    Another thing to note is that the files are not stored in a .zip archive. Not everyone knows this, but world chunk files are already compressed through gzip. Compressing them a second time (albeit with a different algorithm) is not going to save you very much space at all. The only benefit of a zip archive in this case is that it is easier to move a single archive around than it is to move 100,000 files around. I will add the option to archive individual backups on-the-fly so they can be moved easily, but the main backup system will always be in an open directory structure.

    One last note: All the backup dirs in /world/backup are dependent on each other. This means you cannot just remove a backup by deleting the # dir of the backup, this will likely mess everything up. To support deletions, I have to write a method to rebuild the backup index files. However, this is easy, so it won't take me long to do.

    Now, to run the program:
    1) Stop your minecraft server. This is not yet designed to be run with a server accessing the world folder.
    2) copy the .jar file to the bin folder of your server
    3) make a manual backup of your world folder in case anything goes wrong!
    4) run the jar with the command "java -jar backuptest1.jar"
    5) follow the on screen instructions

    IF YOU ARE MAKING A RESTORE:
    The restored worlds are placed in the folder /restore. You need to copy them back to your bin folder manually. This procedure is temporary, I will have it overwrite the world folder in the next preview release. If you want to preserve your backups, remember to copy the backups filer in the world dir you are replaceing before you copy the restored world over.

    Now, I must reiterate: THIS IS A PREVIEW VERSION
    Although in my own testing this seems to work, do not trust your backups just yet. I am releasing this to let people have a play around with it and give me their findings. The best way of testing this now is to just release it to the community, so that's what i'm doing.

    If you would like to help, these are some of the things I need tested:
    1) backups at over 500MB
    2) successive backups every 12 hours or so
    3) restores to the initial backup after 10 or so backups of a large world

    Please tell me if you experience any problems or if any of the restores seem incorrect.
  11. Offline

    amunro

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    for some reason my 'server-restart-kick-message=Server is restarting\! Come back in 20 seconds\:)' doesnt actually leave a message. It just says some java error on restart! I have seen it working on other servers, any idea what it could be? Btw GREAT work on the map backup, thanks alot man!
  12. Offline

    drdanick

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    That feature hasn't been implemented yet :p
    The kick-on-restart feature will be part of the plugin that I am writing to accompany the wrapper. (You will have seen it in the hMod version of this, back when I had the plugin)
  13. Offline

    oliverw92

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    I maybe be just having a bit of a derp day, but how are you meant to stop the server via console without the wrapper restarting it?
  14. Offline

    drdanick

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    I've answered this quite a few times :p
    Type stop. When you see "Restarting..." press ctrl+c.
    I will implement a single command method of doing this in the next update.

    Alternatively, you can disable the restarts from your browser or the included UDP client.
  15. Offline

    oliverw92

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Ah ok, that's what i've been doing anyway. Sorry for the derp :p
  16. Offline

    amunro

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    ok thanks! Keep up the good work!
  17. Offline

    Thijsbeer

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Is there someone who has these two mods/plugins running together?
    its the biometerainmod and the serverremotetoolkit (formely known as minecraft restarter)
    http://forums.bukkit.org/threads/not-quite-a-plugin-but-all-the-same-biometerrainmod.1156/
    http://forums.bukkit.org/threads/se...kup-preview-formerly-minecraft-restarter.674/
    Seperatly they run fine but I cant get them to run at the same time.
    I start the biome with:
    screen -dmS mine java -Xmx1400M -Xms1000M -cp BiomeBukkit.jar:craftbukkit.jar org.bukkit.craftbukkit.Main

    the restarter starts with:
    screen -dmS mine java -Xmx30M -Xms30M -XX:MaxPermSize=40M -jar Minecraft_RKit.jar pass:word

    In the restarter properties I have the following settings
    minecraft-server-jar=craftbukkit.jar
    import-properties=false
    server-arguments=nogui
    extra-runtime-arguments=

    Thanks in advance for youre time

    EDIT: SOLVED http://forums.bukkit.org/threads/not-quite-a-plugin-but-all-the-same-biometerrainmod.1156/page-2
  18. Offline

    drdanick

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    I need to implement a correct way of doing this, but the following line in remote-toolkit.properties will work:

    extra-runtime-arguments=-cp,BiomeBukkit.jar\:craftbukkit.jar,org.bukkit.craftbukkit.Main,-o
  19. Offline

    drdanick

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Update!

    Release 10 Alpha 4
    -Added remote console access via Telnet!
    -Added wrapper specific commands to the console

    Still to come
    -Map backups integrated into wrapper
    -Scheduled restarts on a set time of day
    -The plugin, including all the lovely in-game features

    Wrapper console commands

    All wrapper specific console commands are preceded by a period.
    The following commands are recognized by the wrapper from the console:

    .help - displays a list of commands
    .stopwrapper - stops the wrapper and by extension, the server.
    .version - displays the wrapper version.
    .set <option> <value> - changes a setting. .set help displays a list of options.

    Accessing the remote console

    From windows
    1) Download PuTTY: http://the.earth.li/~sgtatham/putty/latest/x86/putty.exe
    2) Open PuTTY.exe
    3) Set your server address and remote port (default is 25561)
    4) Set telnet as the connection type and click open.
    5) Enter the username and password you set when starting the server.

    From linux/OS X
    1) In a terminal, enter the command telnet address port where address is the host name/ip of your server, port is the remote control port (default 25561)
    2) Enter the username and password you set when starting your server

    Because telnet is such a widely supported protocol, there are almost no platforms you won't be able to connect from. There's even a bunch of telnet clients for iOS devices (iSSH, for example)!
  20. Offline

    ToitagL

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Hi !

    First, thanks for your great, great plugin, which allow me to control my server from my HTC Desire. That's fantastic.

    I'm just having an issue with the auto-restart setting. Each time I start my server, I have the following message :

    Code:
    Minecraft Remote Toolkit V1.0_b13 ALPHA
    Loading toolkit properties... Error loading restart delay/forced restart delay
    ERROR !
    Minecraft_Mod.jar does not exist in the current directory !
    I do not understand because I'have specified the restart delay, and I don't use Minecraft_Mod.jar, which was Hmod name.

    Have you any clue ?

    Thanks again,
  21. Offline

    drdanick

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    That means the wrapper could not find the properties file and it constructed one out of the default settings. Open remote-toolkit.properties and make sure it is configured properly.
  22. Offline

    Wolfy9247

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    The problem I'm experiencing is that it'll just save the server every ~10 seconds even though it's set differently in the configuration. This was happening on any build of CraftBukkit that I tried to use it with (the mains ones were 125 and 136)
  23. Offline

    drdanick

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Delete remote-toolkit.properties and run the toolkit, then change the settings in the newly generated properties file as needed. I accidentally set the default save-all period in the included properties file to 30s, which I was using for debugging purposes.
    The problem you were having was likely that you added a second server-saveall-period setting in the properties file, rather than changing the included line.
  24. Offline

    Spiritax

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    i've lot of this error when closing a telnet connection (linux server).

    Telnet shell IO exception: java.net.SocketException: Broken pipe
    Telnet shell IO exception: java.net.SocketException: Broken pipe

    I think it try to send the message from the console to the telnet client even when the telnet client quit.
  25. Offline

    drdanick

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    That's normal. I'll have it give a more informative message in place of that particular exception in the next update.
    Either that, or i'll have it keep that particular exception from being printed to the console if people find it too bothersome.
  26. Offline

    SgtSpike

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    This is an excellent plugin, thanks for developing it.

    I have a question on formatting. I apologize if this has already been answered. I use some switches in my normal batch file (before using this plugin) that allowed for manual garbage collection and some other optimizations. This helped the server's lag immensely, and I need it back. You have an option to send extra arguments to the JRE/JVM with the config file, but I'm not quite sure how to format the following in a comma-separated way. I've tried various combinations with no success.

    -server -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSIncrementalPacing -XX:parallelGCThreads=4 -XX:+AggressiveOpts
  27. Offline

    drdanick

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    extra-runtime-arguments=-server,-XX\:+UseConcMarkSweepGC,-XX\:+UseParNewGC,-XX\:+CMSIncrementalPacing,-XX\:parallelGCThreads=4,-XX\:+AggressiveOpts

    (The \:'s are probably not needed, but it doesn't hurt to put them in)
  28. Offline

    sumTard

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    can you please make it so there is a small delay between stopping and restarting on scheduled restarts? I think this is causing issues with my plugins loading properly sometimes
  29. Offline

    drdanick

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    There is already a 5 second delay. I may need to reintroduce the brief thread sleep in the wrapper upon starting the server.
    I'll need to know what plugins you're having problems with.
  30. Offline

    Jobsti

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Hey drdanick, loved this plugin for hey0....and now for bukkit too ;)
    Thanks! (Works fine)
  31. Offline

    sumTard

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    nevermind on my crashing issue, it was unrelated it looks like.

    Would it be possible for you to make it so it also announces when a server save-all is complete? sometimes people are just clueless and ask if it was lag lol
  32. Offline

    drdanick

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Yep, that's an easy addition. I'll add it in the next version.

Share This Page