[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. 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. @piluke i know about the problem, i'm looking into it.
     
  3. Offline

    HunterAP

    I am running Bukkit 1000, and RestartNow 3_2. I am having the same problem where automatic restarts are not happening. I can schedule restarts from the console and they work fine. Other features are being read properly from the config.properties file such as no-players-restart option.
    If you think this might be a plugin conflict, let me know and I'll grab the list. (about 20 or so plugins)
     
  4. I don't think its a conflict, can you post your config?
     
  5. Offline

    Stormbow

    I'm in the same boat with the "path not found" crowd.

    CB 1000
    Java 1.6
    Win7-64

    Plugins: Administrate, BookWorm, ChestHarvester, Citizens, DailyBonus, DogWhisperer, Essentials (+chat, +spawn), FalsebookBlock (+core), FoundDiamonds, GravelClay, HeroicDeath, iConomy, Jail, Jobs, KitPlugin, Lavafurnace, LocalShops, LWC, MailBox, mcMMO, MinecartMania (+AdminCtrls, +Autocart, +ChestControl, +Core, +SignCommands, +Station), MobBounty, OtherBlocks, Permissions, Scavenger, Seasons, SimpleNews, SimpleReserve, SimpleTime, SimpleTips, TieDyeSheep, Tomb, Towny (+Questioner), uQuest (+AutoComplete, +ShowTracker), Vault, Whitelist, WorldEdit, WorldGuard.
     
  6. Offline

    HunterTTP

    Ok, so I read the first step of the wiki and completed it. When I restarted the server I got this

    151 recipes
    16 achievements
    12:27:16 [INFO] Starting minecraft server version Beta 1.7.3
    12:27:16 [INFO] Loading properties
    12:27:16 [INFO] Starting Minecraft server on ---.---.-.-:-------
    12:27:16 [INFO] This server is running Craftbukkit version git-Bukkit-0.0.0-945-
    g73697a4-b1000jnks (MC: 1.7.3)
    12:27:16 [INFO] Preparing level "------"
    12:27:16 [INFO] Preparing start region for level 0 (Seed: -1090462178712991586)
    12:27:17 [INFO] Preparing start region for level 1 (Seed: -7466678718785115264)
    12:27:17 [INFO] Preparing spawn area: 24%
    12:27:18 [INFO] [BD] Initiating plugin...
    12:27:18 [INFO] [BD] Initialized
    12:27:18 [INFO] [RestartNow] Version 0.3_2 ready to restart!
    12:27:18 [INFO] [RestartNow] Permissions not detected.
    12:27:18 [SEVERE] java.io.FileNotFoundException: C:\Users\Hunter\Desktop\Shifter
    's%20Serv\plugins\restartNow.jar (The system cannot find the path specified)
    12:27:18 [SEVERE] at java.util.zip.ZipFile.open(Native Method)
    12:27:18 [SEVERE] at java.util.zip.ZipFile.<init>(Unknown Source)
    12:27:18 [SEVERE] at java.util.jar.JarFile.<init>(Unknown Source)
    12:27:18 [SEVERE] at java.util.jar.JarFile.<init>(Unknown Source)
    12:27:18 [SEVERE] at com.tips48.restartNow.RestartNowExtractor.extractFile
    (RestartNowExtractor.java:23)
    12:27:18 [SEVERE] at com.tips48.restartNow.RestartNow.onEnable(RestartNow.
    java:192)
    12:27:18 [SEVERE] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlug
    in.java:126)
    12:27:18 [SEVERE] at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(
    JavaPluginLoader.java:878)
    12:27:18 [SEVERE] at org.bukkit.plugin.SimplePluginManager.enablePlugin(Si
    mplePluginManager.java:272)
    12:27:18 [SEVERE] at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftSe
    rver.java:162)
    12:27:18 [SEVERE] at org.bukkit.craftbukkit.CraftServer.enablePlugins(Craf
    tServer.java:146)
    12:27:18 [SEVERE] at net.minecraft.server.MinecraftServer.e(MinecraftServe
    r.java:284)
    12:27:18 [SEVERE] at net.minecraft.server.MinecraftServer.a(MinecraftServe
    r.java:271)
    12:27:18 [SEVERE] at net.minecraft.server.MinecraftServer.init(MinecraftSe
    rver.java:148)
    12:27:18 [SEVERE] at net.minecraft.server.MinecraftServer.run(MinecraftSer
    ver.java:335)
    12:27:18 [SEVERE] at net.minecraft.server.ThreadServerApplication.run(Sour
    ceFile:422)
    12:27:18 [SEVERE] java.io.FileNotFoundException: C:\Users\Hunter\Desktop\Shifter
    's%20Serv\plugins\restartNow.jar (The system cannot find the path specified)
    12:27:18 [SEVERE] at java.util.zip.ZipFile.open(Native Method)
    12:27:18 [SEVERE] at java.util.zip.ZipFile.<init>(Unknown Source)
    12:27:18 [SEVERE] at java.util.jar.JarFile.<init>(Unknown Source)
    12:27:18 [SEVERE] at java.util.jar.JarFile.<init>(Unknown Source)
    12:27:18 [SEVERE] at com.tips48.restartNow.RestartNowExtractor.extractFile
    (RestartNowExtractor.java:23)
    12:27:18 [SEVERE] at com.tips48.restartNow.RestartNow.onEnable(RestartNow.
    java:194)
    12:27:18 [SEVERE] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlug
    in.java:126)
    12:27:18 [SEVERE] at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(
    JavaPluginLoader.java:878)
    12:27:18 [SEVERE] at org.bukkit.plugin.SimplePluginManager.enablePlugin(Si
    mplePluginManager.java:272)
    12:27:18 [SEVERE] at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftSe
    rver.java:162)
    12:27:18 [SEVERE] at org.bukkit.craftbukkit.CraftServer.enablePlugins(Craf
    tServer.java:146)
    12:27:18 [SEVERE] at net.minecraft.server.MinecraftServer.e(MinecraftServe
    r.java:284)
    12:27:18 [SEVERE] at net.minecraft.server.MinecraftServer.a(MinecraftServe
    r.java:271)
    12:27:18 [SEVERE] at net.minecraft.server.MinecraftServer.init(MinecraftSe
    rver.java:148)
    12:27:18 [SEVERE] at net.minecraft.server.MinecraftServer.run(MinecraftSer
    ver.java:335)
    12:27:18 [SEVERE] at net.minecraft.server.ThreadServerApplication.run(Sour
    ceFile:422)
    12:27:24 [INFO] [RestartNow] You are running the latest version of RestartNow.
    12:27:24 [INFO] Server permissions file permissions.yml is empty, ignoring it
    12:27:24 [INFO] Done (0.797s)! For help, type "help" or "?"
    >
     
  7. @Everyone if you get a error on reload/restart/startup that mentions java.io.FileNotFoundException: I know about it, I'm looking for a fix. You can manually open the jar and extract RestartNowMain.jar and windowsonly.bat to the folder that craftbukkit is in, and the plugin will work fine, although it will still give the error.
     
  8. Offline

    HunterAP

    Code:
    #RestartNow Config
    #Sun Jul 31 20:50:19 EDT 2011
    Kick-Reason=Server is restarting.
    Wait-Before-Start=30 s
    Notify-Times=1 h, 30 m, 20 m, 10 m, 5 m, 1 m, 30 s
    Craftbukkit-Launcher=start.bat
    Chat-Color-On-Shutdown=RED
    Automatic-Reloads=false
    Automatic-Reloads-Time=30 m
    Automatic-Restarts=true
    Automatic-Restarts-Time=4 h
    Broadcast-On-Shutdown=**Server is restarting\!**
    No-Players-Reload=false
    No-Players-Reload-Time=10 m
    No-Players-Restart=false
    No-Player-Time=15 m
    I have tried setting the restart time to 2 minutes in order to test this, but no restarts happen. I have reloads disabled as reloads have been known to cause problems with some plugins.
    If I enable no-player restarts, then the server restarts every 15 mins when players are not on. I would like to request that this be changed so that if no one has logged in since the last no-player restart, that the restart is skipped. I would prefer, however, to simply have timed restarts every 4 to 6 hours.
    Oh, and one other thing... It seems that the players get different messages than the server console displays... When I scheduled a restart via the console, I saw the time left as 1 minute. The players saw 60 minutes. At 30 secs, they also saw 30 secs. Small bug.
     
  9. is your launcher start.bat?
     
  10. Offline

    HunterAP

    It is, and it seems to work fine. Again, console scheduled restarts work fine, as do no-players restarts. It is just automatic restarts that are not working.
     
  11. Any errors in the console?
     
  12. Offline

    HunterAP

    No errors in the console. I'm wondering if it is looking at another setting to determine if it is going to do auto-restarts.
     
  13. i don't think so.. weird!
     
  14. Offline

    HunterAP

    I might have found the problem... Line 464 and 465 of RestartNow.Java... Doesn't look like you're scheduling a restart if automatic==true.
     
  15. Really? I'll check it out
     
  16. Offline

    HunterAP

    Heya Tips. You have a chance to look at that yet?
     
  17. Just released Herobrine, today i'll fix some bugs here
     
  18. Offline

    Darsith

    Awesome plugin, works perfectly!

    for those with path issues, I found that spaces in file name cause errors, just delete the spaces and it works flawlessly.

    I also found a bug, when the server warning appears for the 1 min timer it says 60 minutes, not 60 seconds.

    found another little issue last night. When restartnow is installed it completely stops the dropchest plugin from working.

    Any idea why this might be causing a conflict? (removed this and the dropchest plugin started working again)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 16, 2016
    tips48 likes this.
  19. I have *no* clue why that would happen
     
  20. Just downloaded this to give it a try. I'm getting the same zip errors others have (which I know is a known issue), however, I'm also getting the "Failed to load Main-Class manifest attribute from" error when I try the manual test as listed earlier in the thread. Shuts down just fine, just won't restart.

    What path does the script look in for *NIX servers? Assume that the minecraft server has a directory structure like this:
    Code:
    /usr/local/mcs
    /usr/local/mcs/plugins
    and in the config file, wrap_server.sh is specified. As the plugin lives in ./plugins, I'm guessing that it's assuming a ../ in the path?

    Suggestion: Have the plugin check for the existence of the file listed in the Craftbukkit-Launcher config line and throw an error if it doesn't exist, along with the path it checked.
     
  21. does this work with screens on linux? that it will properly close the previous screen and open a new one, or just some other way not to get spammed with screens?
     
  22. It will likely not show the GUI, its a work in progress. In 3 weeks I have not found a solution :/

    Thats interesting. As for the Failed to load Main-Class, redownload? Thats really weird

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 16, 2016
  23. Offline

    eye[knot]

    This doesnt restarts it stop the server for me... :/
     
  24. Errors?
     
  25. Offline

    eye[knot]

    Code:
    [SEVERE] java.io.FileNotFoundException: E:\Gameservers\Client102\Servers\MC\Knot%5B1000%5D\plugins\restartNow.jar (The system cannot find the path specified)
    2011-08-14 17:35:34 [SEVERE]     at java.util.zip.ZipFile.open(Native Method)
    2011-08-14 17:35:34 [SEVERE]     at java.util.zip.ZipFile.<init>(Unknown Source)
    2011-08-14 17:35:34 [SEVERE]     at java.util.jar.JarFile.<init>(Unknown Source)
    2011-08-14 17:35:34 [SEVERE]     at java.util.jar.JarFile.<init>(Unknown Source)
    2011-08-14 17:35:34 [SEVERE]     at com.tips48.restartNow.RestartNowExtractor.extractFile(RestartNowExtractor.java:23)
    2011-08-14 17:35:34 [SEVERE]     at com.tips48.restartNow.RestartNow.onEnable(RestartNow.java:192)
    2011-08-14 17:35:34 [SEVERE]     at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:126)
    2011-08-14 17:35:34 [SEVERE]     at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:878)
    2011-08-14 17:35:34 [SEVERE]     at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:272)
    2011-08-14 17:35:34 [SEVERE]     at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:162)
    2011-08-14 17:35:34 [SEVERE]     at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:146)
    2011-08-14 17:35:34 [SEVERE]     at org.bukkit.craftbukkit.CraftServer.reload(CraftServer.java:380)
    2011-08-14 17:35:34 [SEVERE]     at com.tips48.restartNow.RestartNow.reloadServer(RestartNow.java:391)
    2011-08-14 17:35:34 [SEVERE]     at com.tips48.restartNow.util.ThreadCreator$ReloadServer.run(ThreadCreator.java:158)
    2011-08-14 17:35:34 [SEVERE]     at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:137)
    2011-08-14 17:35:34 [SEVERE]     at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:438)
    2011-08-14 17:35:34 [SEVERE]     at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
    2011-08-14 17:35:34 [SEVERE]     at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    2011-08-14 17:35:34 [SEVERE] java.io.FileNotFoundException: E:\Gameservers\Client102\Servers\MC\Knot%5B1000%5D\plugins\restartNow.jar (The system cannot find the path specified)
    2011-08-14 17:35:34 [SEVERE]     at java.util.zip.ZipFile.open(Native Method)
    2011-08-14 17:35:34 [SEVERE]     at java.util.zip.ZipFile.<init>(Unknown Source)
    2011-08-14 17:35:34 [SEVERE]     at java.util.jar.JarFile.<init>(Unknown Source)
    2011-08-14 17:35:34 [SEVERE]     at java.util.jar.JarFile.<init>(Unknown Source)
    2011-08-14 17:35:34 [SEVERE]     at com.tips48.restartNow.RestartNowExtractor.extractFile(RestartNowExtractor.java:23)
    2011-08-14 17:35:34 [SEVERE]     at com.tips48.restartNow.RestartNow.onEnable(RestartNow.java:194)
    2011-08-14 17:35:34 [SEVERE]     at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:126)
    2011-08-14 17:35:34 [SEVERE]     at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:878)
    2011-08-14 17:35:34 [SEVERE]     at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:272)
    2011-08-14 17:35:34 [SEVERE]     at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:162)
    2011-08-14 17:35:34 [SEVERE]     at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:146)
    2011-08-14 17:35:34 [SEVERE]     at org.bukkit.craftbukkit.CraftServer.reload(CraftServer.java:380)
    2011-08-14 17:35:34 [SEVERE]     at com.tips48.restartNow.RestartNow.reloadServer(RestartNow.java:391)
    2011-08-14 17:35:34 [SEVERE]     at com.tips48.restartNow.util.ThreadCreator$ReloadServer.run(ThreadCreator.java:158)
    2011-08-14 17:35:34 [SEVERE]     at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:137)
    2011-08-14 17:35:34 [SEVERE]     at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:438)
    2011-08-14 17:35:34 [SEVERE]     at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
    2011-08-14 17:35:34 [SEVERE]     at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    wooops, my bad, i probably didnt type the right path to the run.bat file. Right?
     
  26. Offline

    mikmik08

    Hey. I installed the plugin and i hoped it just would work, but no... :(
    When i type /restart does it say that it restart and all people are getting kicked...
    The server stops fine but it dosent start again?
    I have looked in the config file and it says that the starting file is name "run.bat" my run file is also called that..
    What should i do?
    mikmik08
     
  27. Remove the spaces from your path :/
    @mikmik08 Did you troubleshoot like in the OP?
     

  28. Umm, unless I'm really missing something, Graloth is referring to screen(1), which is not a GUI, it's a way to run something from a text only console and log out while still having said program run in the foreground.

    @Graloth: I run mine under screen, and the plugin does shut it down correctly, but I'm having problems with it rerunning a launch script I made specifically for this purpose (It's not apparently even getting to that stage).
     
  29. Offline

    eye[knot]

    I didnt get it.. What?
     
  30. Offline

    Ratchet

    what does Automatic-Reloads-Time=30 m do? it's not documented on the wiki
     
  31. Sorry. It means that the server reloads every 30 m
     

Share This Page