[INACTIVE][ADMIN/MECH/GEN] RestartNow v0.3_2 - Full server restarts [818 - 1060]

Discussion in 'Inactive/Unsupported Plugins' started by aidan matzko, Jun 5, 2011.

     
  1. Offline

    tips48

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    RestartNow - Complete Restarts:
    Version: v0.3_2

    When i first joined bukkit, I was very surprised by the fact that there was no way to restart the server. Yes, there are toolkits and modified .bat's or .sh's, but why isn't there just a plugin? That's what this is for.


    Features:
    • Full Server Restarts.
    • Compatible with any OS!
    • Compatible with any startup script.
    • Automatic restarts every x minute(s)!
    • Restart the server when there are no players on the server!
    • Reload the server when there are no players on the server!
    • Permissions/Group Manager support
    • Commands include:
      • /restart -- restarts the server
      • /schedulerestart <time + time unit> -- cancels all planned restarts and schedules the server to be restart in <time + time unit>
      • /resettimers -- cancels every planned restart
      • /kickall -- kicks everyone from the server, including yourself if its not from the console
      • /saveworlds -- saves all worlds
      • /reloadplugin <plugin> -- reload plugin X
      • /restartnow <update> -- displays general information and updates the server
    To Do


    • Wrapper -- High
    Known Bugs

    • After a restart linux users can't see the gui(it's still running!)
    • Does not work with MCMA(use its /restart command, not fixable by me)
    • /restartnow update does not download 0.3_1, please manually update till i get back
    • Update times are slightly screwed up (sorry :/) Will be fixed ASAP
    • You can't have a space from C:/(or your default drive) to craftbukkit.jar. A fix will be out soon
    • Configuration options still give an error when the config is setup wrong...
    Downloads

    Jar
    Source Code

    How to Install:
    There is now a semi-complete wiki! hopefully this helps clear up any confusion.
    Wiki Here
    LINUX BUG
    In linux if you restart the server, there will be NO console gui to type commands into. The server is still running, there is just no GUI. I can make it a simple light weight wrapper, comment on if you would rather have a console gui or a wrapper!

    Changelog:
    • Version 0.3_2
      • Very important bug fix in restartNowMain.jar
    • Version 0.3_1
      • Fix notification times(again!)
      • Test updating from the console! Type /restartnow update ;)
    • Version 0.3
      • Huge update! Please delete your configuration file
      • API! Check the wiki for more information
      • Auto updating!(Give a huge thanks to @Adamki11 , he created the lib, and I modified to suit my needs)
      • Auto extracting! No more pesky zip file
      • Completely reworked structure.
      • Broadcast times FIXED!
      • Other various bug fixes
      • Added a github wikipedia
    • Version 0.2_1
      • Fix the Reload-Server problem
    • Version 0.2
      • New command. /reloadplugin <plugin name>. Pretty simple, reloads that plugin. Must be the same exactly spelling as the plugin when listed in /plugins
      • The command /schedulerestart <time> is changed to /schedulerestart <time + time unit> the time units are same for config as they are for this command.
      • Huge update for the config. Look at the documentation again ;)
      • Broadcast with X minutes left till restart!
      • The linux server is kinda fixed. Checkout above
      • No player reload.
      • Much more stable.
    • Version 0.1_2 -- Note quick reupload for Ubuntu users to change the way the .sh is opened
      • Full fix for Windows users. Upload now includes a bat file(windowsonly.bat) that is required for windows users.
    • Version 0.1_1
      • Fixed the duplicate command prompt error on Windows.
    • Version 0.1
      • It's out!
      • Added some changes from the beta version such as more commands, another safeguard, and improved permissions handling.
    Error Reports:
    • Please post feature requests/bugs to github, makes it easier to get them all!
    • If you would like to submit a bug(github/forum), please use this method:
    • Before you do anything, open a command line
    • cd to the server directory
    • type java -jar restartNowMain.jar "<name of bat or sh>" "<os name> "1"
    • Code:
      Config File
                                     
                                     The .sh or .bat you use to start the server
                                     
                                     What happened when you did the steps above with a command line?
                                     
  2.  
  3. Offline

    Ryan Palkovic

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    This is a GREAT idea, now if I can get it working it'll be an AWESOME plugin!

    I've got restartNowMain.jar in the server directory.
    I've got restartNow.jar and the RestartNow directory in the plugins/ directory
    I've set up config.properties to have my OS (ubuntu) and my start script (runmc.sh)
    I run the server as a user called minecraft, all files are owned by that user, and all files are chmod'd to 777 (essentially, fully read/writable by anyone).

    I can start the server and get no errors in the logs, and I can use all of the commands I've tested... But as far as I can tell the app will not restart the server after it's been stopped, whether I use the /restart command or whether it restarts automatically.

    I ran the troubleshooting command from the server directory:
    minecraft@MC-PC:/home/minecraft/bukkit$ java -jar restartNowMain.jar "runmc.sh" "ubuntu" "1"
    minecraft@MC-PC:/home/minecraft/bukkit$

    If I'm watching top (kind of like windows task manager) I'll see the java process start and stop quickly, but no results are posted to the terminal window - basically looks to me like nothing is happening.

    I'm running Ubuntu 11 on a 64 bit processor using the SunJDK 64bit for linux if that's of any help.

    === config.properties ===
    #RestartNow Config
    #Sun Jun 05 15:22:38 EDT 2011
    No-Players-Restart=true
    Automatic-Restarts=true
    No-Player-Time=15
    OS-Name=Ubuntu
    Craftbukkit-Launcher=runmc.sh
    Automatic-Restarts-Time=10
    Wait-Before-Start=10

    === runmc.sh ===
    #!/bin/sh
    PATH=$PATH:/usr/java/jdk1.6.0_26/jre/bin
    cd /home/minecraft/bukkit/
    java -Xmx4096M -Xms4096M -XX:+UseFastAccessorMethods -XX:+AggressiveOpts -XX:+DisableExplicitGC -XX:+UseAdaptiveGCBoundary -XX:MaxGCPauseMillis=500 -XX:SurvivorRatio=16 -XX:+UseParallelGC -XX:UseSSE=3 -XX:parallelGCThreads=2 -jar /home/minecraft/bukkit/craftbukkit-0.0.1-SNAPSHOT.jar

    Thoughts? Questions?
  4. Offline

    tips48

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    @Ryan Palkovic thanks a TON for the detailed error report. I currently know that restartNow is not working with linux or os x systems. It would/will be fixed in 0.2, which i was expecting to come out with yesterday, but i have had the same error for 8 hours now and still haven't been able to solve it. If i can't fix it by tomorrow, i will hopefully come out with another hotfix (v0.1.3) to fix it. Theres only bug stopping me from releasing 0.2, but once i get it, 0.2 will be out :p
  5. Offline

    tips48

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Well making 0.2, i *accidentally* made a /pluginreload feature. Should reload only that plugin ;) Need to test it, but that will be in 0.2 once i fix this one error!
  6. Offline

    tips48

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    0.2 will come today. Fixed the bug, finally.
    Features:
    Plugin reload-Reload only one plugin
    Broadcast message when server is x time away from restarting(not finished yet)
    Much better command/config parsing(adds second, minute, hour, day!)
  7. Offline

    kahlilnc

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Would this be compatible with server hosting or a brohoster control panel?
  8. Offline

    tips48

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    it should be!
  9. Offline

    kahlilnc

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I might try this after i fall asleep and wake up again.
  10. Offline

    tips48

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I would wait about 3/4 hours because there will be a big update out that will be much more stable.
    kahlilnc likes this.
  11. Offline

    tips48

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Got all the bugs worked out, look for it in a hour or so
  12. Offline

    noahwhygodwhy

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    sigh...tried this out cause this is exactly what i need, but got an error

    config:
    Code:
    #RestartNow Config
    #Sun Jun 05 15:22:38 EDT 2011
    No-Players-Restart=false
    Automatic-Restarts=false
    No-Player-Time=15
    OS-Name=Windows
    Craftbukkit-Launcher=MCS #1.bat
    Automatic-Restarts-Time=120
    Wait-Before-Start=15
    
    consol:
    Code:
    148 recipes
    16 achievements
    14:07:48 [INFO] Starting minecraft server version Beta 1.6.6
    14:07:48 [INFO] Loading properties
    14:07:48 [INFO] Starting Minecraft server on *:25565
    14:07:48 [INFO] This server is running Craftbukkit version git-Bukkit-0.0.0-766-
    g3fc0460-b818jnks (MC: 1.6.6)
    14:07:48 [INFO] Preparing level "world"
    14:07:48 [INFO] Preparing start region for level 0
    14:07:49 [INFO] Preparing start region for level 1
    14:07:49 [INFO] Preparing spawn area: 0%
    14:07:50 [INFO] DataSourcePool [MinecartManiaCore] autoCommit[false] transIsolat
    ion[SERIALIZABLE] min[2] max[20]
    14:07:50 [INFO] SubClassFactory parent ClassLoader [org.bukkit.plugin.java.Plugi
    nClassLoader]
    14:07:51 [INFO] Entities enhanced[0] subclassed[2]
    14:07:51 [INFO] Permission system not detected, defaulting to OP
    14:07:51 [INFO] [Annoyer] Annoyer has been enabled!
    14:07:51 [INFO] [BananaChunk] version 4.5 is enabled!
    14:07:51 [INFO] [ChopTree] Permissions not detected, defaulting to ops.
    14:07:51 [INFO] ChopTree 1.23 enabled!
    14:07:51 [INFO] ChunkRegenerate version 1.1 is enabled with op-only permissions!
    
    14:07:51 [INFO] DungeonGenerator version 1.0 is enabled with op-only permissions
    !
    14:07:51 [INFO] Permission system not detected, defaulting to OP
    14:07:51 [INFO] [EasyFlight] version [0.3] is Enabled.
    14:07:51 [INFO] EmptyInventoryPlus version 0.2not enabled. Permissions was not d
    etected
    14:07:51 [INFO] [EmptyInventoryPlus] Plugin disabled. (version0.2)
    14:07:51 [INFO] [EmptyInventoryPlus] Plugin enabled! (version0.2)
    14:07:51 [INFO] Loaded Essentials build 2.3.1 by Zenexer, ementalo, Aelux, Brett
    flan, KimKandor, snowleo, ceulemans and Xeology
    14:07:51 [INFO] Loaded EssentialsChat build 2.3.1 by Zenexer, ementalo, Aelux, B
    rettflan, KimKandor, snowleo, ceulemans and Xeology
    14:07:51 [INFO] Loaded EssentialsGeoIP build 2.3.1 by Zenexer, ementalo, Aelux,
    Brettflan, KimKandor, snowleo, ceulemans and Xeology
    14:07:51 [INFO] This product includes GeoLite data created by MaxMind, available
     from http://www.maxmind.com/.
    14:07:51 [INFO] Loaded EssentialsProtect build 2.3.1 by Zenexer, ementalo, Aelux
    , Brettflan, KimKandor, snowleo, ceulemans and Xeology
    14:07:51 [INFO] Loaded EssentialsSpawn build 2.3.1 by Zenexer, ementalo, Aelux,
    Brettflan, KimKandor, snowleo, ceulemans and Xeology
    14:07:51 [INFO] LavaFurnace loaded: 2 Furnace(s)
    14:07:51 [INFO] LavaFurnace config file finished loading...
    14:07:51 [INFO] LavaFurnace: Permissions not detected switching to Server OPs pe
    rmission
    14:07:51 [INFO] LavaFurnace version 1.1b is enabled!
    14:07:51 [INFO] [LockChest] Enabled
    14:07:51 [INFO] [Minecart Mania] Debug mode switched to NORMAL
    14:07:51 [INFO] [Minecart Mania] Attempted update failed - Backup config file -
    renamed MinecartManiaLocale.xml to MinecartManiaLocale.xml.bak
    14:07:51 [INFO] [Minecart Mania] Created new config file - MinecartManiaLocale.x
    ml
    14:07:51 [INFO] [Minecart Mania] MinecartManiaCore version 1.2.8 is enabled!
    14:07:51 [INFO] MoveCraft 0.6.9 Final Beta plugin enabled
    14:07:51 [INFO] [mxRingplatform] Permission system not detected, defaulting to O
    P
    14:07:51 [INFO] mxRingplatform v 1.0 enabled
    14:07:51 [INFO] [OpenInv] version 1.3.1 is enabled!
    14:07:51 [WARNING] [PanelMaster] : Could not load id file
    14:07:51 [INFO] [PhysicalShop] version 7 enabled
    14:07:51 [INFO] [RestartNow] v0.1.2 ready to restart!
    14:07:51 [INFO] [RestartNow] Permissions not detected.
    14:07:51 [INFO] SearchIds version 2.3 is enabled!.
    14:07:51 [INFO] SearchIds: Updating data from https://github.com/mrapple/SearchI
    ds/raw/master/search-ids-data.xml...
    14:07:53 [INFO] SearchIds: Update complete!
    14:07:53 [INFO] SecretDoors v0.2 by MrChick enabled
    14:07:53 [INFO] [SimpleChestLock 0.5] Permissions plugin not found, defaulting t
    o OPS CHECK mode
    14:07:53 [INFO] [SimpleChestLock 0.5] Enabled!
    14:07:53 [INFO] Superpickaxe v0.1 by DiddiZ enabled
    14:07:53 [INFO] WorldEdit 4.4 enabled.
    14:07:53 [INFO] WorldEdit: No known permissions plugin detected. Using configura
    tion file for permissions.
    14:07:53 [INFO] [xWarp]: No Register found. Deactivating Register support.
    14:07:53 [INFO] [xWarp]: 25 warps loaded
    14:07:53 [INFO] [xWarp]: No permissions system found until here. A permissions p
    lugin will be maybe activated later.
    14:07:53 [INFO] [xWarp]: Linked with economy system: Essentials v2.3.1
    14:07:53 [INFO] [xWarp]: xWarp 2.11.3 enabled
    14:07:53 [INFO] [Minecart Mania] MinecartManiaChestControl version 1.2.5 is enab
    led!
    14:07:53 [INFO] Done (0.473s)! For help, type "help" or "?"
    >restart
    14:10:50 [INFO] [Annoyer] Annoyer has been disabled!
    14:10:50 [INFO] [BananaChunk] version 4.5 is disabled!
    14:10:50 [INFO] [ChopTree] Saving changes...
    14:10:50 [INFO] [ChopTree] Saved changes.
    14:10:50 [INFO] ChopTree disabled!
    14:10:50 [INFO] ChunkRegenerate version 1.1 is disabled!
    14:10:50 [INFO] DungeonGenerator version 1.0 is disabled!
    14:10:50 [INFO] [EasyFlight] version [0.3] is Disabled.
    14:10:50 [INFO] [xWarp]: Deactivated economy system.
    14:10:50 [WARNING] [xWarp]: Skiped disabled economy system: Essentials v2.3.1
    14:10:50 [INFO] [xWarp]: No economy system found until here. A economy plugin wi
    ll be maybe activated later.
    14:10:50 [INFO] LavaFurnace saved 2 furnace(s)
    14:10:50 [INFO] LavaFurnace version 1.1b is disabled!
    14:10:50 [INFO] [LockChest] Disabled
    14:10:50 [INFO] [Minecart Mania] MinecartManiaCore version 1.2.8 is disabled!
    14:10:50 [INFO] MoveCraft 0.6.9 Final Beta plugin disabled
    14:10:50 [INFO] mxRingplatform v 1.0 disabled
    14:10:50 [INFO] PanelMaster : Plugin disabled
    14:10:50 [INFO] [RestartNow] Server is restarting
    14:10:50 [INFO] SearchIds 2.3 disabled
    14:10:50 [INFO] SecretDoors v0.2 by MrChick disabled
    14:10:50 [INFO] [SimpleChestLock 0.5] Disabled!
    14:10:50 [INFO] Superpickaxe disabled
    14:10:50 [INFO] [xWarp]: Close connection!
    14:10:50 [INFO] Stopping the server..
    14:10:50 [INFO] ConsoleCommandSender: Stopping the server..
    14:10:50 [INFO] Stopping server
    14:10:50 [INFO] Saving chunks
    14:10:50 [INFO] Saving chunks
    14:10:50 [INFO] Stopping server
    >Press any key to continue . . .
    restart:
    Code:
    C:\Users\Noah\My Folder\Minecraft\CraftBukkit\Server #1>taskkill /fi "windowtitl
    e eq MC"
    
    INFO: No tasks running with the specified criteria.
    The syntax of the command is incorrect.
    
    C:\Users\Noah\My Folder\Minecraft\CraftBukkit\Server #1>start <MCS #1>
    
    C:\Users\Noah\My Folder\Minecraft\CraftBukkit\Server #1>
    oh, and i'm running windows 7 64 bit
    i think i know what's wrong, i just don't know how to fix it. you said the name of the cmd prompt title should be MC? as you said yourself the instructions are a bit lacking. though any help would be highly appreciated. I've just never had the chance to mess around with bats so i don't know that much.
  13. Offline

    tips48

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Thats interesting. Does the server start back up? Also, what is the *title* of the command prompt. All it should say is MC. if it says something like C:\system32\cmd.exe MC or administrator - MC, then you need to not run it as administrator. sorry, theres not really much i can do about it :/
  14. Offline

    noahwhygodwhy

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    sigh...ok, thanks for responding.
  15. Offline

    tibbles

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    the problem is you cant have < > in the name. i had the same problem but keeping the < > and only putting run.bat makes it run with a "bad syntax". also i would advise adding this to the windows instructions.
  16. Offline

    tips48

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    oh, you mean people are putting <run.bat> ?
  17. Offline

    tibbles

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    yes that was what people may put there, i know that i did as that is what the instructions seem to say
  18. Offline

    Ryan Palkovic

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Aidan, the problem is that for the most part, you're dealing with the lowest common denominator here. People who have never run a server and have no idea what they're doing think that they can run an MC server for cheaper (better/whatever) then they can find one online so they try to do it themselves without any experience.

    I would never have considered wrapping my bat/sh file in brackets, but I have a decent amount of experience under my belt. You've got to write instructions as if people have never used a computer, unfortunately.

    That said - any progress on 0.2? Can't wait to start using this on my server.
  19. Offline

    Malchus

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Alright, So I am on a Mac computer. I configured my properties accordingly and followed your directions step by step. However it does not seem to work. I do not get any errors but it just isn't working for some reason. For my operating system I put OS X, and the executable I put start.command - how I start my server.
  20. Offline

    tips48

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Thanks, i realize that now :D I'm going to update the OP with pictures asap, along with 0.2
    make note, never give a release date ;)
  21. Offline

    VirusWare

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I hope you update this plugin ^^ I would love to restart my server every hour couse of cpu useage ^^.
    In the moment I got this error by testing the restartnowmain.jar with this command:
    java -jar restartNowMain.jar start linux 1
    or
    java -jar restartNowMain.jar start debian 1
    Code:
    java.io.IOException: Cannot run program "gnome-terminal": java.io.IOException: error=2, No such file or directory
            at java.lang.ProcessBuilder.start(ProcessBuilder.java:460)
            at java.lang.Runtime.exec(Runtime.java:593)
            at java.lang.Runtime.exec(Runtime.java:431)
            at java.lang.Runtime.exec(Runtime.java:328)
            at com.tips48.restartNowMain.Main.main(Main.java:30)
    Caused by: java.io.IOException: java.io.IOException: error=2, No such file or directory
            at java.lang.UNIXProcess.<init>(UNIXProcess.java:148)
            at java.lang.ProcessImpl.start(ProcessImpl.java:65)
            at java.lang.ProcessBuilder.start(ProcessBuilder.java:453)
            ... 4 more
    
    
    I use a Debian 6.0 Vserver controld over ssh/putty
    I hope you fix that soon.

    MFG VirusWare
    And sorry for my bad english
  22. Offline

    Deatlev

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Ok stay tuned so I can have a fast answer plugin maker

    #RestartNow Config
    #Sun Jun 05 15:22:38 EDT 2011
    No-Players-Restart=true
    Automatic-Restarts=true
    No-Player-Time=15
    OS-Name=Windows (7)
    Craftbukkit-Launcher=run.bat
    Automatic-Restarts-Time=120
    Wait-Before-Start=1

    Ok what it does..It does nothing..It works to /restart but it just stops the server and dosent restart I really need to restart my server please help me I have done everything it says in the description
  23. Offline

    morizuki

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Hi.., Just curious.. how can I change this to /reload instead of /restart? can you teach me?
  24. Offline

    pyros

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Using commandhelper, you can alias this doing '/reload=/restart'
  25. Offline

    morizuki

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    oh.. wait.. That isn't what I mean.. I want to auto reload my servers when there's no people in my server..
  26. Offline

    tips48

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    @morizuki
    i could add that
    @Deatlev and @VirusWare sorry, i *think* i know both of your issues. I'm really trying to get 0.2 out soon, but i have a life too ;) Linux support is the only way of keeping me from releasing it.... Right now to start the server i have tried
    /bin/bash screen ./<sh name> *doesn't work*
    /bin/bash ./<sh name> *starts server without gui*
    i just need to find out how to use screen, and it will be out. If only i had a Ubuntu machine!
  27. Offline

    morizuki

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    woah nice.. Thanks.. I'll wait for that :D
  28. Offline

    tips48

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    yep. Thinking about it, that would be really easy ;)
  29. Offline

    morizuki

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    haha okk thanks :D
  30. Offline

    tips48

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    in the next update.
    linux support *head banging*
  31. Offline

    morizuki

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    also can you do something about the time? instead of Minutes.. use seconds?
  32. Offline

    Fujikatoma

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)

Share This Page