[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. Offline

    RedAlex

    System are english but translate in french by the windows update.
    For the installation i have just download your link i have recive a file .jar with size 583 KO with a loot of file in if i open it with winrar.
    test build, build, com, restartnowmain.jar,readme,windows only.....
     
  3. the problem is because you have a space in your path from C:/ to the server path. I'm working on a fix
     
  4. Offline

    Mcmaxx

    Hello again sir, long time no complain.
    Well, I'm certainly loving your 0.3 update, problem (ugh) being that the display messages are all screwy. If I remember correctly, they broadcasted from 1200 minutes to 600 minutes to 300 minutes (on and on) for the time period of 2 hours. So I don't know..
    My math was never any good, but I'm almost positive that 1200/60 is 20 hours..
    Once again, any help is well appreciated. :confused:
     
  5. I don't completely understand your question, but i'll try to help. Can you please paste your configuration file?
     
  6. Offline

    Hacr

    Super plugin :D

    It woud be cool if you coud write in the time the server shoud restart so I can restart my server at 04:00 in the night.

    Thanks alot for this nice plugin :)

    EDIT: Woud also be cool if you coud fix the linux gui bug ;)
     
  7. 1) That will be a feature coming up soon.
    2) Thats, sadly, not fixable by me unless i convert this to a wrapper(which i will most likely do soon)
     
  8. Offline

    Mcmaxx

    Well, the broadcast times are basically screwed up:
    #RestartNow Config
    #Tue Jul 12 09:50:09 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
    Automatic-Reloads-Time=30 m
    Craftbukkit-Launcher=run.bat
    Chat-Color-On-Shutdown=RED
    No-Players-Reload-Time=30 m
    No-Player-Time=2 h
    Automatic-Reloads=true
    Automatic-Restarts-Time=2 h
    No-Players-Reload=true
    Automatic-Restarts=true
    Broadcast-On-Shutdown=**Server is restarting\!**
    No-Players-Restart=true
     
  9. Offline

    Clucky

    Here's you an error:

    Code:
    20:41:51 [SEVERE] java.util.zip.ZipException: error in opening zip file
    20:41:51 [SEVERE]     at java.util.zip.ZipFile.open(Native Method)
    20:41:51 [SEVERE]     at java.util.zip.ZipFile.<init>(ZipFile.java:131)
    20:41:51 [SEVERE]     at java.util.jar.JarFile.<init>(JarFile.java:150)
    20:41:51 [SEVERE]     at java.util.jar.JarFile.<init>(JarFile.java:87)
    20:41:51 [SEVERE]     at com.tips48.restartNow.RestartNowExtractor.extractFile(RestartNowExtractor.java:23)
    20:41:51 [SEVERE]     at com.tips48.restartNow.RestartNow.onEnable(RestartNow.java:192)
    20:41:51 [SEVERE]     at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:126)
    20:41:51 [SEVERE]     at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:864)
    20:41:51 [SEVERE]     at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:264)
    20:41:51 [SEVERE]     at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:151)
    20:41:51 [SEVERE]     at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:136)
    20:41:51 [SEVERE]     at org.bukkit.craftbukkit.CraftServer.reload(CraftServer.java:358)
    20:41:51 [SEVERE]     at com.tips48.restartNow.RestartNow.reloadServer(RestartNow.java:391)
    20:41:51 [SEVERE]     at com.tips48.restartNow.util.ThreadCreator$automaticReloads.run(ThreadCreator.java:182)
    20:41:51 [SEVERE]     at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:137)
    20:41:51 [SEVERE]     at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:438)
    20:41:51 [SEVERE]     at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
    20:41:51 [SEVERE]     at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    20:41:51 [SEVERE] java.util.zip.ZipException: error in opening zip file
    20:41:51 [SEVERE]     at java.util.zip.ZipFile.open(Native Method)
    20:41:51 [SEVERE]     at java.util.zip.ZipFile.<init>(ZipFile.java:131)
    20:41:51 [SEVERE]     at java.util.jar.JarFile.<init>(JarFile.java:150)
    20:41:51 [SEVERE]     at java.util.jar.JarFile.<init>(JarFile.java:87)
    20:41:51 [SEVERE]     at com.tips48.restartNow.RestartNowExtractor.extractFile(RestartNowExtractor.java:23)
    20:41:51 [SEVERE]     at com.tips48.restartNow.RestartNow.onEnable(RestartNow.java:194)
    20:41:51 [SEVERE]     at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:126)
    20:41:51 [SEVERE]     at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:864)
    20:41:51 [SEVERE]     at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:264)
    20:41:51 [SEVERE]     at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:151)
    20:41:51 [SEVERE]     at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:136)
    20:41:51 [SEVERE]     at org.bukkit.craftbukkit.CraftServer.reload(CraftServer.java:358)
    20:41:51 [SEVERE]     at com.tips48.restartNow.RestartNow.reloadServer(RestartNow.java:391)
    20:41:51 [SEVERE]     at com.tips48.restartNow.util.ThreadCreator$automaticReloads.run(ThreadCreator.java:182)
    20:41:51 [SEVERE]     at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:137)
    20:41:51 [SEVERE]     at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:438)
    20:41:51 [SEVERE]     at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
    20:41:51 [SEVERE]     at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    
    I know how much you developers love these things :D

    And another thing...

    Code:
    21:02:03 [INFO] [RestartNow] Server is restarting in 600 minute(s)
    It means seconds, but its saying minutes, and it means reload, but it says restart... why? I haven't edited the config file at all.
     
  10. Offline

    Mcmaxx

    @tips48
    This is EXACTLY what I've been getting too, it looks like a quick fix? Fast update please?
     
    Clucky likes this.
  11. @Clucky haha, its fine :p The error is because you have a space in your path from C:\server\plugins somewhere, this is NOT intentionaly, and i am working on a fix. Also, as for the Server is restarting in 600 minute(s), I must have done my math wrong, will check :p
     
    Clucky likes this.
  12. Offline

    Clucky

    Minor prob, i'm on linux =/ lol my path names are / and I do not believe that I have any spaces. its on desktop in MC_Server in plugins

    Code:
    /home/clucky/Desktop/MC_Server/plugins
    
     
  13. @Clucky @Mcmaxx
    Updated to 0.3_1, fixes notification times(untested, on laptop :/)

    Thats weird, thats the only issue I have seen... For now, you can open up the jar with a jar/zip/rar opener(NOT java), navigate to the folder "src/", and move RestartNowMain.jar to your main server directory(the one with craftbukkit). I will work on finding a fix when i get back from vacation(which i leave for in about 12 hours :p)

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

    kahlilnc

    So can this be compatible with control panels?
     
  15. depends on the control panel. Some cannot and will not, but others are.
     
  16. Offline

    Clucky

    Yup i feel like an idiot, i forgot to edit the OS name from windows to Linux, thats prob my problem, LOL. :p

    However there is one minor prob:

    Code:
    21:52:24 [SEVERE] Error occurred while enabling RestartNow v0.3 (Is it up to date?): null
    java.lang.NullPointerException
        at com.tips48.restartNow.RestartNow.checkAutomaticReloadTime(RestartNow.java:635)
        at com.tips48.restartNow.RestartNow.onEnable(RestartNow.java:189)
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:126)
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:864)
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:264)
        at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:151)
        at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:136)
        at org.bukkit.craftbukkit.CraftServer.reload(CraftServer.java:358)
        at org.bukkit.command.SimpleCommandMap$ReloadCommand.execute(SimpleCommandMap.java:281)
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:129)
        at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:290)
        at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:480)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:465)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    
    Did i spell Linux wrong: Linux (should it be linux, or perhaps ubuntu?)

    PS: as you noticed, the Zip error went away.
     
  17. Offline

    kahlilnc

    Hm what control panels do you think work with this?
     
  18. Offline

    Mcmaxx

    @tips48
    1. The time thing isn't fixed, its fixed when it displays in console, but it doesn't display correctly in game.
    Eg: Console: Restart in 20 minutes
    Ingame: Server restart in 1200 minutes
    2. Does the server restart (as in completely reopen the window) when no-ones online? If not, can you make it do that please?
    3. Thanks :p
     
  19. Offline

    sharkck

    I noticed that with version 3.0, when I typed restartnow update, it downloaded a copy of .3.0 instead of 3.1.... I had to manually go to the website and download the update and install it. I dont know if this is because of a path that needs to be corrected inside the code or if the path changed between .3.0 and .3.1​
     
  20. Offline

    decebaldecebal

    doesn't work for me it just reloads the server but it didn't restart it every 2 hours!Here's my cofig:
    #RestartNow Config
    #Fri Jul 15 11:14:10 EEST 2011
    Kick-Reason=Server is restarting.
    Wait-Before-Start=15 s
    Notify-Times=1 h, 30 m, 20 m, 10 m, 5 m, 1 m, 30 s
    Automatic-Reloads-Time=45 m
    Craftbukkit-Launcher=Start.bat
    Chat-Color-On-Shutdown=RED
    No-Players-Reload-Time=30 m
    No-Player-Time=30 m
    Automatic-Reloads=true
    Automatic-Restarts-Time=2 h
    No-Players-Reload=true
    Automatic-Restarts=true
    Broadcast-On-Shutdown=**Server is restarting\!**
    No-Players-Restart=true

    And it also displays ChatColorNull when it says Server is restarting!
     
  21. @decebaldecebal thats weird. Were there any errors, or other information? And the ChatColorNull i know about, i will fix that when i get home
    @sharkck thanks for the report, i must have screwed something up with the download links
    @Mcmaxx wow, i feel stupid
    1)Yep, fix when i get back, you make me look like a retard :D
    2)Yes, No-Player-Restart and No-Player-Reload
    3) I try :p

    http://forums.bukkit.org/threads/why-my-plugins-arent-updated.27038/

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

    Flappy

    Hi, im running my server on debian 6 x64 VPS, using screen. And I can't get it work... It does kick all players, and shuts server down, but won't start it again... my config:
    Code:
    #RestartNow Config
    #Tue Jul 19 19:18:21 MSD 2011
    Kick-Reason=Restart serwera.
    Wait-Before-Start=30 s
    Notify-Times=1 h, 30 m, 20 m, 10 m, 5 m, 1 m, 30 s
    Automatic-Reloads-Time=30 m
    Craftbukkit-Launcher=minecraft.sh
    Chat-Color-On-Shutdown=RED
    No-Players-Reload-Time=10 m
    No-Player-Time=15 m
    Automatic-Reloads=true
    Automatic-Restarts-Time=2 h
    No-Players-Reload=true
    Automatic-Restarts=true
    Broadcast-On-Shutdown=**Serwer jest restartowany\!**
    No-Players-Restart=true
    
     
  23. It's a known bug, check the op. Basically, what happens is the server shuts down, then starts up again *without* the terminal. It is still running, and players can still connect, but you as the owner can't type things into the console. Currently, there is no way for me to fix this, although i may release a wrapper of some sort to fix this.
     
  24. Offline

    Flappy

    It does not, I tried to connect and couldn't, so I went to vps administration panel and found out that vps used only 20 mb of RAM so server can't be running..
     
  25. Hmm... I can't think of any reason why it wouldn't. What happens if you run in the command line:
    java -jar restartNowMain.jar "Linux" "<sh name>" "0"
    Replace <sh name> with the .sh file you use to start the server.
     
  26. Offline

    Flappy

    nothing, I don't have such file. xd That's strange.
     
  27. How do you start the server? Is it a control panel?
     
  28. Offline

    Flappy

    no, i start it from ssh, with screen ./minecraft.sh.
     
  29. Offline

    decebaldecebal

    @tips48 i dont get any errors
    the automatic restart isn't working and it only restarts the server when there are no user on it
     
  30. Offline

    Teh Kitteh

    Please fix the space thing soon, I would like to use this on my server as I am renting it cant cant use other things, but my host says there is a space before its gets to my directory.
     

Share This Page