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

    • 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...

    Source Code

    How to Install:
    There is now a semi-complete wiki! hopefully this helps clear up any confusion.
    Wiki Here
    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!

    • 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


    Whenever I get to a computer, I am so trying this out! I run Linux, so I hope it works =D
  3. Should work fine on linux. i tested on Ubuntu 10.10
    set OS-Name correctly and it will work fine. anything is exceptable (ex. CentOS, Ubuntu, Linux, so on so forth.)
  4. Offline


  5. Offline


    I think I have Ubuntu 10.10, I'll figure it out.. LoL
  6. hahaha
  7. Offline


    That fix is pretty deadly. If my server is hosted on a shared/dedi... lol.
  8. wait, good or bad?
  9. Offline


    Seeing that your fix only kills all cmds - and if the box has many servers hosted, I guess it's bad. Another (sad) reason to stay away from this plugin, for now. I don't want to shut down others servers lol. Then again I don't know how much access the provider gives to java.
  10. Well, it wouldnt shutoff other mc servers.and im still look for a full fix...
  11. Offline


    Lol, so your fix Kills the process completely and then starts it back up. What's wrong with that? I thought that's what it was supposed to do =/
  12. Offline


    It kills all cmd processes
  13. its yet another reason not to use windows for a server :D
    what @iffa says is correct, it kills ALL cmd's. im working on adding a batch file for windows owners, as its the only viable way i see fixing this problem

    @iffa fixed!
    Version 0.1.2 -- Full fix for windows users. new bat!

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


    Alright I'm having a problem, probably just my own stupidity, but help me anyways.. Lol

    Here's my run.bat:
     screen java -Xmx2048M -Xms2048M -jar craftbukkit.jar nogui
    Also heres my RestartNow config:
    #RestartNow Config Sun Jun 05 15:22:38 EDT 2011
    OS-Name=Ubuntu 10.04.2
    It will stop the server, but won't start it back up. It just ends the process. Am I doing something wrong?

    Oh, and I also get this error when it's trying to restart. I get the Region Market one regardless.
    2011-06-06 10:55:29 [SEVERE] Error occurred while disabling RegionMarket v0.6 (I                               s it up to date?): loader constraint violation: loader (instance of org/bukkit/p                               lugin/java/PluginClassLoader) previously initiated loading for a different type                                with name "com/sk89q/worldguard/protection/GlobalRegionManager"
    java.lang.LinkageError: loader constraint violation: loader (instance of org/buk                               kit/plugin/java/PluginClassLoader) previously initiated loading for a different                                type with name "com/sk89q/worldguard/protection/GlobalRegionManager"
            at java.lang.ClassLoader.defineClass1(Native Method)
            at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
            at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:14                               2)
            at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
            at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
            at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
            at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.                               java:36)
            at org.bukkit.plugin.java.JavaPluginLoader.getClassByName(JavaPluginLoad                               er.java:218)
            at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.                               java:32)
            at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.                               java:24)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
            at br.Ziden.RegionMarket.RegionMarket.onDisable(RegionMarket.java:228)
            at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:127)
            at org.bukkit.plugin.java.JavaPluginLoader.disablePlugin(JavaPluginLoade                               r.java:771)
            at org.bukkit.plugin.SimplePluginManager.disablePlugin(SimplePluginManag                               er.java:269)
            at org.bukkit.plugin.SimplePluginManager.disablePlugins(SimplePluginMana                               ger.java:262)
            at com.usa.tips48.restartNow.RestartNow.stopServer(RestartNow.java:129)
            at com.usa.tips48.restartNow.RestartNow.restartServer(RestartNow.java:13                               5)
            at com.usa.tips48.restartNow.RestartNow.onCommand(RestartNow.java:167)
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
            at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:12                               8)
            at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:2                               73)
            at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:428)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:413)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:309)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    2011-06-06 10:55:29 [INFO] [MultiInv] Plugin disabled.
  15. Offline


    You can't use a .bat on Linux. Use a shell script (.sh) (?)
  16. @sillyrosster
    you really are silly! :D
    no, what @iffa said was right, you must use a .sh script
    so you would change the config to run.sh (also, you could use something like stupidme.sh and change the config to stupidme.sh) just rename it...

    imma go out on a limb and say that Region Market error happens without my plugin. Thats not my error, it merely is called because i am turning off the plugin.
    @iffa did the 0.1.2 fix work?

    done, my bad

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


    I'm going to test the plugin now - I hope you're on IRC (but you probably aren't)
  18. I'll get on irc

    reuploaded for Windows users, not a new version though

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


    You made me laugh, good. Sorry, just like I said it was my own stupidity. I said that I knew that Region Market was not a problem with your plugin. It still is not restarting my server. Have any idea why? It just shuts down like it did previously. Same error.
  20. so you changed your config to run.sh and changed the file to run.sh?
  21. Offline


    Is it possible to maybe give the specific time of day when it restarts?
  22. Offline


    Ok, I was just running a "run" file. I guess.. Lol
    I have it set to wait 30 seconds before starting back up. So it should start back up, right?
    It's still not working, btw. I have both the config and the file named to "run.sh". It shuts down, meaning it completly ends the process and then doesn't start back up after the 30 seconds :mad: I have this problem with AutoStop too :mad:
  23. you mean like restart at 1:53 PM every day? I could add that. hope its working for you ;)

    you did chmod 755 the file right?

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


    Sorry, I'm good at bukkit plugins, but I'm not good with Linux, not all of it. So I don't know what your talking about :'(
    Just to inform you:
    My friend, a wiz at anything computer, really anything. He set the server up, the Ubuntu and everything. Once he had that set up I set up all of the plugins, installed CraftBukkit. Because I'm good at that part.
  25. ok. do you have teamviewer?
    the only other suggestions i have are
    open an command prompt
    type cd <directory of server>
    replace <directory of server> with the path from your home folder to directory of server. if it was in a folder on the desktop called hi it would be
    cd ./Desktop/hi
    type chmod 755 restartNowMain.jar
    exit out of the command prompt
    also, you can try changing OS-Name to just Ubuntu, but idoubt that will fix it...
  26. Offline


    You don't understand, I do not run the server on my home computer. It's on a dedicated laptop over my counter.. Lol. So, I SSH into it using Putty.

    @aidan matzko
    I did what you said above to the best of my ability, but still no success :'( I looked up chmod and figured out what it was. I have TeamViewer.. Yes I do :eek:

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 16, 2016
  27. i mean do you have teamviewer on the server. even if not, is there any chance you could pm me with the info for me to connect to you and help out?
  28. Offline


    Yes that would be great, so I can have it restart everyday at a certain time rather then minutes.
  29. sure, i'll look into it. would it use the "server" time?
  30. Offline


    That would be nice yes, so it follows the time of the servers instead of having to manually set a time. What do you think? How hard would it be to do server time and adding the time in for lets say 12:00AM or PM? Or should we have more customization and have it set to a time format you have to enter? Like, for example http://forums.bukkit.org/threads/in...with-online-list-ip-lookup-and-much-more.252/

Share This Page