[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

    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

    Kairukun

    Using windows, a bit confused a bit. You say if the title of the CMD isn't MC I have done something wrong. But the only place were you mention MC is in the bat you provided but that only tells it to kill the window title MC.

    So how exactly do we go about naming the cmd prompt to MC for the title?
     
  3. Offline

    tips48

    The .bat you use to start the server must have title MC on the first line
     
  4. Offline

    Kairukun

    Also, I just switched to your new version, again using windows. It likes to just keep on restarting the server over and over in the same cmd prompt. Did nothing different than last time I installed it. In fact I used the old version up to about 30 minutes ago and that was working fine.

    Edit: Thanks for the response for about to change the title :) it wasn't mentioned in your how to install.
     
  5. Offline

    VirusWare

    Thanks for the update i will test it tomorrow. Without a gui is no problehm for me because the terminal of bukkit is often freezd or buggy.
     
  6. Offline

    tips48

    Make sure you add letter after config?
     
  7. Offline

    Kairukun

    EDIT: -shurg- nvm it just started working out of no where.

    RERE edit:"No-Players-Reload=true" if this is false it won't make the server keep rebooting over and over.
     
  8. Offline

    tips48

    so no-player-reload is bugged? ok, thank you
    0.2 is out!
    check the changelog for features!

    updated op. next up is pictures

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

    Kairukun

    hehe np..I guess I just won't have a reload function until it gets fixed :p
     
  10. Offline

    tips48

    thats extremely weird. i didn't think it would be bugged! i'll look

    Are you *positive* that its the reloads fault? What are the symptoms? Does it *restart* or *reload* ?

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

    Kairukun

    This is what happens exactly sorry for me being so vague before.

    I start the server using the "windowsonly.bat" Which runs "run.Bat". Now the last version you had would work just as intended would restart when it was supposed to. But as it currently stands with default config, it will keep RELOADING. so this is what it looks like
    Code:
    20:25:38 [INFO] This server is running Craftbukkit version git-Bukkit-0.0.0-823-
    gb9d0b04-b860jnks (MC: 1.6.6)
    20:25:38 [INFO] Preparing level "Test-World"
    20:25:38 [INFO] Preparing start region for level 0
    20:25:39 [INFO] Preparing start region for level 1
    20:25:39 [INFO] Preparing spawn area: 8%
    20:25:40 [INFO] [ChopTree] Permissions not detected, defaulting to ops.
    20:25:40 [INFO] ChopTree 1.23 enabled!
    20:25:40 [INFO] [RestartNow] 0.2ready to restart!
    20:25:40 [INFO] [RestartNow] Permissions not detected.
    20:25:40 [INFO] Done (0.170s)! For help, type "help" or "?"
    20:25:45 [INFO] [ChopTree] Saving changes...
    20:25:45 [INFO] [ChopTree] Saved changes.
    20:25:45 [INFO] ChopTree disabled!
    20:25:45 [INFO] [RestartNow] Disabling...
    20:25:45 [INFO] [ChopTree] Permissions not detected, defaulting to ops.
    20:25:45 [INFO] ChopTree 1.23 enabled!
    20:25:45 [INFO] [RestartNow] 0.2ready to restart!
    20:25:45 [INFO] [RestartNow] Permissions not detected.
    20:25:45 [INFO] [ChopTree] Saving changes...
    20:25:45 [INFO] [ChopTree] Saved changes.
    20:25:45 [INFO] ChopTree disabled!
    20:25:45 [INFO] [RestartNow] Disabling...
    20:25:45 [INFO] [ChopTree] Permissions not detected, defaulting to ops.
    20:25:45 [INFO] ChopTree 1.23 enabled!
    20:25:45 [INFO] [RestartNow] 0.2ready to restart!
    20:25:45 [INFO] [RestartNow] Permissions not detected.
    20:25:45 [INFO] [ChopTree] Saving changes...
    20:25:45 [INFO] [ChopTree] Saved changes.
    20:25:45 [INFO] ChopTree disabled!
    20:25:45 [INFO] [RestartNow] Disabling...
    20:25:45 [INFO] [ChopTree] Permissions not detected, defaulting to ops.
    20:25:45 [INFO] ChopTree 1.23 enabled!
    20:25:45 [INFO] [RestartNow] 0.2ready to restart!
    20:25:45 [INFO] [RestartNow] Permissions not detected.
    20:25:45 [INFO] [ChopTree] Saving changes...
    20:25:45 [INFO] [ChopTree] Saved changes.
    20:25:45 [INFO] ChopTree disabled!
    20:25:45 [INFO] [RestartNow] Disabling...
    20:25:45 [INFO] [ChopTree] Permissions not detected, defaulting to ops.
    20:25:45 [INFO] ChopTree 1.23 enabled!
    20:25:45 [INFO] [RestartNow] 0.2ready to restart!
    20:25:45 [INFO] [RestartNow] Permissions not detected.
    20:25:45 [INFO] [ChopTree] Saving changes...
    20:25:45 [INFO] [ChopTree] Saved changes.
    20:25:45 [INFO] ChopTree disabled!
    20:25:45 [INFO] [RestartNow] Disabling...
    20:25:45 [INFO] [ChopTree] Permissions not detected, defaulting to ops.
    20:25:45 [INFO] ChopTree 1.23 enabled!
    20:25:45 [INFO] [RestartNow] 0.2ready to restart!
    20:25:45 [INFO] [RestartNow] Permissions not detected.
    20:25:45 [INFO] [ChopTree] Saving changes...
    20:25:45 [INFO] [ChopTree] Saved changes.
    20:25:45 [INFO] ChopTree disabled!
    20:25:45 [INFO] [RestartNow] Disabling...
    20:25:45 [INFO] [ChopTree] Permissions not detected, defaulting to ops.
    20:25:45 [INFO] ChopTree 1.23 enabled!
    20:25:45 [INFO] [RestartNow] 0.2ready to restart!
    20:25:45 [INFO] [RestartNow] Permissions not detected.
    20:25:45 [INFO] [ChopTree] Saving changes...
    20:25:45 [INFO] [ChopTree] Saved changes.
    20:25:45 [INFO] ChopTree disabled!
    20:25:45 [INFO] [RestartNow] Disabling...
    20:25:45 [INFO] [ChopTree] Permissions not detected, defaulting to ops.
    20:25:45 [INFO] ChopTree 1.23 enabled!
    20:25:45 [INFO] [RestartNow] 0.2ready to restart!
    20:25:45 [INFO] [RestartNow] Permissions not detected.
    20:25:45 [INFO] [ChopTree] Saving changes...
    20:25:45 [INFO] [ChopTree] Saved changes.
    20:25:45 [INFO] ChopTree disabled!
    20:25:45 [INFO] [RestartNow] Disabling...
    20:25:45 [INFO] [ChopTree] Permissions not detected, defaulting to ops.
    20:25:45 [INFO] ChopTree 1.23 enabled!
    20:25:45 [INFO] [RestartNow] 0.2ready to restart!
    20:25:45 [INFO] [RestartNow] Permissions not detected.
    >stop
    20:25:45 [INFO] Stopping the server..
    20:25:45 [INFO] Stopping server
    20:25:45 [INFO] [ChopTree] Saving changes...
    20:25:45 [INFO] [ChopTree] Saved changes.
    20:25:45 [INFO] ChopTree disabled!
    20:25:45 [INFO] [RestartNow] Disabling...
    20:25:45 [INFO] Saving chunks
    20:25:46 [INFO] Stopping server
    >Press any key to continue . . .

    As you can see it just wants to keep running it over and over. BUT if I take "No-Players-Reload=true" and set it to "No-Players-Reload=false" The plugin will run as intended and flawlessly

    Here is my config(this was generated by the plugin as I thought maybe the one that was there to begin with was bugged)

    Code:
    #RestartNow Config
    #Mon Jun 13 16:14:16 EDT 2011
    Wait-Before-Start=30 s
    Notify-Ten-Minutes=true
    Craftbukkit-Launcher=run.bat
    No-Players-Reload-Time=10 m
    Notify-Five-Minutes=true
    Notify-One-Minute=true
    Notify-Thirty-Minutes=true
    No-Player-Time=15 m
    Automatic-Restarts-Time=2 h
    No-Players-Reload=true
    OS-Name=Windows
    Automatic-Restarts=true
    Notify-Fifteen-Minutes=true
    No-Players-Restart=true
    
    Granted I didn't know how to set the title of the CMD window prior (wish you would point that out for some people who do not know how to do it) this is happening both prior and after that.
     
  12. Offline

    Fujikatoma

    Pleas make one beacause there is no way to restart the server fast , i have to stop it ingame and start it in tekbase :/
     
  13. Offline

    tips48

    i could make it optional! maybe :p

    Ok, give me a couple minutes and i'll checkout the source. i don't see the error, but you never know ;)

    updated the op. can't believe i forgot that!

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

    Kairukun

    What did you forget :p?
     
  15. Offline

    tips48

    the title MC thing :D
     
  16. Offline

    Deatlev

    Eh Now I cant start my server Oo it just keeps restarting when I put the restartNow jar in my plugins folder, just restarts and I can't log on the server, I check so everything is ok in the config


    #RestartNow Config
    #Mon Jun 13 16:14:16 EDT 2011
    Wait-Before-Start=1 s
    Notify-Ten-Minutes=true
    Craftbukkit-Launcher=run.bat
    No-Players-Reload-Time=10 m
    Notify-Five-Minutes=true
    Notify-One-Minute=true
    Notify-Thirty-Minutes=true
    No-Player-Time=15 m
    Automatic-Restarts-Time=3 h
    No-Players-Reload=true
    OS-Name=Windows
    Automatic-Restarts=true
    Notify-Fifteen-Minutes=true
    No-Players-Restart=true
     
  17. Offline

    bill45

    No-Players-Reload=false
    No-Players-Restart=false

    Setting those to false should fix it.

    Also is it suppose to leave the command prompt open when it restarts the server? I mean it stop the server and opens up a new command prompt. Not terrible problem, but hate to come back to 30 command prompts if I leave the server on all day.
     
  18. Offline

    Kairukun

    On your DEFAULT .Bat file (not the one from restartnow) at the very top enter in "title MC".
    Code:
    title MC
    @ECHO OFF
    SET BINDIR=%~dp0
    CD /D "%BINDIR%"
    "%ProgramFiles%\Java\jre6\bin\java.exe" -Xincgc -Xmx1024M -jar craftbukkit-860.jar
    PAUSE
    As long as you didn't change anything in the other .BAT that came with the plugin besides the <bat name> it will now close the window when it restarts.
     
  19. Offline

    morizuki

    Woah... Yes my request is up :D thanks thanks..

    I have 2 more request if you can..

    put Auto-Reload or Restart= once? or twice?
    //Auto reload/restart the server once or twice or thrice etc..
    and Auto-Reload-Time= x h?
    //Reload the server in x time

    Thanks for the reload w/o player :D
     
  20. Offline

    pyros

    Would putting screen inside your shell script not fix this?
    So
    Code:
    #!/bin/sh
    screen java -Xincgc -Xmx1G -jar craftbukkit-0.0.1-SNAPSHOT.jar
    
     
  21. Offline

    bill45

    I do have title MC on the first line. It doesn't close out.
     
  22. Offline

    Kairukun

    -shurg- at that point idk, I guess go over all the steps he mentioned before and retrace your steps. But the whole MC thing is what was making mine not close but now it does.
     
  23. Offline

    kahlilnc

    I dont think my brohoster server has a run.bat
     
  24. Offline

    tips48

    So no player reload is bugged, is no player restart bugged?
    @bill45 make sure you replace <bat name> in windowsonly.bat with the .bat name you use to start the server,
    E.x. Run.bat

    I can do the second, but i dont understand the first one...

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

    morizuki

    the first one is let say i want to reload the server only once in x time..
     
  26. Offline

    tips48

    so you mean at like 5:55 PM or something like that?
     
  27. Offline

    morizuki

    oh sorry.. uh elapsed time :D
     
  28. Offline

    bill45

    Yes, those might be bugged, for some reason if you start the server with those on true it totally ignores those times for it to wait before restart. Anyway yes everything is renamed as it should be. It is possible it might not work with my .bat. Mine has different code than usual because my craftbukkit has no META-INF folder in it. So, my .bat has different code than the usual so it can start craftbukkit with no META-INF folder.

    Random person with a question:Why do you have no META-INF folder in your craftbukkit.jar? That is just crazy!!

    bill45:Because it was needed to be removed to add itemcraft with mo'creatures.

    Now, I may have put only part of the code needed in my .bat but it runs my server so I couldn't complain.

    Code:
    title MC
    java -Xmx1024M -Xms1024M -cp ItemCraft.jar;craftbukkit.jar org.bukkit.craftbukkit.Main
    And yes, this is all the code in my .bat.
     
  29. Offline

    tips48

    well, from what i see, it should be fine... Interesting! I'll look into a hotfix

    I still don't get it :p

    To everyone else:
    I just found the bug, i will put up a hotfix in a second

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

    morizuki

    uh.. I want to auto reload my server once after 2 seconds whenever I open my server..
     
  31. Offline

    tips48

    ok... i'll add that i guess
     

Share This Page