[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

    ToXicFRaGz

    emm
    Code:
    ERROR: The search filter cannot be recognized.
    The syntax of the command is incorrect.
    
    C:\Users\xxxx\Desktop\100Sub Server\Bin>start <RUN>
    
    C:\Users\xxxx\Desktop\100Sub Server\Bin>
    
    my bat file is "RUN.bat"
     
  3. remove the < and >
     
    ToXicFRaGz likes this.
  4. Offline

    ToXicFRaGz

    sorry but can you tell me what
    Code:
    No-Player-Time=15 m
    does and how is it different to
    Code:
    No-Players-Reload-Time=10 m
    I found a few bugs just want to help you out:
    When it says "server restarting in 15 minutes" it also says "server restarting in 10 minutes"
    and when it says "server restarting in 5 minutes" it also says "server restarting in 1 minutes"

    [not a bug]: can you add a "10 seconds until server restart" and "server restarting" that would be very cool
    could you make a text on all the announcements editable and the "server is restarting, come back soon!" editable
    Hope this will help you out :)

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

    morizuki

    I have another suggestion.. auto reload a specific plugin after how many seconds..
     
  6. Offline

    terkv

    Yeah, its the best Restart plugin i've had, just fix that problem please! :) & I have a suggestion, like, its adds a backup file to the specific folder you choose, when the server restarts :)
     
    ToXicFRaGz likes this.
  7. Offline

    sillyrosster

    For Linux, can't you have it start back up into a 'screen'?
     
  8. Hey guys,
    Im currently in rhode island(beach ftw ;) and just got internet. I only have my iPod, so i wont be releasing any updates, sorry. In response to all the bug reports, first off thank you for saying them in a mature way. I will look into why the broadcast are off, i think i know why. I defidently plan on making all the messages configurable, that will be in another update.
    Post any bugs or features and ill get them all when i get back!
     
  9. Offline

    JKnutsen

    Hey! Would it be possible to add something so I can use it on my server? I run my world of a ramdisk, so I have 3 scripts..
    First of before I restart my server I need to start "save_world.sh", to save the world, and then I restart the machine. After that I need to run "restore.sh", which creates a ramdisk and puts the world that got saved on it. After that I run start.sh =)

    Would it be possible to add something like this? So I can use it too? Because when I restart my server without save_world.sh the world would be deleted :/
    Thanks in advance
    - Jknutsen
     
  10. I could theoretically add something like this, but it would be kind of inconvient. The worlds already save on shutdown, so why would you save again? You could just use a backup Plugin ;)
    I might add this but when do you want the script to run? On shutdown? On start?
     
  11. Offline

    JKnutsen

    Well I would need to have to run one script before shutdown and one on start. The one before shutdown saves the world to a special location, and on startup it creates a new RAMdisk, deletes the rest of the old on (kinda) and makes new shortcuts, and then installs the one that was backed up. Perhaps you can add something like two fields in the config to run Ex. Shutdown script and startup script, its probally easier said then done tho =)
     
  12. Hmmm.i just dont see that being used much...maybe ill make a seperate plugin for that.how do you do it now?
     
  13. Offline

    kahlilnc

    Is it possible for this to run with a control panel? Like brohosters TCadmin? There is no run.bat I think.
     
  14. Offline

    JKnutsen

    Right now I have to manually restart my server. Ill write a guide on how I restart my server hehe
    1. I run the save_world.sh
    2. I stop the bukkit server
    3. I reboot the server (reboot command)
    4. I run restore.sh (Createas new ramdisk and links)
    5. I run start.sh
     
  15. I dont really know because i haven't used their service. It sounds like they have a "wrapper". Hopefully i can find a way to contact them when i get home ;)

    yeesh! Nhmm, it *might* be possible

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

    pyros

    So my server was getting laggier and laggier with each restart, using your plugin, and it turns out when running "ps -ef | grep java", it was creating many instances that failed to boot properly. As I commented earlier, the autorestart feature didnt seem to be working (even leaving it for 10 minutes didnt start a server I could connect to) so I presume these duds are what happened to the failed servers, causing masses of lag in the process

    My settings are the same as earlier posts which you had said were fine, but just to repost them:
    run.sh:
    Code:
    #!/bin/sh
    java -Xincgc -Xmx1G -jar craftbukkit-0.0.1-SNAPSHOT.jar
    
    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=Ubuntu
     Craftbukkit-Launcher=run.sh
     Automatic-Restarts-Time=3600
     Wait-Before-Start=1
    
    Worth noting is that on the recent version,
    minecraft@zarkov:~/minecraft$ java restartNowMain.jar run.sh ubuntu 1
    Exception in thread "main" java.lang.NoClassDefFoundError: restartNowMain/jar
    Caused by: java.lang.ClassNotFoundException: restartNowMain.jar
    at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
    Could not find the main class: restartNowMain.jar. Program will exit.
    I presumed you had fixed this and so didnt think to test it before using the restarter, but seems to have spammed java sessions as I said above

    Also, as you asked us to poll on whether we want a GUI or a wrapper, providing you meant GUI as in a server console in the terminal I had open anyway, I would prefer that
     
  17.  
  18. Offline

    pyros

    You just quoted my post?
     
  19. Offline

    Tom Williams

    So im running MineOS on vmware server out of ramdisk, when I type /restart nothing happens, am i not getting my craftbukkit launcher to the right spot or something? if someone could help me youd be my hero, and thanks in advance!
    Code:
    #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=linux 2.6
    Automatic-Restarts=true
    Notify-Fifteen-Minutes=true
    No-Players-Restart=true
    
     
  20. Whoops, my bad.
    Try redownloading restartNowMain because it appears to be corrupt. Also, delete/update your config because it is not up to date.

    Hmm. your launcher cant be right because linux takes .sh files. Whatever the file is called that you click on to start the server should be craftbukkit-launcher

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

    bushingenna

    what am i supposed to do with all the stuff i get? which pluing is the right one to put on mods list? whats that batch file? so many questions lol
     
  22. Did you read the install guide?
     
  23. Offline

    dendeer82

    hmmm... I dont get this part:
    and also...when my server is running, it gives incorrect timing for shutdown.

    For example:

    Server restarting in 30 min.
    *3 sec later*
    Server restarting in 15 min.
    *15 min later*
    Server restarting in 10 min.
    *3 sec later*
    Server restarting in 5 min.

    =(

    EDIT: nevermind, I read some previous posts and got all of them now :)
     
  24. Swee ;). That broadcast bug i know about, but thanks fordescribing it like that as ithink i know the problm. I am in ri so no updates till at least monday :/
     
  25. Offline

    PigSaddle

    Hi
    I must be doing something stupid:
    Code:
    #RestartNow Config
    #Wed Jun 22 13:42:37 BST 2011
    Wait-Before-Start=5 s
    Notify-Ten-Minutes=true
    Craftbukkit-Launcher=restart_server.sh
    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 m
    No-Players-Reload=true
    OS-Name=Linux
    Automatic-Restarts=true
    Notify-Fifteen-Minutes=true
    No-Players-Restart=true
    [mono-addon] -bash-3.2$ 
    I just can't get it to restart
    the restart-server.sh is in same dir as restartNowMain.jar.

    restart_server.sh is:
    Code:
    #!/bin/sh
    cd /home/mc_698/
    screen -A -m -d -S mcdash_698 ./start_server.sh
    start_server.sh is:
    Code:
    #!/bin/sh
    cd /home/mc_698/
    java -Xincgc -Xmx2048M -jar /home/mc_698/craftbukkit.jar nogui
    java -jar Chunkster.jar world > chunkster.log
    The reason start_server is diffent is due to the control panel sending the screen command initially.

    Anyway executing restart_server.sh works as does running
    Code:
    java -jar restartNowMain.jar "restart_server.sh" "Linux" "1"
    But I just can't get it to restart either manually using /restart or automatically (hence the short restart times in the config.

    Help please :)
     
    Maxwolf Goodliffe likes this.
  26. @PigSaddle are you sure the server is just not showing a gui? On linux after a restart there is no console gui visible(bug). Check system manager or the equivilent to see if java is running...
    To everyone:
    I will be home saturday night to start working on 0.3
     
  27. Offline

    PigSaddle

    No

    The restart should launch a screen . I don't use GUI. And the servers is not running. This is a shared hosted platform so I know when somethiunsg running and not. Just doesn'ts eenm to want to run the script. As I said if I manually execute the screipt it works fine.
     
  28. Hmm.ill be able to troubleshoot more when i get home, but it sounds like it should be working :confused:
     
  29. Offline

    Phealoon

    The problem I am getting is in the restart timer. It will say "Restarting in 10 minutes" shown in green, then a few seconds later it says "Restarting in 5 minutes." Most of the time it does NOT restart during the time it says it well, but whenever I have a server crash, it works perfectly to reset it.
     
  30. Sadly, this is a known bug, i havent goten a chanr to update the OP.
     
  31. Offline

    Phealoon

    @ aidan matzko

    Is there a way to log java memory as well? Our server gets a lot of Java Out of Memory errors, and it would be nice to see which plugins we have that is using or just not dumping the memory.
     

Share This Page