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

    Esaych

    When I set the: toolkit-autoshutdown-delay=21:30
    or any other 24 hour time of the day,
    when I run the toolkit, it replaces that 21:30 with a 21/:30
    then when it becomes 9:30PM, NOTHING happens.
    What did I do wrong?
     
  3. Offline

    knoxxcraft

    Ok. Then you could update the thread titile!

    thank you!
     
  4. I get the following error:

    Any idea?

    Edit: Its a virtual server with 2 GB RAM.
    Tried Debian 6.0 and Ubuntu 11.10,
    no difference :(
    Tried also other ram sizes, no change...



    wrapper.properties:

     
  5. Offline

    drdanick


    I've noted a few issues with explicit shutdown delays. I will look into it.
    Also, note that the automatic escaping of : does not affect anything.



    I leave it with the old version for a quiet period to let any problems arise before I change the version over. I will change the thread title in due course.

    @szroller's Issue was resolved in the IRC channel. (Missing 'M' from heap values in configuration)
     
  6. Offline

    untergrundbiber

    drdanick Can you post the source for the PHP restarter? Don't want to use my server-data on unknown php-scripts, so i will host it myself.
     
  7. Offline

    BJ_14

    hello i am new here (sorry about that) i have installed this plugin but when i try to RTK Controller in the UDP folder it says: java.net.SocketException: socket closed
    anybody who can help me out?

    (i am 15 years old and dutch)
     
  8. Hi everyone, this is my first time using this. (because i have an event comming up and can't be @ my pc to administrate, i want to use Adminium for iphone to still be able to controll everything.)

    Ok, my question/problem:

    I installed everything correctly (i think) and also installed JSONAPI + JSONAPI_RTK. (i also hope correctly)

    When i start the server it all works correctly, but i can't stop it anymore.
    When i stop the server with startup/stop script it says:

    Minecraft_RKit.jar could not be shut down... still running.

    I already tried to kill the process by commands but when i kill the process it just starts up a new one automatically.
    What is going wrong and please can someone help me?

    Server info:
    OS: Ubuntu 11.10 64bit
    memory: 16gb (10gb for craftbukkit)
    craftbukkit: 1.2.4 R1.0
    Server remote toolkit: 10a13
    JSONAPI: Bleeding build #55
    JSONAPI_RTK: v1.1

    startupscript:

    #!/bin/bash

    SERVICE="Minecraft_RKit.jar"
    USERNAME="bukkit"
    MCPATH="/home/bukkit/game"
    CPU_COUNT=1
    INVOCATION="java -Xmx30m -Xms30m -XX:MaxPermSize=40m -jar Minecraft_RKit.jar user: pass"
    BACKUPPATH="/home/bukkit/backup"

    "some more backup mambo jambo after that."

    Ofcourse i changed the user: pass to my personal needs. :)

    This is my wrapper.propperties:
    #Minecraft Remote Toolkit Properties File
    #Mon Apr 02 13:48:54 CEST 2012
    forced-restart-delay=
    maximum-heap-size=10024
    toolkit-autoshutdown-alerts=10m,5m,1m
    restart-on-severe-exception=false
    server-saveall-period=0
    extra-runtime-arguments=-Djline.terminal\=jline.UnsupportedTerminal
    force-save-on-restart=true
    server-heartbeat-threshold=1m
    server-restart-alerts=10m,5m,1m
    minecraft-server-jar=craftbukkit.jar
    initial-heap-size=1024
    overridden-process-arguments=
    failed-heartbeat-restart-count=5
    filter-ansi-escape-codes=auto
    severe-exception-detection-level=1
    server-arguments=nogui
    toolkit-autoshutdown-delay=0
    import-properties=false
    server-restart-delay=

    If more info is needed, i can give that of course.
    I really need it to work, because of my away-time.

    Greetz, and thx ApocolypseNL ps: sorry for the long text :p
     
  9. Offline

    drdanick


    You can find a slightly older version of the script on the first few pages of this thread.

    ApocolypseNL You need to make sure you are using the command .stopwrapper to stop the toolkit, not just stop.
     
  10. drdanick, thats a screen stop...

    I am using sudo commands to start/stop my server (not by screens) <--- for maintenance that is.

    But okay, if i have to use screens, then it must... Thanks for the info!

    edit: gonna try and build it into my start/stop script :p
     
  11. Offline

    mike2033

    Wow. This plugin works great @ Minecraft 1.2.4 and CraftBukkit #02126

    Very easy to use and my friends are able to control my server without any errors.

    Thank you very much and keep up the good work !! :)
     
  12. Offline

    jamcat22

    Can you add this to Bukkit dev? I use CButD (CraftBukkit up to date) and in order to auto update the file needs to be on Bukkit dev.
     
  13. Hi again,

    Got it all running and working :D

    But i got a question:

    Is it possible to complete delete the auto restart option?
    Because i really do not want to use it. The server does not need it and it is very annoying for the players.

    greetz ApocolypseNL
     
  14. If you mean thos delayed restarts simply put 0 in the config of the wrapper
     
  15. Np, glad i could help you using this great tool!
     
  16. Offline

    MinecraftPVP

    Well i fixed the udp port but it still doesnt work for some reason

    IT says this:

    Warning: fsockopen() [function.fsockopen]: php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/nstoneshavas/drdanick.com/mcremote/index.php on line 14

    Warning: fsockopen() [function.fsockopen]: unable to connect to udp:// 76.68.4.101:25561 (php_network_getaddresses: getaddrinfo failed: Name or service not known) in /home/nstoneshavas/drdanick.com/mcremote/index.php on line 14
    ERROR: 0 - php_network_getaddresses: getaddrinfo failed: Name or service not known
    \n
     
  17. Offline

    untergrundbiber

    But this dont work with the new UDP-protocol, please post a newer version
     
  18. Offline

    Pim1234

    i would like to start more than 1 jar than just minecraft.jar

    would that be somehow possible?
     
  19. Offline

    mike2033

    You can run the Servers on different ports.
     
  20. Offline

    Pim1234

    euhm... it's one server with 2 jars
     
  21. Offline

    mike2033

    I dont really understand your question. More than minecraft.jar? You mean Bukkit or minecraft.jar?!
     
  22. Offline

    Pim1234

    yes, i want to start craftbukkit.jar + another jar.
     
  23. Offline

    Esaych

    Have you tried to edit your .bat file to be:

    Echo off
    java -Xmx30M -Xms30M -XX:MaxPermSize=40M -jar Minecraft_RKit.jar user:pass
    java -Xmx1024M -Xms1024M -jar "other jar"

    or even:

    Echo off
    java -Xmx1024M -Xms1024M -jar craftbukkit.jar
    java -Xmx1024M -Xms1024M -jar "other jar"

    It's just another line of code...
     
  24. Offline

    Sabotage

    I use the following method to start mineshafter and craftbukkit
    edit wrapper.properties and change overridden-process-arguments= to:

    overridden-process-arguments=java -Djline.terminal\=jline.UnsupportedTerminal -Xms256M -Xmx256M -jar Mineshafter-server.jar craftbukkit-1.2.5-R1.0.jar
     
  25. Offline

    Pim1234

    thanks a lot!

    Code:
    [Mineshafter Squared] Current proxy version: 3.5[Mineshafter Squared] Gotten proxy version: 3.5Trying to proxy on port 9000Proxying successful[Mineshafter Squared] Something bad happened:java.util.zip.ZipException: error in opening zip file
        at java.util.zip.ZipFile.open(Native Method)
        at java.util.zip.ZipFile.<init>(ZipFile.java:127)
        at java.util.jar.JarFile.<init>(JarFile.java:135)
        at java.util.jar.JarFile.<init>(JarFile.java:72)
        at mineshafter.programs.MineServer.main(MineServer.java:90)
    Restarting...
    
    :(

    when i use my default start.command it works fine...

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

    Pythros

    Any updates on this?
     
  27. Offline

    agentc0re

    I created a init script to use with rtoolkit.
    Pastebin link: http://pastebin.com/z3DRRWHc
    Explanation from the Spacebukkit forums link: http://forums.xereo.net/threads/initscript.294/
    Code:
    Code:
    #!/bin/bash
    # /etc/init.d/minecraft
    # version 0.3.7 2012-03-06 (YYYY-MM-DD)
    # Updated by agentc0re
    # version 0.3.8 2012-04-08
    # Changed script to work for rtoolkit
     
    ### BEGIN INIT INFO
    # Provides:  minecraft
    # Required-Start: $local_fs $remote_fs
    # Required-Stop:  $local_fs $remote_fs
    # Should-Start:  $network
    # Should-Stop:    $network
    # Default-Start:  2 3 4 5
    # Default-Stop:  0 1 6
    # Short-Description:    Minecraft server
    # Description:    Starts the minecraft server
    ### END INIT INFO
     
    #Settings
     
    #Linux username that the service will run as
    USERNAME='minecraft'
    MCPATH='/home/minecraft/Minecraft'
     
    #screen path location.
    SCREEN=$(which screen)
     
    #Java path location and options.  The path should
    #be found automatically, but you can specify it manually
    #if you run into issues.
    #JAVA="/PATH/TO/JAVA"
    JAVA=$(which java)
    JAVAOPTS="-Xmx30M -Xms30M -XX:MaxPermSize=40M"
     
    #User and Pass for rtoolkit
    USER=
    PASS=
    SERVICE='Minecraft_RKit.jar'
    INVOCATION="$JAVA $JAVAOPTS -jar $SERVICE $USER:$PASS"
     
    ####
    # Shouldn't need to edit anything below this line
    ####
     
    ME=`whoami`
    as_user() {
      if [ $ME == $USERNAME ] ; then
        bash -c "$1"
      else
        su - $USERNAME -c "$1"
      fi
    }
     
    mc_start() {
      if  pgrep -u $USERNAME -f $SERVICE > /dev/null
      then
        echo "$SERVICE is already running!"
      else
        echo "Starting $SERVICE..."
        cd $MCPATH
        as_user "cd $MCPATH && $SCREEN -dmS minecraft $INVOCATION"
        sleep 7
        if pgrep -u $USERNAME -f $SERVICE > /dev/null
        then
          echo "$SERVICE is now running."
        else
          echo "Error! Could not start $SERVICE!"
        fi
      fi
    }
     
    mc_saveoff() {
      if pgrep -u $USERNAME -f $SERVICE > /dev/null
      then
        echo "$SERVICE is running... suspending saves"
        as_user "$SCREEN -p 0 -S minecraft -X eval 'stuff \"say SERVER BACKUP STARTING. Server going readonly...\"\015'"
        as_user "$SCREEN -p 0 -S minecraft -X eval 'stuff \"save-off\"\015'"
        as_user "$SCREEN -p 0 -S minecraft -X eval 'stuff \"save-all\"\015'"
        sync
        sleep 10
      else
        echo "$SERVICE is not running. Not suspending saves."
      fi
    }
     
    mc_saveon() {
      if pgrep -u $USERNAME -f $SERVICE > /dev/null
      then
        echo "$SERVICE is running... re-enabling saves"
        as_user "$SCREEN -p 0 -S minecraft -X eval 'stuff \"save-on\"\015'"
        as_user "$SCREEN -p 0 -S minecraft -X eval 'stuff \"say SERVER BACKUP ENDED. Server going read-write...\"\015'"
      else
        echo "$SERVICE is not running. Not resuming saves."
      fi
    }
     
    mc_stop() {
      if pgrep -u $USERNAME -f $SERVICE > /dev/null
      then
        echo "Stopping $SERVICE"
        as_user "$SCREEN -p 0 -S minecraft -X eval 'stuff \"say SERVER SHUTTING DOWN IN 10 SECONDS. Saving map...\"\015'"
        as_user "$SCREEN -p 0 -S minecraft -X eval 'stuff \"save-all\"\015'"
        sleep 10
        as_user "$SCREEN -p 0 -S minecraft -X eval 'stuff \".stopwrapper\"\015'"
        sleep 15
      else
        echo "$SERVICE was not running."
      fi
      if pgrep -u $USERNAME -f $SERVICE > /dev/null
      then
        echo "Error! $SERVICE could not be stopped."
      else
        echo "$SERVICE is stopped."
      fi
    }
     
    mc_command() {
      command="$1";
      if pgrep -u $USERNAME -f $SERVICE > /dev/null
      then
        pre_log_len=`wc -l "$MCPATH/server.log" | awk '{print $1}'`
        echo "$SERVICE is running... executing command"
        as_user "$SCREEN -p 0 -S minecraft -X eval 'stuff \"$command\"\015'"
        sleep .1 # assumes that the command will run and print to the log file in less than .1 seconds
        # print output
        tail -n $[`wc -l "$MCPATH/server.log" | awk '{print $1}'`-$pre_log_len] "$MCPATH/server.log"
      fi
    }
     
    #Start-Stop here
    case "$1" in
      start)
        mc_start
        ;;
      stop)
        mc_stop
        ;;
      restart)
        mc_stop
        mc_start
        ;;
      status)
        if pgrep -u $USERNAME -f $SERVICE > /dev/null
        then
          echo "$SERVICE is running."
        else
          echo "$SERVICE is not running."
        fi
        ;;
      command)
        if [ $# -gt 1 ]; then
          shift
          mc_command "$*"
        else
          echo "Must specify server command (try 'help'?)"
        fi
        ;;
     
      *)
      echo "Usage: $0 {start|stop|status|restart|command \"server command\"}"
      exit 1
      ;;
    esac
     
    exit 0
    
    Feel free to include this with rtoolkit if you see fit. Personally, I think there should have been one from the start. :D Or at least one that starts the process in a new shell/screen.
     
    HereInPlainSight likes this.
  28. Offline

    Gatanater

    How do I set it so that it restarts every hour??
     
  29. Offline

    agentc0re

    well that depends on a lot. windows versus linux.. This is a script for Linux, and depending on your distro would also depend on how to setup a cronjob. Google that, and you'll be all set.
     
  30. Offline

    Belgarufo

    Dang tested this out on my test server (windows vista) and it was easy to install and smooth running! Just outstanding!! Then when i get home to install it on my public server (windows xp) I run into the bug...

    GREAT IDEA! Love the work! Get the xp bug fixed and I'll donate for sure! silly thing can't even find the .jar file even though it is in the same folder as the .bat heck it can't find it when I run in the cmd window and have navigated to it.
     
Thread Status:
Not open for further replies.

Share This Page