dizzymagoo 19 Posted May 16, 2012 Hey all!I run the Denver 1 US Server and I have a couple different methods here you can use to auto restart your server!Method 1 - Using Batch ScriptYou can use the following batch file to just restart the server when it crashes/exits.@echo offclsecho Protecting ArmA II from crashes...title ArmA II Server Watcher:armaecho (%time%)ArmA II started.start /wait arma2oaserver.exe -mod=EXPANSION;ca;@dayz;@CBA;@JayArma2Lib -name=cfgdayz -config=cfgdayz\server.cfg -cfg=cfgdayz\arma2.cfg -profiles=cfgdayz -world=Chernarus -cpuCount=4 -exThreads=7echo (%time%) ATTENTION: ArmA closed or crashed, restarting.goto armaMethod 2 - In Development ApplicationI made this small application for watching my server and restarting it when/if it crashes! I also added a feature to restart the hive every x minutes. Keep in mind its still in the works!![Version 1.0]-Released[Version 2.0]-Fixed issues with my bad math skills-Fixed issues where it might launch the server over and over-Added a scary skin-Added ability to restart server every x hours-Added ability to use launch parameters-Added ability to save settings-Added logging to text file-Changed hive auto restart to hrs instead of minutes[Version 3.2]-Started over on the entire application. Made it much more universal-Changed Everything[Version 3.3]-Did a lot of code cleaning. Things run much smoother now.-Some UI tweaks. No need for colors, just useless code.-It now checks to see if the server is responding. If not, kills it.-It logs EVERYTHING now.-Now added check for BEC.[Quick Fix 3.3.1]-Fixed issues where the config file might save a number for the counters that was invalid. It also now displays the correct values in the settings menu instead of milliseconds.Notes: Your settings config and log file will be saved to the directory that you run the application from. You can run multiple instances of the application but you might have issues saving different settings for different servers.The parameters are the ones of your usual start up batch file!Example of Parameters: -mod=EXPANSION;ca;@dayz;@CBA;@JayArma2Lib -name=cfgdayz -config=cfgdayz\server.cfg -cfg=cfgdayz\arma2.cfg -profiles=cfgdayz -world=Chernarus -cpuCount=4 -exThreads=7Tested Operating Systems:Windows Server 2003Windows Server 2008 R2Windows 7http://www.theprogamers.com/stuff/ServerMonitor.exeRegards,Dizzymagoo 2 Share this post Link to post Share on other sites
DJKhaled 3 Posted May 16, 2012 Thanks for the app!What does Hive Auto Restart do? Share this post Link to post Share on other sites
franklin 3 Posted May 16, 2012 #1 question; I was told if the hive needed a restart, to close the game servers, restart the HiveAuth, then the Hive, then restart the servers....Is it fine to just restart the hive? Share this post Link to post Share on other sites
Vipeax 318 Posted May 16, 2012 Generally speaking that's not a great thing to do, no. Restarting a server doesn't matter and you can leave the Hive running, when it comes to the other way around, it's a lot better to restart the server(s) too. Share this post Link to post Share on other sites
franklin 3 Posted May 16, 2012 If I'm correct and we are supposed to close down the servers, then the hive/hiveauth/monitor... then it would be best to utilize a program like this to auto exec the stop.bat file, and the monitor.bat file on the server at set time intervals. Share this post Link to post Share on other sites
soppa 39 Posted May 16, 2012 We are using firedaemon on EU6-14 + FI1-3http://www.firedaemon.com///Soppa Share this post Link to post Share on other sites
Legacy (DayZ) 1091 Posted May 16, 2012 This needs more attention. Share this post Link to post Share on other sites
Difecti 11 Posted May 16, 2012 I restart my server regularly (6-8 hours) to make sure everything is running smoothly. Having a few issues due to the "Monitor" Software the dev's have put on there at the moment though, but once thats fixed, normal service will resume. 2 weeks without issue then this happens lol. Share this post Link to post Share on other sites
dizzymagoo 19 Posted May 16, 2012 I have been restarting the hive without shutting down the server. I haven't seen any obvious issues with it... yet. If you all would prefer that I change it to just auto restart the server and hive every x hours I can do that as well! I'm very open to suggestions! Regards,Dizzymagoo Share this post Link to post Share on other sites
DJKhaled 3 Posted May 16, 2012 Dizzy, when I use your application it just keeps opening the server multiple times every 30 secondsI'm using it on Windows 2003 32 bit Share this post Link to post Share on other sites
dizzymagoo 19 Posted May 16, 2012 When you say its opening the server. Is it opening hive.exe? hiveAuth.exe? arma2oaserver.exe? Or all three? Thanks for the input! Im getting ready to release a new version, been working on it for hours. Hopefully I can get this issue resolved quickly. EDIT: I just ran it on my 32-Bit Server 2003 box and got this... Seems to work fine? Can you post a screenshot of what its doing please?Regards,Dizzymagoo Share this post Link to post Share on other sites
DJKhaled 3 Posted May 16, 2012 I'll take a screenshot later, my servers are running and I don't want to take them down right nowIt gave me those same messages except that it kept opening the DayZ Server 1.bat file over and over again and launching multiples of the same server. Hive and HiveAuth were fine Share this post Link to post Share on other sites
dizzymagoo 19 Posted May 16, 2012 Okay, I found my mistake in the coding that probably caused this issue. Thank you for bringing it to my attention! I award you with one cookie :P Regards,Dizzymagoo Share this post Link to post Share on other sites
DJKhaled 3 Posted May 16, 2012 I'll check out the new version once you release it and see if that fixed itWould it be possible to use this application for 2 servers? (I have 2 server files running) Share this post Link to post Share on other sites
dizzymagoo 19 Posted May 16, 2012 You can run two instances of the watch dog(I would recommend this). However you can't run the watch dogs both from the same directory with the new feature im adding. It would cause mass conflict. With other features that im adding, it also eliminates your start up batch files. It will launch the executable directly with the parameters you add.Regards,Dizzymagoo Share this post Link to post Share on other sites
dizzymagoo 19 Posted May 16, 2012 Bump, version 2 in first post. Share this post Link to post Share on other sites
DJKhaled 3 Posted May 17, 2012 Dizzy,I tried the new version and it still keeps opening multiple servers during the "server check"Here's a screenshot just as it opened a 2nd one:Working directory: C:\Program Files (x86)\Steam\steamapps\common\arma 2 operation arrowheadParamaters: -mod=EXPANSION;ca;@dayz;@CBA;@JayArma2Lib -name=cfgdayz -config=cfgdayz\server.cfg -cfg=cfgdayz\arma2.cfg -profiles=cfgdayz -world=Chernarus -cpuCount=4 -exThreads=7 Share this post Link to post Share on other sites
dizzymagoo 19 Posted May 17, 2012 DJKhaled,It appears that you ran your start up batch script. There is no need for the batch script. Regards,Dizzymagoo Share this post Link to post Share on other sites
DJKhaled 3 Posted May 17, 2012 Dizzy,I started from arma2oaserver.exe and it's still doing it. It just endlessly opens up new servers, it seems that it's not detecting that arma2oaserver.exe is currently running Share this post Link to post Share on other sites
therazer 0 Posted May 18, 2012 Few questions.1) Where must be located hive and hiveauth? It is located now in\hive\2) I get NET.framework error. What version i need to install?See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box.************** Exception Text **************System.ArgumentOutOfRangeException: Length cannot be less than zero.Parameter name: length at System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy) at System.String.Substring(Int32 startIndex, Int32 length) at ArmaWatchDog.Form1.Form1_Load(Object sender, EventArgs e) at System.EventHandler.Invoke(Object sender, EventArgs e) at System.Windows.Forms.Form.OnLoad(EventArgs e) at System.Windows.Forms.Form.OnCreateControl() at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible) at System.Windows.Forms.Control.CreateControl() at System.Windows.Forms.Control.WmShowWindow(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ScrollableControl.WndProc(Message& m) at System.Windows.Forms.Form.WmShowWindow(Message& m) at System.Windows.Forms.Form.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)************** Loaded Assemblies **************mscorlib Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.239 (RTMGDR.030319-2300) CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll----------------------------------------ArmaWatchDog Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0 CodeBase: file:///C:/Documents%20and%20Settings/dayzteam/Desktop/DAYZWATHCDOG/ArmaWatchDog.exe----------------------------------------Microsoft.VisualBasic Assembly Version: 10.0.0.0 Win32 Version: 10.0.30319.1 built by: RTMRel CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll----------------------------------------System Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.258 built by: RTMGDR CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll----------------------------------------System.Core Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.1 built by: RTMRel CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll----------------------------------------System.Windows.Forms Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.235 built by: RTMGDR CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll----------------------------------------System.Drawing Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.1 built by: RTMRel CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll----------------------------------------System.Runtime.Remoting Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.1 (RTMRel.030319-0100) CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Remoting/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll----------------------------------------************** JIT Debugging **************To enable just-in-time (JIT) debugging, the .config file for thisapplication or computer (machine.config) must have thejitDebugging value set in the system.windows.forms section.The application must also be compiled with debuggingenabled.For example:When JIT debugging is enabled, any unhandled exceptionwill be sent to the JIT debugger registered on the computerrather than be handled by this dialog box. Share this post Link to post Share on other sites
OmarFW 0 Posted May 18, 2012 Thank you so much for making this and releasing it publicly. You're saving many admins a lot of headache. Share this post Link to post Share on other sites
karlnp 0 Posted May 18, 2012 I'm getting the same .NET error. Share this post Link to post Share on other sites
SnaKe (DayZ) 0 Posted May 19, 2012 Again and again starts the server console, in what could be the problem? Share this post Link to post Share on other sites
c.chris.perry@gmail.com 17 Posted May 19, 2012 I can't get it to launch correctly... I 'm using the same launch parameters that the serverlaunch batch file uses, and that one works fine. Also, the background seems to cause it to load really slow and might be whats causing the issue, because I get the .net error as well. Share this post Link to post Share on other sites
anthony_henson2003@yahoo.com 33 Posted May 19, 2012 it just keeps launching the server over and over. :( Share this post Link to post Share on other sites