AutoRestart documentation page
If your server is managed by Multicraft control panel , restart won't occur.
Note: by default AutoRestart is disabled.
Note: When server is restarting the old server instance is not yet closed so you should have maxservermem*2 memory available in the system to restart properly. (You may want to increase your swap size on linux)
AutoRestart will automatically restart your server at a defined time.
Command
/asw restart (performs a restart manually)
Permission: autosaveworld.restart
Config values: (config.yml)
enabled: false #enable or disable AutoRestart broadcast: true #broadcast message about server is restarting time: []#List of times of day at which server will AutoRestart in format HH:MM example at the end of a page countdown: enabled: true #enable countdow before AutoRestart(will write messages about restart is soon in chat) broadcastonsecond: #list of seconds before restart to broadcast about server restarting soon. - 60 - 30 - 10 - 9 - 8 - 7 - 6 - 5 - 4 - 3 - 2 - 1 commands: [] #list of commands to execute before the restart will occur scriptpath: start.sh #path to your server startup script, even if AutoSaveWorld won't find, it it will still try to restart server. juststop: false #if true AutoRestart will just stop server instead of restart(useful for infinite loop script)
restarttime expample
time: - '03:20' - '16:24' - '20:03'
@Shevchikden
After the restart-process I get just "Can't reach server" inside the client.
Before I started the minecraft-server I had 1845 MB of free RAM. While it was running it was 772 MB. After the restart process it was 1844 MB, so nothing seemed to be used by Java again.
I am missing the line "[INFO] [AutoSaveWorld] Startup script found. Restarting" now too, but inside the config file I pointed to the startscript.
<pre>scriptpath: /home/minecraft/start.sh</pre>
And when I type "/home/minecraft/start.sh" inside the shell, it starts properly. The file is chmodded "755".
@chatjack
Than i can't help, i'm trying to find our why it is not restarting.
What your java -version?
@Shevchikden
The Java-Version is:
When I tried to run "java -version" i got the following error:
Only after shutting down the Minecraft-Server it worked. Could there be an relation to the problem?
EDIT:
Updated to the following JAVA-Version now:
I am getting the message "Startup script found. Restarting" in the server.log again. But the server still says "can't reach server". :(
@chatjack In past i got problems with OpenJDK, but this time it is not the reason.
Does script marked as executable?
Also try to set path to something that doesn't exist and try again.
@Shevchikden
After some problems with the RAM on my vServer we decided to rent some slots on a commercial gameserver now. That solved the problem for us, because they use there own system to restart the server. ;)
Anyway, many thanks for your help.
Greetings, Dennis
hello I just ran /asw regenworld wild and its been almost 3 hrs how long should it take im kinda worried that it froze or something my wild is pretty large 15k world boarder about 100+ factions.
@Shevchikden
I can't seem to use the restart command manually or automatically. The server starts to restart and when its shutting down it just stops. Using 64 bit java 1.7.0_45-b18 latest version of FTB Unleashed with Bukkitforge 1.5.2-301. Any ideas? Also, using hamachi, hosting locally
What I've tried for the path:
scriptpath: 'C:\Users\protoKol\Desktop\FTB Unleashed\ServerStart.bat' 'C:\Users\protoKol\Desktop\FTB Unleashed ServerStart.bat' 'serverstart.bat'
Bat file looks like java -Xms4096M -Xmx4096M -XX:PermSize=128m -jar ftbserver.jar nogui
Console says 2014-01-03 14:26:02 [INFO] [STDERR] java.net.SocketException: socket closed 2014-01-03 14:26:02 [INFO] [STDERR] at java.net.DualStackPlainSocketImpl.acc ept0(Native Method) 2014-01-03 14:26:02 [INFO] [STDERR] at java.net.DualStackPlainSocketImpl.soc ketAccept(Unknown Source) 2014-01-03 14:26:02 [INFO] [STDERR] at java.net.AbstractPlainSocketImpl.acce pt(Unknown Source) 2014-01-03 14:26:02 [INFO] [STDERR] at java.net.PlainSocketImpl.accept(Unkno wn Source) 2014-01-03 14:26:02 [INFO] [STDERR] at java.net.ServerSocket.implAccept(Unkn own Source) 2014-01-03 14:26:02 [INFO] [STDERR] at java.net.ServerSocket.accept(Unknown Source) 2014-01-03 14:26:02 [INFO] [STDERR] at net.minecraft.server.ServerListenThre ad.run(ServerListenThread.java:80) 2014-01-03 14:26:02 [INFO] [Minecraft-Server] Closing listening thread
The solution is simple !! Multicraft users WILL be able to use the autorestart feature because one can create custom commands in multicraft. I created a command that restarts multicraft when I type /restartserver (this can be any command-name you define) ! So the solution is to offer 2 extra lines in the autosaveworld config file: Line one: Run Command: true/false and line 2:Command to restart: '/restartserver' (or whatever you defined as your custom command in multicraft to look for for a restart !! Now you can save the entire world and make your awesome plugin do all sorts of things for the millions who use multicraft !! I really hope you implement this !! (this will also work for backups, btw if you create a command in multicraft that will run a backup) I would also like to hear a thunderclap when the server restarts, so maybe just for fun, you could add an option to play a sound on restart ??? PLEASE IMPLEMENT this simple addition. It doesn't look like it would take more than 15 minutes to add to the plugin and it will help a ton of ppl and make your plugin even more popular !!
@151baccardi
Just because it is possible does not mean it is a good idea. Multicraft will most likely see that as a crash and try to recover it leading to all kinds of issues. Multicraft has its own crash recovery, why try to use an plugin to add something it already has?
I seriously can't find a way to understand what:
_scriptpath: start.sh #path to your server startup script, even if AutoSaveWorld won't find, it it will still try to restart server.
_...is. :( Where can i get the startup script?
@williamdh_98
It would be the .bat or .sh script you run to start the server.
@Hockeymikey
Thank you, it works. Sort of, just stops the server.
But it doesn't seem to "restart" after shutting down all of the plugins and stuff. Yes. i have set the time and enabled it.
(Btw it unloads the plugin AutoSaveWorld after autosaving the worlds, before "the plugin" unloads).
Help? Won't start after "restarting".
@Shevchikden
So is there any way we can re-attach the process to console after a restart, or any way to get attached to the process manually so we can get control over the server via console again? It's not a huge deal, but sometimes it's preferrable to execute some checks and commands via console than logging in with an admin (even vanished)...it's just faster.
Kind regards.
@TeamCraftMC Use screen on linux.
I have the same issue as TeamCraftMC. Using Win7pro. When the server restarts there is no console. Seems odd the plugin would have a scriptpath option yet use a direct java call to start the server. Not having a console up is very inconvenient since I do most of my admin operations from there.
Auto-Restart won't start my server back up. :\
@Shevchikden:
@Elithelion
Is there a known fix for this yet?
Having a console is rather useful as a chat log (among other things) for when I've been offline, or for when I'm online and need to issue commands via console (or talk as 'Server').
I'm a bit confused on how to make this work. I use MineOS Turnkey and I start my server with "mineos_console.py -s minecraft" but I put the directory path to it in the config, nothing happens. It stops ok, but it never starts again.
Edit: Nevermind, I believe my solution is to create a restart.sh file with this instead.
@McyD1
You have no idea what I am talking about. Multicraft allows you to create a command that you can use ingame to restart the server. Multicraft does not have a nice announcement system like this plugin does. In multicraft, you would need to schedule a task that says server restarting - but they took out the adminsay so that doesn't even work anymore. If this plugin had a line where you can run a command instead of a script then I could send the /restart command to multicraft and the server would do a restart... and come back on. And it would do it with that nice countdown that I wanna give my players. So, if there was an option for multicraft users to run a command - instead of a script, I could use the command I defined to restart the server... and millions of other server owners who are stuck with multicraft. There are many people who do not have access to start.sh or a bat file... We do however have the ability to restart via a command and it would be nice to be able to have the option of running your restart command rather than just be limited to a startup script you may not have access to if you are on multicraft, etc.
and multicraft allows you to make a command... and the restart DOES occur when you run the command. I could tell multicraft to restart when it sees the command /stinkyfeet
Why not add the ability to run a command ?
you have scriptpath: start.sh
Why not also have restartcommand: /stinkyfeet
???