[INACTIVE][ADMN] AutoStop v0.53 - Time-Based Server Shutdowns and Restarts [531]

Discussion in 'Inactive/Unsupported Plugins' started by dv90, Mar 6, 2011.

  1. Offline

    dv90

    Server AutoStop
    Time-Based Scheduled Server Shutdowns and Restarts
    I no longer support this plugin as I don't have the time. Sorry. Plugin devs. can edit the source and release it as they want. The current version is somewhat functional on some systems but not others.

    Version: v0.53
    Source: v0.53
    Requirements: Permissions v2.0/2.5+ (Optional)

    A simple plugin that saves player and chunk data then shuts the server down at a specified time.

    The plugin will automatically put AutoRestart.jar in your bukkit directory.
    Don't run it; it won't do anything.
    Do not delete or move it.
    If your server doesn't auto restart, post your restart_log.txt here.
    If there is no restart_log.txt, you're doing it wrong.
    If you use a .bat file (server_nogui.bat), set your path to: path=start server_nogui.bat

    NOTE TO ANYBODY USING AN EXTERNAL SERVER:
    Remember, your server's timezone may be different. Take that into account when setting up your autostop.properties.

    Features:
    • Saves Player Data
    • Saves Chunk Data
    • Gives a custom warning at specified time before shutting down
    • Quickly shuts server down
    • Uses autostop.properties to specify what time (24-hour clock) it should shutdown at
    • Automatically creates the properties file if it doesn't exist
    • Automatically restarts server (if you enable it)
    • Multiple restart times
    Changelog (open)

    Version 0.53 (Current)
    • Fixed a few small bugs
    • Kicks all players before shutting down
    • Updated to latest RB
    Version 0.52
    • Supports multiple warn times now
    • Other small fixes
    Version 0.51
    • Fixed a small problem with the syntax of the auto-generated autostop.properties file.
    Version 0.5
    • Multiple stop/restart times
    • Added better support for Windows cmd users
    Version 0.4
    • /reboot and /restart commands
    • Permissions support for commands
    Version 0.3
    • Automatic server restarts
    • Stop/Warn time precision works with seconds now
    Version 0.2
    • Added configurable warning message and warning time
    • Attempted automatic restarts but had no luck; possible in a future release
    Version 0.1
    • Release

    FAQs (open)

    Don't use permissions? Just OP yourself.

    What is the permission? autostop.use


    Commands:
    • /reboot - Immediately saves data and restarts the server.
    • /restart - Same as reboot.
    Properties Example:
    Code:
    stoptime=12:00:00 12:05:00 12:10:00
    # Use 24-hour time. Separate times with a space. [Hour:Minute:Second]
    warntime=0:10 0:30 1:00 5:00 15:00
    # Displays warning this many min:sec before shutting down. Separate with space. [Minutes:Seconds]
    warnmsg=Shutting down...
    # Warning message to display.
    enablerestart=true
    # Enables automatic server restarts. If this is true, path must not be blank.
    path=java -jar craftbukkit.jar
    # Path to server file (including any arguments). This can also be a command if you are using crontab/screen/etc.
    # Linux screen example:
    # path=screen -dmS MinecraftServer java -jar craftbukkit.jar
    
    Suggestions and feedback appreciated! :)
     
  2. Offline

    Phaedrus

    bukkit 531
    when doing a /restart in game, it shuts down the server and then fails to start back up. The process just sits there chewing on ram until I kill it.

    Here's the error log: http://pastebin.com/raCRHxsh
     
  3. Offline

    dv90

    The only thing I can think of is that the server isn't shutting down fast enough and the new one is unable to bind to the port, so it just sits there. But, I wouldn't think that would happen, it has a whole 2.5 seconds for the original server to close AFTER it saves the chunk/player data, so it doesn't seem very likely. It would be helpful if you were on linux instead and could view the console after it restarts; without it, debugging is difficult.

    I was still testing on 522, so I tried 531 and 534. Had no problem on any of them. I honestly don't know why it would be doing that for you. Hopefully it will magically resolve itself, if not, sorry. :(

    ----

    For everybody else, I hope to get multiple restart times implemented and a new update out tomorrow. If anybody has any other ideas, feel free to let me know.
     
  4. Offline

    Phaedrus

    Ok, I did some more testing. It is restarting, but it kills the cmd prompt window and doesn't respawn it. I can still connect to the server, but completely lose the console.
     
  5. Offline

    Steven

    I updated to the latest RB. I am now getting the same issue as jasonznack. I think I am going to hold off on incorporating this plugin until you are able to update it. Awesome plugin though! A+ :)
     
  6. Offline

    darkwarriors

    Code:
    stoptime=10:48:00
    # Use 24-hour time. [Hour:Minute:Second]
    warntime=10:47:00
    # Displays warning message at this time. [Hour:Minute:Second]
    warnmsg=il server verra restartato
    # Warning message to display.
    enablerestart=true
    # Enables automatic server restarts. If this is true, path must not be blank.
    path=screen -AmdS minecraft java -Xmx1512M -Xms1512M -jar craftbukkit-0.0.1-SNAPSHOT.jar nogui
    # Path to server file (including any arguments). This can also be a command if you are using crontab/screen/etc.
    that is my config file, the plugin stop server correctly but doesnt restart it, no log file have been created!
    build 531!
     
  7. Offline

    Phaedrus

    I've switched to using a scheduled task that calls a VBscript that targets the console window, enters the stop command, and then another scheduled task 1 minute later that runs the server start batch file. Until this plugin is working better for windows users, I suggest they do the same.

    You can see my VB script here: http://pastebin.com/RTWaQnzF
    Just paste it into a text file and save it with a .vbs extension

    Keep up the good work on this plugin btw.
     
  8. Offline

    lolox22

    what is correct syntax for Linux and Windows path in autostop.properties ?
    path = ?

    thx
     
    jasonznack likes this.
  9. Offline

    dv90

    Yeah. I said that earlier.

    For everybody else that is having trouble, it's not with the plugin. Look at the video in the first post (when I get it uploaded) to make sure you're doing it right. Windows users: THE CONSOLE WILL NOT REOPEN (as of right now).

    I put an example in the first post.
    path=java - jar craftbukkit.jar
    It doesn't matter if you're on linux or windows.
     
  10. Offline

    Phaedrus

    Oops. Sorry I missed that.
     
  11. Offline

    PatrickFreed

    does thsi still work with b493?
     
  12. Offline

    darkwarriors

    in linux we have to add chwmod to autostart.jar? beacause it doesnt seem to works stop correctly but doesnt restart itself!
     
  13. Offline

    Kevin Forte

    So a question about getting it to auto-restart: I use a batch file to start my server, and the contents look like this:

    Code:
    @echo off
    "%ProgramFiles%\Java\jre6\bin\java.exe" -Xincgc -Xmx4G -jar craftbukkit-0.0.1-SNAPSHOT.jar
    pause
    What would the 'Path=' portion of the properties file look like?
     
  14. Offline

    Phaedrus

    I just put the name of te batch file in the path and it was still able to launch the server.
     
  15. Offline

    dv90

    Just put the path to that .bat file in there:
    path=bukkit.bat

    Note to everybody: The path is from your bukkit directory, not /plugins.
    [MERGETIME="1299892606"][/MERGETIME]
    If it doesn't work, then it doesn't work. I can't make it work for older builds. Sorry.

    Nah it's cool. Thanks for all the feedback. I'll have an update tonight or tomorrow with multiple restart times and a fix for Windows users.
    [MERGETIME="1299894113"][/MERGETIME]
    Alright, I got the update out.

    Windows users: If the server restarts successfully, it will now open a new command prompt. If not, your path is wrong. Default is something like: "java -jar craftbukkit.jar" (no quotes)
     
  16. Offline

    PatrickFreed

    I'll test it out and let you know what happens. I'm just not ready to move to higher builds.
     
  17. Offline

    dirkson

    There's a certain irony in the fact that this module neither works with the 493 build I had nor the 528 build I updated to specifically make this module work.

    04:28:52 [SEVERE] 1 loading ServerAutoStop v1.0.0 (Is it up to date?)
    java.lang.ArrayIndexOutOfBoundsException: 1
    at net.hailxenu.serverautostop.AutoStopLoop.<init>(AutoStopPlugin.java:205)
    at net.hailxenu.serverautostop.AutoStopPlugin.onEnable(AutoStopPlugin.java:164)
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:118)
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:451)
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:217)
    at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:83)
    at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:61)
    at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:204)
    at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:191)
    at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:131)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:246)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
     
  18. Offline

    Anavrins

    Hi,
    I am using Byobu so I can get to the server console remotely, this is the path I am using
    "path=java -Xmx1024M -Xms1024M -jar craftbukkit-0.0.1-SNAPSHOT.jar"

    When I type /restart in game, it does stop the server, and restart it, however, somewhere else not into byobu.
    What should I type to make it restart into byobu?
    I tried "path=byobu java -Xmx........" and no success :/
     
  19. Just a small question before i can decide if i should use this.

    Is it possible to give multiple warning intervals? for example i would like to warn them 30min, 15min 5min and 15sec before a shutdown... message could just be the same except allow you to add the time untill restart/shutdown (don't know how, maybe with some syntax like most chat plugins use, like "server shutdown in %time")
     
  20. Offline

    darkwarriors

    in linux os still doesnt work with full path!
     
  21. Offline

    lolox22

    path=screen -AmdS minecraft-smp java -Xms1048M -Xmx2048M -jar craftbukkit-0.0.1_522.jar nogui

    serveur don't restart :(

    Why ?


    thx
     
  22. Offline

    darkwarriors

    yes same problem.. i've tried also with path=start.sh but dont work
     
  23. Offline

    dv90

    Your autostop.properties is wrong. You don't have xx:xx in the warntime property. This is partially my fault since the default properties file generated only has "warntime=30", but if you look at the properties file in the first post, it shows "warntime=0:15". I'll fix that small problem soon.

    No not yet, however I do plan to add that in the near future.

    Post your properties file contents. You have to be doing something wrong. This plugin works perfectly. Your useless "in linux os still doesnt work with full path!" posts don't help at all. If you aren't going to try to help yourself and follow my instructions, don't waste my time. I'm not trying to be mean, but nearly all of these problems have been a result of end-user incompetence. If you can't figure it out, you shouldn't be running a Bukkit server in the first place. Now, if there is a legitimate bug, I appreciate you reporting it, but I need your autostop.properties file and any exceptions you get in order to determine whether the problem is incorrect setup or a problem within the plugin.


    NOTE TO ANYBODY USING AN EXTERNAL SERVER (MAINLY LINUX):
    Remember, your server's timezone may be different. Take that into account when setting up your autostop.properties.


    Sorry, I'm not familiar with Byobu, so I have no idea what the command syntax is or anything.
     
  24. Offline

    Anavrins

    Byobu is a (wrapper?) of the GNU Screen, they use the exact same syntax IIRC.
    Though I've learned a bit more how Screen (and Byobu) works, but I still can get it to restart correctly :(
     
  25. Offline

    dv90

    Are you sure you're using the correct time on your server? That is the most popular problem. I have tested it with and without screen and it works perfect, so there must be some small thing wrong. Does it actually start the shutdown process, or just sit there?
     
  26. Offline

    Anavrins

    Hmm, maybe, it is the second Sunday of March so we need to advance the time by one hour here, I'm gonna try this.
    Though, I do host on my computer, not on a dedicated server (which can have a different time than mine).
     
  27. Offline

    dv90

    Oh well then I'm not too sure. All I can say is, make sure you're using the correct 24-hour time. I'll keep helping you if you can't figure it out. Thanks for taking interest in my plugin anyways. :)
     
  28. Offline

    dirkson

    Brilliant, works perfectly.

    I don't understand how people get along without this module. Does EVERYONE manually restart the server ever 12-24 hours to reset the memory leaks?
     
  29. Offline

    gnftoxic

    yes. :p
     
  30. Offline

    dv90

    Thanks, glad you could figure it out.
    [MERGETIME="1299997806"][/MERGETIME]
    v0.52 is out and supports multiple warn times, as requested by: Graloth
     
  31. Offline

    jeddeliso

    help, dunno what im doing wrong,

    my AutoStop config

    stoptime=10:30:00
    # Use 24-hour time. [Hour:Minute:Second]
    warntime=09:59:00
    # Displays warning message at this time. [Hour:Minute:Second]
    warnmsg= The server will turn off in 1 min finish your jobs NOW!
    # Warning message to display.
    enablerestart=true
    # Enables automatic server restarts. If this is true, path must not be blank.
    path=C:\Users\Julia\Desktop\MineCraft\Bukkit\RUN.bat
    # Path to server file (including any arguments). This can also be a command if you are using crontab/screen/etc.
    [MERGETIME="1300003053"][/MERGETIME]
    oh i forgot, heres my restart_log file

    java.io.IOException: Cannot run program "C:\Users\Julia\Desktop\MineCraft\Bukkit": CreateProcess error=2, The system cannot find the file specified
     

Share This Page