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

    Chojin



    Great work! :)

    I have another request.
    It restarts at every SEVERE exception.
    I know there are plugins that make SEVERE exception but I don't care.
    I would like to restart only when there is the exact expection "[SEVERE] Unexpected exception".
    Is it possible to customise the SEVERE message detection ?

    Thx!
     
  3. Ok, this isn't really your problem but you may be able to help me...

    I'm running this toolkit and decided I'd try to set up the server as a linux daemon using the Tanuki Java Wrapper.
    Now, this works fine and everything runs as planned... except telnet access (which I need if I want to control the server using the wrapper)

    However it doesn't just reject telnet access but instead this happens:
    It connects to the telnet and asks for username and password. Upon entering this information (whether is is correct or not) it sends back:
    Code:
    Nice try!
    Connection closed by foreign host.
    
    And in the server console you get:
    Code:
    22:53:13 net.wimpi.telnetd.net.ConnectionManager cleanupClosed
    INFO: cleanupClosed():: Removing closed connection Thread[Connection3,5,]
    
    So I wanted to know if you have any idea if it's possible to get telnet working through the wrapper (as this may be a feature of your toolkit). I understand if you can't help me though.

    Also, I haven't got the latest toolkit some I'm going to try now and test it.
    Edit: Made no difference
     
  4. Offline

    RchGrav

    A few things off of the top of my head...

    You are using a terminal emulation that is acting strange... try using putty as a test to see if it still happens. In actuality I doubt this is the problem.. I have found this implementation to be quite tolerant.. I mean... if it works with Window's telnet app, it should work with anything else. so lets pretend that isn't the issue for now.

    Are you sure you are still passing the username and password argument to the jar file? You need to verify that the rtoolkit.sh file has the username and password variables set and launch it with that as a test. Hopefully it works now and this is your issue.

    This is what the command to launch the wrapper looks like... you need to implement the same options if you are launching it in some alternative way.

    Code:
    java -Xmx30M -Xms30M -XX:MaxPermSize=40M -jar Minecraft_RKit.jar username:password
    Hope this helps!


    Rich
     
  5. Offline

    tremor

    confirmed on the previous build... i haven't updated yet to newest, that the wrapper lives and runs well using
    Code:
    java -Xincgc -Xmx15M -XX:MaxPermSize=20M -jar Minecraft_RKit.jar username:password
    24 hours no problems... -Xincgc is a garbage collection, not sure how efficient it is in this setup.. and notice 2nd line ix Xmx not Xms for those of you trying too eek out every last bit of availabel RAM
     
  6. Offline

    RchGrav

    drdanick,

    2 very important things, #1 a bug that kills the wrapper, and #2 a feature request.

    #1 The bug. If you try using the .help command in the console it is crashing your wrapper and the server instantly... it seems like a good opportunity to lose or corrupt data. I thought I wrote a note about it this morning, but apparently I didn't, because I don't see my post. I must have never hit submit. doh.

    I was actually afraid that I corrupted my data & I wasted most of the day trying different things to fix my "corrupt" world file... Including removing all of my plugins, and eventually reverting back to the vanilla minecraft_server.jar.... I was also testing .help and verified it is broken.. Here is my post from a bit ago, when I didnt realize the error was being generated by your wrapper... I had rolled back 3 days and started thinking that my backups had the same corruption because I hadn't noticed the errors.
    http://forums.bukkit.org/threads/server-expected-10-got-115-this-just-started-help.4062/#post-53350

    #2 The feature request. Can you change the echo mode for characters entered on the password field. Its not like there is someone always over your shoulder... but sometimes you run into someone else who wants to see how you have your server set up.. or whatever... Not a HUGE deal.. but its significant enough. It shouldn't be overly complicated to either turn echo off, return nulls, or maybe even get fancy and send back an asterisk for each character...

    btw, I love having the reliable telnet access to control my server.. good stuff... I have been using flippeh's multiplexer for telnet access, and all of my scripts, since day one... no matter what I do with my server I always have the my extra wrappers and minecraft console running inside of multiplexer.py which is configured to accept commands into my console over a raw tcp connection, or just a telnet into the shell.
    I have been running a server since October, and I learned early on that you can't depend on everything to work when new updates come out from Mojang. I decided to automate the backup and administration of my server so that no matter what, I would always have a reliable system for starting, restarting, mapping, updating, and backing up my server. I have to say that it has worked out really well for me.... and adding in your remote toolkit only makes it better. I'm really enjoying your telnet implementation.. the only catch w/ my other telnet was that it was more of a "RAW" implementation of telnet, rather than a full implementation.. which usually ended up losing connection, or not being compatible with certain telnet clients, while others would be fine.

    Thanks for the nice wrapper.... it really does fit in well with my setup.

    Much Gratitude,

    Rich
     
    drdanick likes this.
  7. Thank you for getting me to look in the right place... turns out it was quite an embarrassing mistake.

    It had been working before so I assumed it wasn't the problem (I thought I'd copy and pasted...) but in the launch command the password was spelled incorrectly :(

    Once again, thank you so much, I'd have never noticed the mistake if you didn't refer me to the authentications arguments...

    Also, what made you think I was using Windows? I was using telnet right from the linux terminal...

    And the idea of not showing password characters is just so natural now because it's how it's down in the Linux terminal... I've actually started to prefer it...

    But once again, thanks.
     
  8. Offline

    RchGrav



    Nah... I tested rtoolkit with the Windows 7 telnet..I didnt mean to imply that you were using it... the only reason I mentioned that was from my own experience with multiplexer.py in TCP socket mode... I could telnet into my mc console with putty, and with linux, but when I used the Microsoft telnet implementation it always said.. "incorrect password" and dropped me, which was similar to your situation (even though I was confident it wasn't your issue, I felt compelled to mention it, as D. Adams once said, an infinite improbability is still a finite possibility.) ... in contrast the Remote Toolkit's telnet implementation has worked with every telnet so far, including Windows 7.

    The other annoyance w/ multiplexer.py was the fact that it echoed back the password as it was entered, just like the user name.... the RFC's for telnet discuss being able to toggle echo, and if you are writing your own telnet server its actually harder to get characters to echo back to the client, because by default they won't. So hopefully its a really easy fix for drdanick.

    Regards,

    Rich

    PS.. How do you like that Tanuki Java Wrapper?... Is it good stuff?
     
  9. Offline

    Jobsti

    For me the jar und Putty are working, but my win7 telnet always want to connect with port 23?!
    It's just an info, because normally I use my vSphere or the jar ;)
     
  10. Offline

    RchGrav

    you need to specify the port...

    telnet x.x.x.x port

    so

    telnet 192.168.1.10 25561
     
  11. Offline

    drdanick

    Yeah, at the time I was counting on the fact that developers wouldn't log errors as severe in plugins when they should be warnings. Sigh.
    I'll look at improving the algorithm today, but it would help me greatly if people could post examples of severe exceptions that cause the server to behave abnormally or crash.

    I cannot replicate your .help bug on my end. Are you getting any exceptions, Or is the wrapper just stopping outright?

    I should be able to change the password mask easily enough, i'll have a look at implementing that shortly.
     
  12. Offline

    Nate204

    I have a quick question,

    My fav. plugin Big Brother is currently being neglected by it's developer, so the community needed to find a work around. They came up with a new BigBrother.jar file.

    This is what I need to run:
    So, How would I enter this into the config file of the restarter to enable them to work together correctly?
    I've tried a few diffrient things already, but I can't seem to get the restarter to launch it correctly...

    Thanks in advance for your help!!
     
  13. Offline

    drdanick

    try setting overridden-process-arguments to
    Code:
    java -cp mysql-connector-java-bin.jar:craftbukkit-0.0.1-SNAPSHOT.jar org.bukkit.craftbukkit.Main nogui
    
     
  14. Offline

    RchGrav

    I have tried every variation of your wrapper... all the way down to a pure vanilla configuration and when you run .help it just abruptly stops the server.. what is weird is that the other commands like .version don't.

    So yes.. no exception or anything.. you type .help, and on the console it just drops completely, no errors & server is crashed. Do you have any hunch as to what could be causing it?

    Rich

    UPDATE... I think I found the issue... not sure why its happening... but I mentioned in a previous post that I am using flippeh's multiplexer.... well as far as I know he also uses .close to end telnet connections to his wrapper. You would think its the period causing issues.... but the other commands like .version work... weird. I eliminated it and atleast it isn't bombing out...
    --- merged: Feb 12, 2011 9:10 AM ---
    Also.... Not sure if this is an error specific to me or not...

    When I make a connection to the telnet server, and then disconnect, and then reconnect, my connection count increases, Connection #2, Connection #3, etc. I get the following info on the main console after every line....

    Telnet Shell IO exception: java.net.SocketException: Broken Pipe

    The higher the connection, the more the actual console gets the Broken pipe errors... Its as if the telnet server thinks I'm still connected and then it gets an exception trying to send the data out.

    Also... when I start up fresh it always seems to think there is still a connection some place... How are you tracking connections that they persist after the wrapper is completely stopped and then restarted, is there a file or something that didn't get removed because of all of the abrupt stops?



    Rich
     
  15. Offline

    drdanick

    Does .set help work?


    The broken pipe errors should not be an issue, I will work on hiding them when they pertain to closed telnet connections. Out of curiosity, can i see the stack trace for the exceptions?

    Telnet connections are not stored externally to the wrapper, so there is no reason why you should be getting errors after a fresh start of the wrapper. What is the error/notice you are getting that relates to this issue?
     
  16. Offline

    RchGrav

    Here is my console output.. http://pastebin.com/ZVqP8LSG


    .set help does the same thing as .help, however .set restarts off doesn't...(ie. it works fine, as it should, no crash). is there any thing different about the data being sent to the console? Control characters?

    Also... What are these "expected: 10" errors trying to indicate?
    Code:
    [SERVER] 2011-02-12 04:34:23 [INFO] Done! For help, type "help" or "?"
    [SERVER] Feb 12, 2011 4:34:26 AM net.wimpi.telnetd.net.ConnectionManager makeConnection
    [SERVER] INFO: connection #1 made.
    [SERVER] Feb 12, 2011 4:34:26 AM net.wimpi.telnetd.net.ConnectionManager cleanupClosed
    [SERVER] INFO: cleanupClosed():: Removing closed connection Thread[Connection1,5,]
    [SERVER] 2011-02-12 04:34:28 [INFO] CraftIRC - Joined main channel: #minecraftjungle
    [SERVER] 2011-02-12 04:34:28 [INFO] CraftIRC - Joined admin channel: #mcjungle
    save-all
    [SERVER] expected: 10. got: 115
    [SERVER] expected: 10. got: 97
    [SERVER] expected: 10. got: 118
    [SERVER] expected: 10. got: 101
    [SERVER] expected: 10. got: 45
    [SERVER] expected: 10. got: 97
    [SERVER] expected: 10. got: 108
    [SERVER] expected: 10. got: 108
    [SERVER] 2011-02-12 04:34:31 [INFO] CONSOLE: Forcing save..
    
    Ok.. I think I figured out what those "expected 10"errors are (ascii values).. something expected a linefeed, but got an S, expected a linefeed but got an A, etc.... what is the deal with that?
     
  17. Offline

    drdanick

    Yep, it's a tab control character. I'll fix it ASAP.
     
  18. Offline

    RchGrav

    cool.. glad we found it.. I added to my reply... why does it keep saying something is expecting a linefeed, for every character of the command I enter?
     
  19. Offline

    drdanick

    Debugging lines that I forgot to remove ;) redownload to fix it. I'll have the tab fix up momentarily.
    --- merged: Feb 12, 2011 10:48 AM ---
    As for the broken pipe exceptions, I will need a little more time to get to the bottom of those. At the moment, they are completely harmless and will not be detrimental to the performance of your server.

    EDIT: the tab fix is up (tell me if it works or not). I'll now be looking into those exceptions.
     
  20. Offline

    clanslots

    Would it be possible to also have the port in the command line ?

    We are a game server provider, and would like to be able to run a console for our customer's servers, however if they can change the port via a config file, it could mess things up.
     
  21. Offline

    drdanick

    Update!

    Release 10 Alpha 7
    -Added the option to set the aggressiveness of the "SEVERE exception detection" algorithm as an integer between 1 and 3 (inclusive), where 1 is the least aggressive and 3 is the most.
    -Added the option to override the remote control port on startup via a command line argument.

    Usage is now: MinecraftRestarter [USERNAME:PASSWORD] (PORT) (where []s are required and ()s are optional.)


    Still to come
    -A decent attempt at getting this to work properly on Windows XP *sigh*
    -A plugin system
    -Scheduled restarts on a set time of day
    -Map backups integrated into wrapper
    -A wiki page for this
    --- merged: Feb 12, 2011 3:34 PM ---
    Done.
    If you would like, I am prepared to tailor the wrapper to fit your needs. Send me a PM if you would like that.
     
  22. Offline

    ssechaud

    Changelog?
     
  23. Offline

    drdanick

    No room left in the post :p
    I'm working on getting all the documentation moved off onto a Bukkit wiki page to free up some room.
     
  24. Offline

    RchGrav

    Nope... ".version" works, but not any of the help material.
     
  25. Offline

    Jobsti

    Oh *laugh*.... never used the Windows telnet, I used a :
    Ok, it works, connectet. Thanks for the tipp.

    But not "telnet 192.....", -> "telnet open 192......" ;)
     
  26. Offline

    drdanick

    Ok, this is suddenly very odd. Try this wrapper jar

    Oh, are you wrapping anything else around the toolkit? How exactly is your server set up?
     
  27. Offline

    RchGrav

    Yes... I do have something else wrapped around it... its a python script written by Flippeh that allows me to inject console command over pipes/tcp connections. Its actually pretty cool. its my "safeguard" against not having any automation when a new version of minecraft comes out. http://www.minecraftforum.net/viewtopic.php?f=1023&t=25194&sid=de27ca610d155e85fb5a72a296563ee9

    Oh.. and YES.. it did fix it.. what did it REALLY end up being?
     
  28. Offline

    drdanick

    Java's new line escape character. I need to look into the byte/byte sequence it uses. I'm guessing the python script doesn't like something about what it prints.
     
    RchGrav likes this.
  29. Offline

    RchGrav

    I put the link to the script in my previous post, just in case you wanted to check it out... Its similar functionality to your wrapper in certain ways, but also has a completely different use... one of the nice things about his, is that he has a TCP client that can interact with your console via scripts, from any machine, not just the MC server....

    Do you think it would be possible to add a mode where the wrapper launches and enables the telnet server, but would allow stopping and starting of the minecraft server without completely closing out? For example... what if you wanted to take your system offline for 30 minutes, and then want to be able to relaunch it with a UDP packet... It seems like a "start" command would be helpful... or is it something that isn't possible due to the way the rtoolkit works?

    Also.. I'm wondering if anyone has tried using netcat to interact with your wrapper.. I don't see why it wouldn't work? netcat can send UDP right?
     
  30. Offline

    o0AzzA0o

    SEVERE: Could not pass event PLAYER_COMMAND to ChatRooms
    java.lang.StringIndexOutOfBoundsException: String index out of range: 3

    this one doesnt crash my server

    but this one does
    [SEVERE] Unexpected exception
    java.lang.ArrayIndexOutOfBoundsException: -1
    at net.minecraft.server.ChunkCache.getTypeId(SourceFile:38)

    hope people keep up with posting logs because it will help make this great plugin more accurate at catching hang ups.

    thanks for all the time you spend on this plugin
     
  31. Offline

    Nate204

    I keep trying to change my Force Save, but it's stuck at 2 min. I set it to that at the start, just to make sure it worked correctly. After it did, I tried to change it to "20m" and it won't change. It keeps force saving every 2 minutes? Has anyone else had this problem? Maybe a fresh install of the plugin will fix it....
     
Thread Status:
Not open for further replies.

Share This Page