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

    Kane

  3. Offline

    drdanick

  4. Offline

    Kane

    It makes it so the users logged in lag out and stop people from logging in.. Though console fully works I can even do save-all stop and such. Just can't actually go in game and play... The chunks seam to also stay loaded that where in last but not crashed.. So if you get this error with 5 people save-all instant but if it happens with 50 save-all is super slow since lots of chunks are loaded.. And this is hours after the crash.

    If you want more info I posted it here:

    http://forums.bukkit.org/threads/critical-smp-bug-plague-some-servers-none-bukkit-bug.949/
     
  5. Offline

    drdanick

    Unless there's an easy, efficient way of detecting this I don't see a way of getting that implemented. The best thing to do would be to lower the restart period to lower the chance of such a thing occurring.
     
  6. Offline

    cbresee

    I'm trying to run 3024M which runs fine with craftbukkit, and I need the extra ram to keep things stable.
    I'm running it with screen -S minecraft java -jar Minecraft_RKit.jar user:pass

    /proc/meminfo:
    MemTotal: 4194304 kB
    MemFree: 3815032 kB
    Buffers: 0 kB
    Cached: 0 kB
    SwapCached: 0 kB
    Active: 0 kB
    Inactive: 0 kB
    HighTotal: 0 kB
    HighFree: 0 kB
    LowTotal: 4194304 kB
    LowFree: 3815032 kB
    SwapTotal: 0 kB
    SwapFree: 0 kB
    Dirty: 0 kB
    Writeback: 0 kB
    AnonPages: 0 kB
    Mapped: 0 kB
    Slab: 0 kB
    PageTables: 0 kB
    NFS_Unstable: 0 kB
    Bounce: 0 kB
    CommitLimit: 0 kB
    Committed_AS: 0 kB
    VmallocTotal: 0 kB
    VmallocUsed: 0 kB
    VmallocChunk: 0 kB
    HugePages_Total: 0
    HugePages_Free: 0
    HugePages_Rsvd: 0
    Hugepagesize: 2048 kB

    any ideas? The restarter would help me a ton if I could get it working because I seem to start to get a lot of lag when it is on for too long.
     
  7. Offline

    drdanick

    Firstly, try using this command to run your server:
    screen -S minecraft java -Xmx25M -Xms25M -XX:MaxPermSize=30M -jar Minecraft_RKit.jar user:pass

    Secondly, drop the minimum and maximum memory settings in remote-toolkit.properties to 2500M each. You shouldn't be allocating such a high percentage of your ram to the server, especially when that total amount isn't always guaranteed.
     
  8. Offline

    cbresee

    First command worked, but when I drop it to 2500M in properties it does not. I'll try changing that above command to have the right amount of ram and see what happens.
    --- merged: Jan 19, 2011 4:19 PM ---
    still does not work.
     
  9. Offline

    drdanick

    Did you say that starting the server with
    screen -S minecraft java -Xmx25M -Xms25M -XX:MaxPermSize=30M -jar Minecraft_RKit.jar user:pass
    worked when you set the heap sizes to 3024M, but not when set to 2500? I cannot see how that is possible.

     
  10. Offline

    cbresee

    No, the command worked when set to 25M, but it continues not to work at higher ram amounts.
     
  11. Offline

    drdanick

    Those are the heap sizes for the wrapper, not the server. Leave them as they were.
    Only change the values in remote-toolkit.properties
     
  12. Offline

    cbresee

    Works great now thank you!
     
  13. Offline

    rps96

    i was testing it, and it does not work.
    the error is "java.net.SocketException: socket closed"
    please help me
     
  14. Offline

    amunro

    I have two problems! One is that on server restart, it never restarts the server. In the console it says unknown command. Everything else works fine (save,start etc) just stop is broken. Also, when my OOM-Killer kills the process, the restarter stops for some reason, which defeats the point.
     
  15. Offline

    drdanick

    That "error" occurs when the UDP server socket restarts itself. It is completely normal and should not effect the performance of the wrapper.

    What build of bukkit are you using and what version of the toolkit are you using? I recently released a version to address that issue.
    As for the OOM-Killer problem, I will look into it.
     
  16. Offline

    Dan Z

    It looks like they reverted the # before server commands, so you'll have to unfix that [​IMG]

    This is a really helpful tool, thanks.
     
  17. Offline

    amunro

    plssss update fast! I need this!
     
  18. Offline

    drdanick

    Haha, the wrapper is supposed to try both commands, turns out I forgot to add "stop" back to the restart function.
    I've uploaded the fix, link in the original post.
     
  19. Offline

    amunro

    anyone know how i can use this program to restart on OOM-killer. My server crashes every few hours or so due to OOM-killer but unfortunatly it kills the restarter program aswel as the server!
     
  20. Offline

    drdanick

    Odd. I can't see why it would be targeting the restarter. Try launching the wrapper with the following command:
    java -Xmx25M -Xms25M -XX:MaxPermSize=30M -jar Minecraft_RKit.jar user:pass

    Also, how much ram are you allocating to the server in remote-toolkit.properties?
    Can you also give me the first couple of lines of the output of the command cat /proc/meminfo
     
  21. Offline

    amunro

    ok heres the thing, the server only has 650mb of ram which is very low anyway, but unfortunately i cannot change this. I think it kills the restarter because it kills java. I execute the server with 'java -jar Minecraft_RKit.jar mc:1234'
    and here is my config file:

    Code:
    #MinecraftRestarter Properties File
    #Thu Jan 20 23:58:48 EET 2011
    minecraft-server-jar=minecraft.jar
    server-saveall-period=5m
    maximum-heap-size=256M
    import-properties=false
    server-restart-delay=30m
    server-arguments=nogui
    remote-control-port=25561
    server-restart-alerts=5m,1m
    initial-heap-size=256M
    server-restart-kick-message=Server is restarting\! Come back in 20 seconds\:)
    forced-restart-delay=20s
    extra-runtime-arguments=
    
    I have tried the following heap sizes: 1024 - does not run (not enough memory for vm)
    512 - runs fine but crashes after about 30-60 minutes
    256 - runs fine but crashes after 40-120 minutes

    Nope still doesn't work using 'java -Xmx25M -Xms25M -XX:MaxPermSize=30M -jar Minecraft_RKit.jar user:pass'.

    here are my kernal logs of it helps. IDK what to do :S!


    P.S is there any reason why minecraft is taking up so much ram. Iv been reading around and ppl seem to agree that there has been a massive increase in ram usage since the recent patch! Someone said that there ram usage has gone up from 30% to 90% with the same number of players! If anyone could shed some light into what java -XmM -XmsM i use or how to reduce my ram usage and stop it crashing, please say! I am lost...

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

    Kilandor

    I created a little web based php script for this i'll share, others might want it. It has no auth, I just used http auth, and its in no way pretty, simply functional.

    Just name your file restarter.php or whatever you want (just update the html form)
    PHP:
    <?php
    error_reporting
    (E_ALL E_NOTICE);

    $ip '127.0.0.1';
    $port 25561;
    $user 'user';
    $pass 'pass';

    if(
    $_POST['submit'])
    {
        
    $fp fsockopen('udp://'.$ip$port$errno$errstr);
        if (!
    $fp)
        {
            echo 
    '<span style="color:red;">ERROR: '.$errno.' - '.$errstr.'<br />\n';
        }
        else
        {
            
    fwrite($fp$_POST['command'].':'.$user.':'.$pass);
            echo 
    '<span style="color:green;">'.fread($fp128).'</span>';
            
    fclose($fp);

        }
    }
    echo 
    '<html><body>
    <form action="restarter.php" method="post">
    <select name="command">
    <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>
    <option value="version">Version</option>
    </select>
    <input type="submit" value="submit" name="submit" />
    </form></body></html>'
    ;
    ?>
     
    cyberbobjr likes this.
  23. Offline

    amunro

    Please if you could add a way to broadcast a message every so often to the wrapper then that would be amazing! My motd isnt big enough!
     
  24. Offline

    Kilandor

    To me that would be something for another plugin, it wouldn't have much place in this.
     
  25. Offline

    drdanick

    Wow, i'm amazed you actually got it working. The server caches a lot of stuff into memory, and a lot of it is necessary. You shouldn't really be running the server with anything less than 1024M allocated to the heap, and certainly not when you don't have that much ram available in the first place.

    My only advice is to lower the restart period to be about 10 minutes before it usually crashes. Other than that, there isn't really any way of fixing this short of getting more ram. Sorry I couldn't be more of a help.

    You mean just schedule a generic message? Maybe in the future, but it seems like that would be more suited to another plugin.

    Excellent work! I was thinking of writing something like that a while ago, but my knowledge in PHP is rather lacking. I'll see if I can put that up somewhere on my web host.

    You might want to add fields for the username, password, host address and port variables. I could do this myself, but it'd probably take me slightly longer :p
    This would be nice if I could just host it in one place, and give everyone access to it. It would certainly solve the problem of the iOS restart process being convoluted.
     
  26. Offline

    amunro

    Plugin seems to be outdated because with the new builds it seems to restart randomly without warning! seems to be happening every few minutes!

    heres my config file:
    Code:
    #MinecraftRestarter Properties File
    #Fri Jan 21 05:17:37 EET 2011
    minecraft-server-jar=minecraft.jar
    server-saveall-period=5m
    maximum-heap-size=256M
    import-properties=false
    server-restart-delay=30m
    server-arguments=nogui
    remote-control-port=25561
    server-restart-alerts=5m,1m
    forced-restart-delay=20s
    server-restart-kick-message=Server is restarting\! Come back in 20 seconds\:)
    initial-heap-size=256M
    extra-runtime-arguments=
    
     
  27. Offline

    drdanick

    That just means the server is crashing. The actual scheduled restarts are controlled from the wrapper and are unaffected by the server version.
     
  28. Offline

    amunro

    so my new build is crashing! Odd! Surely it would say an error message?!?
    --- merged: Jan 21, 2011 5:03 AM ---
    something is definitely wrong! This time it isn't OOMkiller and there are no messages, sometimes it gets stuck in a restart loop! it starts the server, gets fully spawned and then says restarting again!
     
  29. Offline

    drdanick

    Download an older bukkit build.
     
  30. Offline

    Kilandor

    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 :)
     
  31. Offline

    drdanick

    Haha, indeed I did! I'll replace it with your new version, it seems more polished.
     
Thread Status:
Not open for further replies.

Share This Page