[INACTIVE][ADMN] MCCRestart v1.2.5 - Scheduled and delayed server restarts [677]

Discussion in 'Inactive/Unsupported Plugins' started by Cr@zy, Apr 9, 2011.

  1. Offline

    Cr@zy

    mccrestart.png
    Version: v1.2.5​

    MCCRestart is a tool to schedule server restarts. It saves player and chunk data before each restarts at specified times or delays and gives a warning message to each players before restart. You can also give a reason for the restart. (see commands section)
    If a problem occurs during restarts, post the mccrestart.log

    In your config.yml file you can specify for the launch parameter a batch file.
    Eg. 'run.bat' (you can download the run.zip join to this post)

    If the Permissions plugin is not detected, only OPs can use restart and mccrestart commands.

    [​IMG]MCCRestart v1.2.5
    Requirements: Java6+, Bukkit 677
    Optional: Permissions 2.0/2.7+

    For versions before 1.2.5 check YAML files!

    Features
    - Restarts server at specified time (24-hour format)
    - Or at delayed time (24-hour format)
    - Add a manual restart with a delay and/or a reason for.
    - Cancel a manual restart.
    - Warning message to players before restart.
    - Saves player and chunk data.
    - Multi-world compatible.
    - Add delay between stop and restart server.
    - Use config.yml and messages.yml to configure the plugin.
    - Don't modify the paramaters {n} in each YAML files.
    - Automatically creates config.yml and messages.yml in the plugin folder.

    OS compatibility
    Windows 7, Vista, XP... (x86 and x64 editions)
    OSX/Linux (work on it...)
    MacOS (work on it...)

    Any problems?
    Please submit a complete bug report with :
    - OS where the server is deployed.
    - Bukkit version.
    - Submit the mccrestart.log if there. (use http://pastebin.com/)
    - Submit your server.log. (use http://pastebin.com/)

    Commands
    /mccrestart help - List MCCRestart commands
    /mccrestart reload - Reload the plugin configuration
    /mccrestart next - Give the next time to restart
    /restart - Restart the server immediately
    /restart 59:59 - Restart after a delay (minutes:seconds)
    /restart 59:59 reason - Restart after a delay with a reason
    /restart cancel - Cancel a manual restart

    Permission-nodes
    mccrestart.use

    config.yml example
    Code:
    config:
        # Active/deactivate plugin
        enable: 'true'
     
        # Active/deactivate restart at times or delay (true or false)
        autorestart: 'true'
     
        # Args to launch the server (must be placed in your root server folder)
        launcher: 'java -Xms512M -Xmx512M -jar craftbukkit.jar'
        # If you want to launch a batch file (must be placed in your root server folder)
        #launcher: 'run.bat'
     
        # How many seconds before restart to show warning message to players. Separate seconds with a comma.
        warn: '30,10'
     
        # Scheduled times when the server is restarting. Use 24-hour time and separate times with a comma.
        times: '12:00:00,23:00:00'
     
        # Delay time between each restart. Use 24-hour time.
        delay: '02:00:00'
     
        # Choose type of restart (times or delay)
        type: 'delay'
     
        # Delay between stop and restart server if you have a lot of plugins (use minutes:secondes)
        stoptime: '00:10'
    messages.yml example
    Code:
    messages:
        warn: 'The server is being restarted...'
        warnTime: 'The server restarts in {0} seconds...'
        restart: 'The server is restarting...'
        disabled: 'MCCRestart is disabled'
        reload: 'MCCRestart reloaded'
        next: 'Next restart scheduled at {0}'
        reason: 'Reason: {0}'
        cancel: 'Manual restart cancelled'
        norestart: 'No restart is scheduled'
    run.bat example
    Code:
    @echo off
     
    set memory=512
     
    if /I "%PROCESSOR_ARCHITECTURE:~-2%"=="64" "%ProgramFiles(x86)%\Java\jre6\bin\java.exe" -Xms%memory%M -Xmx%memory%M -jar "%~dp0craftbukkit.jar"
    if /I "%PROCESSOR_ARCHITECTURE:~-2%"=="86" java -Xms%memory%M -Xmx%memory%M -jar "%~dp0craftbukkit.jar"
    Changelog:

    Version 1.2.5 [670]
    - Delay between stop and restart server if you have a lot of plugins (see config.yml)
    - More logs during restart
    - Adding multi-world compatibility.
    - Bug add a reason for a manual restart.

    Version 1.2.4 [670]
    - Add possibility to active deactivatee the plugin (config.yml)
    - Delete on|off command (use enable in config.yml and reload command)
    - Bug when autorestart false for manual restarts.
    - Increase thread latency.
    - Fix warn displays.
    - Fix console messages.

    Version 1.2.2 [670]
    - 'null' folder when generates configuration files.
    - Add manual restart with delay and reason.

    Version 1.2.0 [670]
    - Add delay time.
    - Possibility to choose delay or specified times.
    - Add next config command.

    Version 1.1.5 [670]
    - Bug to disable the plugin.
    - Add reload config command.

    Version 1.1.0 [670]
    - Update for bukkit 670.
    - Plugin optimised and cleaned.
    - Method changed to perform restart.

    Version 1.0.1 [612]
    - English language by default.

    Version 1.0.0 [612]
    - Release

    This is my first plugin : suggestions and feedback appreciated :)
     
    unenergizer likes this.
  2. Offline

    Alex K

    This is what's in my batch folder
     
  3. Offline

    ExplosiveBacoN

    Problem still persists, it seems to spew out a shit ton of errors when it shuts down too.
     
  4. Offline

    Cr@zy

    Send me your server.log
     
  5. Offline

    MacG32

    How would I set this up to work with Linux? I used the config.yml below, but it didn't restart. It just shut the server down.
    Code:
    config:
        # Active/deactivates plugin
        enable: 'true'
    
        # Active/deactivates restart at times or delay (true or false)
        autorestart: 'true'
    
        # Args to launch the server (must be placed in your bukkit folder)
        #launcher: 'java -Xms512M -Xmx512M -jar craftbukkit.jar'
        # If you want to launch a batch file (must be placed in your bukkit folder)
        launcher: 'sh ms2.sh'
    
        # How many seconds before restart to show warning message to players. Separate seconds with a comma.
        warn: '30,20,10,5,4,3,2,1'
    
        # Scheduled times when the server is restarting. Use 24-hour time and separate times with a comma.
        times: '12:00:00,23:00:00'
    
        # Delay time between each restart. Use 24-hour time.
        delay: '01:23:45'
    
        # Choose type of restart (times or delay)
        type: 'delay'
    
     
  6. Offline

    ExplosiveBacoN

    It didn't save, I also don't have the mccrestart.log since it was never created.
     
  7. Offline

    Andrew1431

    Cr@zy I'm in love with this plugin because I host a server that people can just do whatever they want in, and it causes it to lag or semi-crash alot, which makes the restart command really helpful.

    One problem though, is since I'm running it on a seperate computer, I'm wondering if you could tell me how to fix this:

    on the first server boot up, i type 'restart' and it does everything super perfectly..

    then with that newly restarted server if i type 'restart' or 'stop' it stops the server, but doesn't close CMD prompt, it just gives me a line that I can input to. (the restart still works, just after about 4 restarts I have 3 cmd prompts open and I'm using my cousin's computer since its beast but I feel bad that I'm cluttering his space, :p)

    It all works well, just the duplicating command prompt is a problem! Thanks though its amazing!! I wish I could write this stuff.......

    ~Andrew
     
  8. Offline

    AGM7

    i need help idk how to install, all i know how to do is get the .jar formatted ones
     
  9. Offline

    Cr@zy

    Hi Andrew,
    Give me your config.yml and your batch launcher (if you use it)
    Probably a pause or a start is inserted.
     
  10. Offline

    Alex K

    Hey Cr@zy, sorry my last post deleted itself or something, here's my batch file in my bukkit folder.

    Code:
    @ECHO OFF
    IF /I "%PROCESSOR_ARCHITECTURE:~-2%"=="64" "%ProgramFiles(x86)%\Java\jre6\bin\java.exe" -Xincgc -Xmx1536m -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSIncrementalPacing -XX:ParallelGCThreads=2 -XX:+AggressiveOpts -jar "%~dp0craftbukkit-0.0.1-SNAPSHOT.jar"
    IF /I "%PROCESSOR_ARCHITECTURE:~-2%"=="86"  java -server -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSIncrementalPacing -XX:ParallelGCThreads=2 -XX:+AggressiveOpts -jar "%~dp0craftbukkit-0.0.1-SNAPSHOT.jar"
    
    PAUSE
     
  11. Offline

    Cr@zy

    Ok, remove PAUSE
     
  12. Offline

    Alex K

    Hey, I remove the PAUSE, and renamed the batch file to the one in the folder. Do I need to add the path to the folder or something? This just refuses to launch, and is starting to be a downer. Any other suggestions? Thanks
     
  13. Offline

    Cr@zy

    What is your launcher arg in your config.yml?
     
  14. Offline

    Alex K

    In between the launcher Arguments, It just says: 'run.bat', which is the name of the launcher, and it is in the bukkit folder. I think I may of found the problem with the launcher, but now the thing isn't restarting on the 3 hour basis I have it set at, but I think that's a problem on my part. What is the difference between delay time and scheduled time? I have the scheduled time to 3,9,12,15,18,21,and 24. The delayed time to 2, but I don't really understand what the delayed time is for. Could you clarify this? Thanks.
     
  15. Offline

    MacG32

    Any news on when a Linux version might be released?
     
  16. Offline

    Andrew1431

    Code:
    @ECHO OFF
    SET BINDIR=%~dp0
    CD /D "%BINDIR%"
    "%ProgramFiles(x86)%\Java\jre6\bin\java.exe" -Xincgc -Xmx1G -jar craftbukkit-0.0.1-SNAPSHOT.jar
    And I made the config.yml just run the RUN.BAT (The code up there) I'm fairly experienced. I took the PAUSE out of there after it said Press Any Key To Continue... and that fixed that, but now it just puts it to cmd.exe once the servers after the first stop.
     
  17. Offline

    MineralMC

    Any chance that the message can display minutes in the message to my players if the 'warn' seconds is more than 60? "The server will restart in 1200 seconds..." looks just a tad silly!

    # How many seconds before restart to show warning message to players. Separate seconds with a comma.
    warn: '1200,600,300,60,30'

    The ability to auto-close the CMD window would be handy as well, but I believe that is built into bukkit for log review purposes.
     
  18. Offline

    sillyrosster

    When I restart, it stops, but doesn't start back up. I also get an error for each plugin that is stopping when I use MCCRestart to "Restart" the server. I am running on Command Line Linux; is this compatible with this OS?

    I am also using CraftBukkit b677.
     
  19. Offline

    Huene

    Does this plugin launch its own screen? it works well enough if I could just stop the excess screen sessions. I know it's either this one or AutoStop, and I know that Autostop used a seperate jar to start a screen session. I also know it has been removed, and craftbukkit replaced since I had it installed. So anyway, back to the initial question, Does this plugin launch it's own screen session?

    Code:
    $ screen -r
    There are several suitable screens on:
            28294.MinecraftServer   (04/21/2011 04:40:50 PM)        (Detached)
            25491.MinecraftServer   (04/21/2011 12:50:33 PM)        (Detached)
            25342.MinecraftServer   (04/21/2011 12:48:11 PM)        (Detached)
            25205.MinecraftServer   (04/21/2011 12:44:07 PM)        (Detached)
            20952.minecraft (04/21/2011 06:55:07 AM)        (Detached)
    Type "screen [-d] -r [pid.]tty.host" to resume one of them.
    
     
  20. Offline

    Slyden

    Issue: I'm just curious; Whenever my server restarts, upon the command line it runs from, it says "Press any key to continue." The purpose of my download on this tool, was to have it so my ops could restart the server when i'm at work, or away without needing my input in person to restart.

    Issue Screen:[​IMG]

    Full Screen URL: http://i55.tinypic.com/s5i68g.png

    Q: Is it possible to turn "Press any key to continue." off, and give it full access to restart on it's own, whenever issued to restart?

    Q2: Also, Whenever i "press any key to continue" it seems to just close the cmd completely, and not reopen to continue the restart. Or perhaps it's not suppose to close the cmd at all, and restart smoothly?
     
  21. I think the problem is that MCCRestart doesnt find the "craftbukkit.jar" file
    Make it look like this in your config file:
    launcher: 'java -Xms512M -Xmx512M -jar craftbukkit-0.0.1-SNAPSHOT.jar'
    Worked for me, i guess the bukkit jar file was named craftbukkit.jar before.
     
  22. Offline

    Navist

    Would love to see a Linux/Unix release for this plugin.

    Just noticed in console when the plugin is loaded. Mentioned I launched it on a Linux OS, does this mean it works with Linux now?
     
  23. Offline

    Hrd2GtStunned

    Hi, I think your plugin is a great idea, @Cr@zy, but It doesn't seem to be working perfectly. It stops good, then it waits 30 seconds (which I configured) but then it opens a new cmd window, trying to restart the server, and it says somthing similar to: **FAILED TO BIND TO PORT**, which I usually get when I try to host 2 servers at the same time. Hope someone knows to fix this, really need the plugin :D
     
  24. Offline

    G1R Productions

    18:51:38 [INFO] [MCCRestart] v1.2.5 launched on Mac OS X
    18:51:38 [INFO] [MCCRestart] Permissions 2.7 enabled for use.
    18:51:38 [INFO] [MCCRestart] autorestart enabled for delay
    18:51:38 [INFO] [MCCRestart] next restart scheduled at 20:51:38
    18:51:39 [SEVERE] Exception in thread "Timer-18"
    18:51:39 [SEVERE] java.lang.NullPointerException
    18:51:39 [SEVERE] at com.gmail.nossr50.mcTimer.run(mcTimer.java:44)
    18:51:39 [SEVERE] at java.util.TimerThread.mainLoop(Timer.java:512)
    18:51:39 [SEVERE] at java.util.TimerThread.run(Timer.java:462)
     
  25. Offline

    PsychoNecrosis

    Great plugin, looking forwards to a 733 release (if you need to update that is)
     
  26. i am running a .sh file on a CentOS like this :

    #!/bin/bash
    cd "minecraft";screen -S minecraft java -Xincgc -Xmx1G -jar craftbukkit-0.0.1-SNAPSHOT.jar

    i want to put it in a screen also. so i can come back to the server with a console whenever i want.

    If my minecraft folder is in /home/sand/minecraft/ then how to make this work ? cause i've tried that and it didnt restart the server.

    Thanks.
     
  27. Offline

    Cr@zy

    I'm gonna make an unix and mac os update of this plugin.
    @Huene: Yes i keep screen session id and relaunched the server in the same terminal. Working on it ;)
    @Hrd2GtStunned: Change the stoptime value to 30 seconds (process persist?)

    Of course
     
  28. Offline

    Orcem12

    I give you Props man great job works great /hug
     
  29. Offline

    Nytemare3701

    Seconding the updated release. I consider this a required plugin on my server.
     
  30. Offline

    user_2408

    Thirding! :D Also a chime in for Linux support too would be swell.
     
  31. Offline

    sillyrosster

    I get this when trying to restart:
    Code:
    2011-05-05 15:41:00 [INFO] [MCCRestart] next restart scheduled at 15:42:00
    2011-05-05 15:41:00 [INFO] [MCCRestart] reason: Hi
    2011-05-05 15:41:05 [INFO] sillyrosster [/174.28.68.98:57047] logged in with entity id 749
    2011-05-05 15:41:05 [INFO] Loaded world: item
    2011-05-05 15:41:05 [INFO] [AutoSave] AutoSaveThread Started: Interval is 1000 seconds, Warn Times are 0
    2011-05-05 15:41:06 [INFO] Loaded world: item
    2011-05-05 15:41:36 [INFO] /173.234.147.81:55134 lost connection
    2011-05-05 15:42:00 [INFO] [MCCRestart] Players saved
    2011-05-05 15:42:00 [INFO] [MCCRestart] world saved
    2011-05-05 15:42:01 [INFO] [MCCRestart] item saved
    2011-05-05 15:42:01 [INFO] [MCCRestart] nether saved
    2011-05-05 15:42:02 [INFO] [MCCRestart] war saved
    2011-05-05 15:42:02 [INFO] [MultiInv] Plugin disabled.
    2011-05-05 15:42:02 [INFO] [AutoMessage] version [1.5] disabled
    2011-05-05 15:42:02 [INFO] Fortress Assault is disabled!
    2011-05-05 15:42:02 [INFO] [MultiVerse] - Disabled
    2011-05-05 15:42:02 [INFO] [AutoSave] Saving config file
    2011-05-05 15:42:03 [INFO] [AutoSave] Version 1.2.6 is disabled!
    2011-05-05 15:42:03 [INFO] [NoCheatPlugin] version [0.7.7] is disabled.
    2011-05-05 15:42:03 [INFO] [WolfPound] - Disabled
    2011-05-05 15:42:03 [INFO] FalseBookBlock v0.84alpha by GeMo disabled
    2011-05-05 15:42:03 [INFO] FalseBookChat v0.84alpha by GeMo disabled
    2011-05-05 15:42:03 [INFO] Closing all stargates.
    2011-05-05 15:42:03 [INFO] [AssignPermissions] Plugin disabled. (version1.0)
    2011-05-05 15:42:03 [INFO] Warpz0r version 1.2.2 is disabled
    2011-05-05 15:42:03 [INFO] [iConomy] Plugin disabled.
    2011-05-05 15:42:03 [INFO] [HeroicDeath] 1.7.3.148 disabled.
    2011-05-05 15:42:03 [INFO] LWC  Freeing SQLite
    2011-05-05 15:42:03 [INFO] FenceStack version 1.13 unloaded.
    2011-05-05 15:42:03 [INFO] [iChat] iChat Disabled
    2011-05-05 15:42:03 [INFO] [DelayedStop] version 0.16 disabled
    2011-05-05 15:42:03 [INFO] WorldGuard 5.0-alpha10 disabled.
    2011-05-05 15:42:03 [INFO] LogBlock disabled.
    2011-05-05 15:42:03 [INFO] FalseBookExtra v0.84alpha by GeMo disabled
    2011-05-05 15:42:03 [INFO] FalseBookCart v0.84alpha by GeMo disabled
    2011-05-05 15:42:03 [INFO] [Paid2Mine] Disabled.
    2011-05-05 15:42:03 [INFO] FalseBookIC v0.84alpha by GeMo disabled
    2011-05-05 15:42:03 [INFO] Magic Carpet disabled. Thanks for trying the plugin!
    2011-05-05 15:42:03 [INFO] 2011-05-05 15:42:03 [INFO] MoveCraft 0.6.8 Final Beta plugin disabled
    2011-05-05 15:42:03 [INFO] Vanish 1.5.2 unloaded.
    2011-05-05 15:42:03 [INFO] [iConomyChestShop] version 2.2 distabled!
    2011-05-05 15:42:03 [INFO] [Permissions] (Phoenix) saved all data.
    2011-05-05 15:42:03 [INFO] [Permissions] (Phoenix) disabled successfully.
    2011-05-05 15:42:03 [INFO] [MCCRestart] Plugins saved and disabled
    2011-05-05 15:42:03 [INFO] [BACKUP] Initiate a last backup because the last player left. It will start to backup in 30 minutes when no player will have connected in this time.
    2011-05-05 15:42:03 [SEVERE] Could not pass event PLAYER_QUIT to LWC
    java.lang.NullPointerException
            at com.griefcraft.listeners.LWCPlayerListener.onPlayerQuit(LWCPlayerListener.java:158)
            at org.bukkit.plugin.java.JavaPluginLoader$2.execute(JavaPluginLoader.java:212)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:59)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:257)
            at net.minecraft.server.ServerConfigurationManager.disconnect(ServerConfigurationManager.java:115)
            at net.minecraft.server.NetServerHandler.disconnect(NetServerHandler.java:98)
            at org.bukkit.craftbukkit.entity.CraftPlayer.kickPlayer(CraftPlayer.java:124)
            at fr.crazyws.mccrestart.Schedule.restart(Schedule.java:197)
            at fr.crazyws.mccrestart.Schedule.run(Schedule.java:125)
            at java.lang.Thread.run(Thread.java:636)
    2011-05-05 15:42:03 [INFO] [MCCRestart] Players kicked
    2011-05-05 15:42:03 [INFO] [MCCRestart] Waiting for 00:10 before restarting. Please wait...
    2011-05-05 15:42:13 [INFO] Stopping server
    2011-05-05 15:42:13 [INFO] [MultiInv] Plugin disabled.
    2011-05-05 15:42:13 [INFO] [AutoMessage] version [1.5] disabled
    2011-05-05 15:42:13 [INFO] Fortress Assault is disabled!
    2011-05-05 15:42:13 [INFO] [MultiVerse] - Disabled
    2011-05-05 15:42:13 [INFO] [AutoSave] Saving config file
    2011-05-05 15:42:13 [INFO] [AutoSave] Version 1.2.6 is disabled!
    2011-05-05 15:42:13 [INFO] [NoCheatPlugin] version [0.7.7] is disabled.
    2011-05-05 15:42:13 [INFO] [WolfPound] - Disabled
    2011-05-05 15:42:13 [INFO] FalseBookBlock v0.84alpha by GeMo disabled
    2011-05-05 15:42:13 [INFO] FalseBookChat v0.84alpha by GeMo disabled
    2011-05-05 15:42:13 [INFO] Closing all stargates.
    2011-05-05 15:42:13 [INFO] [AssignPermissions] Plugin disabled. (version1.0)
    2011-05-05 15:42:13 [INFO] Warpz0r version 1.2.2 is disabled
    2011-05-05 15:42:13 [INFO] [iConomy] Plugin disabled.
    2011-05-05 15:42:13 [INFO] [Stargate] iConomy plugin lost.
    2011-05-05 15:42:13 [INFO] [Warpz0r] Stargate plugin lost.
    2011-05-05 15:42:13 [INFO] [HeroicDeath] 1.7.3.148 disabled.
    2011-05-05 15:42:13 [INFO] LWC  Freeing SQLite
    2011-05-05 15:42:13 [INFO] FenceStack version 1.13 unloaded.
    2011-05-05 15:42:13 [INFO] [iChat] iChat Disabled
    2011-05-05 15:42:13 [INFO] [DelayedStop] version 0.16 disabled
    2011-05-05 15:42:13 [INFO] WorldGuard 5.0-alpha10 disabled.
    2011-05-05 15:42:13 [INFO] LogBlock disabled.
    2011-05-05 15:42:13 [INFO] FalseBookExtra v0.84alpha by GeMo disabled
    2011-05-05 15:42:13 [INFO] FalseBookCart v0.84alpha by GeMo disabled
    2011-05-05 15:42:13 [INFO] [Paid2Mine] Disabled.
    2011-05-05 15:42:13 [INFO] FalseBookIC v0.84alpha by GeMo disabled
    2011-05-05 15:42:13 [INFO] Magic Carpet disabled. Thanks for trying the plugin!
    2011-05-05 15:42:13 [INFO] 2011-05-05 15:42:13 [INFO] MoveCraft 0.6.8 Final Beta plugin disabled
    2011-05-05 15:42:13 [INFO] Vanish 1.5.2 unloaded.
    2011-05-05 15:42:13 [INFO] [iConomyChestShop] version 2.2 distabled!
    2011-05-05 15:42:13 [INFO] [Permissions] (Phoenix) saved all data.
    2011-05-05 15:42:13 [INFO] [Permissions] (Phoenix) disabled successfully.
    2011-05-05 15:42:13 [INFO] CommandBook: Permissions plugin detected! Using Permissions plugin for permissions.
    2011-05-05 15:42:13 [INFO] WorldGuard: Permissions plugin detected! Using Permissions plugin for permissions.
    2011-05-05 15:42:13 [INFO] [MCCRestart] Restarting server...
    2011-05-05 15:42:13 [INFO] WorldEdit: Permissions plugin detected! Using Permissions plugin for permissions.
    2011-05-05 15:42:13 [INFO] [Stargate] Permissions plugin lost.
    2011-05-05 15:42:13 [INFO] [Warpz0r] Permissions plugin lost.
    2011-05-05 15:42:13 [INFO] [iChat] Permissions plugin lost.
    2011-05-05 15:42:13 [INFO] Saving chunks
    2011-05-05 15:42:15 [INFO] Stopping server
    2011-05-05 15:42:15 [INFO] Saving chunks
    
    I am running Linux. Is it compatible?
    It looks like it says it's going to restart, but then just stops. I really need a restart plugin.
     

Share This Page