Jump to content
dizzymagoo

DayZ Server Auto Restart - Multiple Methods - **Version 3.3.1

Recommended Posts

Again and again starts the server console' date=' in what could be the problem?

[/quote']

it just keeps launching the server over and over. :(

Seems like a lot of people including myself are having this issue Dizzy

Any idea what could be causing it?

Share this post


Link to post
Share on other sites

A good app and all but not quite sure why people don't just use firedaemon...

I tried that and it didn't seem to work, it showed all of the processes as "Running" even though they were clearly shut down

Share this post


Link to post
Share on other sites

Some people don't want to pay more? Unless there is a free version of FireDaemon...

As much as that may be true' date=' Legacy, it seems that this server application is being forced on administrators such as myself (& Owl) and cm. (& Freeborne) who do know how to use FireDaemon, who [i']want to use FireDaemon, and who have already paid for FireDaemon.

I don't have a problem with an alternative to FireDaemon, because choice is good. I have a problem with a replacement for FireDaemon. Because choice is good.

A good app and all but not quite sure why people don't just use firedaemon...

I tried that and it didn't seem to work' date=' it showed all of the processes as "Running" even though they were clearly shut down

[/quote']

What you were most likely doing was attempting to run the batch files as the service. The batch files launch the server in Session 0 (the services session) so that adds another layer.

When you were shutting down the services, you were shutting down the batch file. The server the batch file launched, on the other hand, kept right on running.

Here's the right way to set up FireDaemon:

hFxSh.jpg

Share this post


Link to post
Share on other sites

I've been trying to get this to work for my server, but it doesn't seem to want to work. It won't load the config files correctly, my argument string is exactly the same as my startdayzserver.bat file, which starts it up perfectly. It launches the server as a standard 64 man arma server.

Share this post


Link to post
Share on other sites

Unfortunately production on this has been stopped until the DayZ staff decide to return my requests to have my server added to the whitelist. I have nothing to test it on... I appreciate the sticky though!


Also, for the people having issues with the .net. Try installing .NET Framework 4... I use to have it included in an installer but later decided that was a bad idea. I might revert back to it though. As mentioned above, production is stopped until further notice!

Share this post


Link to post
Share on other sites

Unfortunately production on this has been stopped until the DayZ staff decide to return my requests to have my server added to the whitelist. I have nothing to test it on... I appreciate the sticky though!


Also' date=' for the people having issues with the .net. Try installing .NET Framework 4... I use to have it included in an installer but later decided that was a bad idea. I might revert back to it though. As mentioned above, production is stopped until further notice!

[/quote']

Haha, great, the 'supported' server monitor's developer can't even get his server whitelisted. This sucks, we need some sort of monitor that doesn't cost 30 bucks, I can't baby sit my server all day, I have to work/sleep.

Edit: This is not a jab at Dizzymagoo, rather at the situation of not having a server monitor because the one that is supposed to be what we use, can't even be developed because he can't get access to test it. I greatly appreciate the work that he has already done, and hope that he can continue it, because I'd love to use his program, I just can't get it to load the correct settings file for some reason, even though the argument string is the same as the one in my batch file. If any other server admins have advice for that, let me know.

Share this post


Link to post
Share on other sites

Finally got on the whitelist! I'll try and get a new version out tomorrow!


I did just run a test of the current version on my server. It loaded everything up perfectly... Can you all please PM me screenshots of the following. Your processes list from the server, and the log file from the program. The log file should be located in the folder you're running the program from.

Share this post


Link to post
Share on other sites

So, the program seems to be working on Windows Server 2008 R2. I did notice one error though AFTER my inital setup of the program. I opened the program once, and configured everything. I clicked start, and nothing happened. I noticed "No Config Found!" in the log, so I figured I needed to restart it. I restarted the application and received the following error:

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.InvalidOperationException: No process is associated with this object.
at System.Diagnostics.Process.EnsureState(State state)
at System.Diagnostics.Process.EnsureState(State state)
at System.Diagnostics.Process.GetProcessHandle(Int32 access, Boolean throwIfExited)
at System.Diagnostics.Process.Kill()
at ArmaWatchDog.Form1.btn_stop_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.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.261 (RTMGDR.030319-2600)
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:/Users/Administrator/Desktop/dayzmodserverwatchdogv2/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.261 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.233 built by: RTMGDR
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.276 built by: RTMGDR
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 this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:





When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

I have my check time set to 60 seconds. The application still opens though, and after about 60 seconds will launch Hive, another 60 seconds will launch HiveAuth.exe, and then another 60 seconds it'll launch the server. Then every 60 seconds it'll keep launching the server, over and over again. I believe it's not finding the armaserver process.

Here is the process list.


Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Users\Administrator>tasklist

Image Name PID Session Name Session# Mem Usage
========================= ======== ================ =========== ============
System Idle Process 0 Services 0 24 K
System 4 Services 0 300 K
smss.exe 260 Services 0 1,216 K
csrss.exe 348 Services 0 4,364 K
csrss.exe 400 Console 1 3,928 K
wininit.exe 408 Services 0 4,784 K
winlogon.exe 436 Console 1 4,508 K
services.exe 496 Services 0 9,044 K
lsass.exe 504 Services 0 13,196 K
lsm.exe 512 Services 0 6,632 K
svchost.exe 608 Services 0 9,984 K
svchost.exe 696 Services 0 8,764 K
MsMpEng.exe 780 Services 0 68,420 K
LogonUI.exe 788 Console 1 14,740 K
svchost.exe 848 Services 0 27,672 K
svchost.exe 880 Services 0 68,032 K
svchost.exe 936 Services 0 11,904 K
svchost.exe 984 Services 0 16,360 K
svchost.exe 244 Services 0 17,660 K
svchost.exe 396 Services 0 11,352 K
spoolsv.exe 1092 Services 0 15,244 K
svchost.exe 1168 Services 0 2,896 K
TeamViewer_Service.exe 1200 Services 0 12,904 K
vmtoolsd.exe 1416 Services 0 14,736 K
svchost.exe 1668 Services 0 9,344 K
svchost.exe 1700 Services 0 5,552 K
dllhost.exe 2012 Services 0 11,456 K
msdtc.exe 1960 Services 0 8,060 K
csrss.exe 2420 RDP-Tcp#0 2 8,344 K
winlogon.exe 2448 RDP-Tcp#0 2 5,248 K
taskhost.exe 2664 RDP-Tcp#0 2 5,884 K
rdpclip.exe 2756 RDP-Tcp#0 2 8,364 K
dwm.exe 2816 RDP-Tcp#0 2 5,888 K
explorer.exe 2832 RDP-Tcp#0 2 59,188 K
TeamViewer.exe 2972 RDP-Tcp#0 2 25,488 K
VMwareTray.exe 2256 RDP-Tcp#0 2 5,684 K
vmtoolsd.exe 2244 RDP-Tcp#0 2 11,200 K
msseces.exe 1400 RDP-Tcp#0 2 13,448 K
svchost.exe 632 Services 0 5,984 K
mmc.exe 1920 RDP-Tcp#0 2 24,032 K
Steam.exe 1028 RDP-Tcp#0 2 31,928 K
sppsvc.exe 1464 Services 0 8,596 K
TrustedInstaller.exe 2340 Services 0 8,864 K
ARMA2OASERVER.exe 2336 RDP-Tcp#0 2 1,133,492 K
wuauclt.exe 2980 RDP-Tcp#0 2 6,192 K
mmc.exe 3324 RDP-Tcp#0 2 42,272 K
chrome.exe 2320 RDP-Tcp#0 2 41,832 K
chrome.exe 3800 RDP-Tcp#0 2 42,356 K
rundll32.exe 3552 RDP-Tcp#0 2 5,980 K
chrome.exe 3544 RDP-Tcp#0 2 28,920 K
ArmaWatchDog.exe 2540 RDP-Tcp#0 2 31,680 K
hive.exe 3092 RDP-Tcp#0 2 5,484 K
conhost.exe 3252 RDP-Tcp#0 2 3,576 K
hiveAuth.exe 336 RDP-Tcp#0 2 5,520 K
conhost.exe 288 RDP-Tcp#0 2 3,540 K
ARMA2OASERVER.exe 2112 RDP-Tcp#0 2 104,328 K
ARMA2OASERVER.exe 292 RDP-Tcp#0 2 104,436 K
svchost.exe 2952 Services 0 2,828 K
ARMA2OASERVER.exe 2824 RDP-Tcp#0 2 104,004 K
ARMA2OASERVER.exe 3964 RDP-Tcp#0 2 31,280 K
cmd.exe 3844 RDP-Tcp#0 2 2,912 K
conhost.exe 2968 RDP-Tcp#0 2 3,568 K
tasklist.exe 2888 RDP-Tcp#0 2 5,848 K
WmiPrvSE.exe 1888 Services 0 6,512 K

C:\Users\Administrator>

Share this post


Link to post
Share on other sites

It appears that it is case sensitive! Booyah! Thank you so much for this information! I'll roll out a new patch!


I'm actually revamping it into a much more basic design. At this point im trying to over complicate things :/

Share this post


Link to post
Share on other sites

Why not just remove goddamn Net4 requirement?

Simpple batching for windows. Im rusty a bit but here you go. Tried it works for me.

::================================================================================::
:: Server Watch Script ::
:: MaSSive ::
:: ::
:: http://dayz.sexyuclan.net ::
:: ::
::================================================================================::

::=================================================================================::
:: Note: This will not auto-restart if an (unlikely) windows ::
:: error appears. ::
::=================================================================================::

::=================================================================================::
:: SET YOUR VARIABLES! ::
::=================================================================================::

::==================================================================================::
:: Window and Log name ::
:: Replace "My Server" ::
::==================================================================================::

set servername=My Server

::==================================================================================::
:: Complete path to ::
:: server directory ::
::==================================================================================::

set path="D:\Program Files\Bohemia Interactive\ARMA2"

::==================================================================================::
:: Your logs directory ::
:: This will auto-create ::
::==================================================================================::

set logs=dayzlogs

::==================================================================================::
:: End of variables ::
:: ::
:: ::
:: ::
:: !! DO NOT CHANGE LINES BELOW UNLESS YOU KNOW WHAT YOURE DOING !! ::
::==================================================================================::


:: This will keep the window clean and easy to read
@echo off

set name=-Server Watch Script-

:: Sets the title of the window
title %name% %servername%

:: Clears the window incase there is anything there
cls

:: Checks to see if the log directory exists, if not it creates it
IF NOT EXIST %path%\%logs% (
echo Directory %logs% does not exist, creating directory.
md %path%\%logs%
)

:: Grabs and sets current date value
For /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set dateval=%%a-%%b-%%c)

:: Prints to the window what we are doing
echo %name% has been started!
echo.
echo *************************************************************************
echo To stop server, close this window and then close the server window
echo *************************************************************************
echo.
echo.
echo %servername% is now starting...
>> "%path%\%logs%\%servername%-%dateval%.log" echo.
>> "%path%\%logs%\%servername%-%dateval%.log" echo.
>> "%path%\%logs%\%servername%-%dateval%.log" echo (%date%)(%time%) %name% has been started!
>> "%path%\%logs%\%servername%-%dateval%.log" echo (%date%)(%time%) %servername% is now starting...

:: This is a return point in case the server crashes or is closed
:restart

echo.
echo (%date%)(%time%) %servername% is now ONLINE
echo Watching %servername% for crashes...
>> "%path%\%logs%\%servername%-%dateval%.log" echo.
>> "%path%\%logs%\%servername%-%dateval%.log" echo (%date%)(%time%) %servername% is now ONLINE
>> "%path%\%logs%\%servername%-%dateval%.log" echo (%date%)(%time%) Watching %servername% for crashes...

::Start the actual server
cd %path%
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=7

echo.
echo (%date%)(%time%) Crash or Close detected!
echo %servername% is now restarting...
>> "%path%\%logs%\%servername%-%dateval%.log" echo.
>> "%path%\%logs%\%servername%-%dateval%.log" echo (%date%)(%time%) Crash or Close detected!
>> "%path%\%logs%\%servername%-%dateval%.log" echo (%date%)(%time%) %servername% is now restarting...

::Server crashed or closed, so we point it to the return point to start the server again
goto restart

Copy and paste that to notepad and make sure you adjust it to your setup. Pretty much self explaining. Save file as Whateveryouwannacallit.bat and run as admin.

Share this post


Link to post
Share on other sites

My ao server keeps crashing maybe once or twice dailey with a windows exception error. Would be great if we can figure out a way to restart on that also.

Here is the crash I keep having:


Problem signature:
Problem Event Name: APPCRASH
Application Name: arma2oaserver.exe
Application Version: 1.60.87.548
Application Timestamp: 4ef1cd28
Fault Module Name: arma2oaserver.exe
Fault Module Version: 1.60.87.548
Fault Module Timestamp: 4ef1cd28
Exception Code: c0000005
Exception Offset: 00081296
OS Version: 6.1.7601.2.1.0.274.10
Locale ID: 1033
Additional Information 1: 0a9e
Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
Additional Information 3: 0a9e
Additional Information 4: 0a9e372d3b4ad19135b953a78882e789

Read our privacy statement online:
http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409

If the online privacy statement is not available, please read our privacy statement offline:
C:\Windows\system32\en-US\erofflps.txt

Share this post


Link to post
Share on other sites

As for the batch script... okay now make it restart the hive on crash... Your script is WAY over complicated. I posted a much more simple version of that batch script in the OP.

As for the crashing with windows exception error. I can look into that. I should be rolling out a MUCH more universal version in the next few hours.

Share this post


Link to post
Share on other sites

As for the batch script... okay now make it restart the hive on crash... Your script is WAY over complicated. I posted a much more simple version of that batch script in the OP.

As for the crashing with windows exception error. I can look into that. I should be rolling out a MUCH more universal version in the next few hours.

Lemme know if you need a tester. The monitor that the DayZ staff is working on has a bug in it that they're having issues fixing, so I've just been running the server without a monitor and restarting it manually when it crashes. Your monitor so far does everything we need, including the hive restart which is very useful.

Share this post


Link to post
Share on other sites

I have a new version finished. Just need to test it once my new IP is whitelisted(Again). Then should be able to test it and get it rolled out. And you can minimize in the new version. I started over on the new version.

Share this post


Link to post
Share on other sites

As for hive restart that can be done too but it makes batch script complicated. This what I did now is not even close to complicated as it can be. For now its just starting starting OA server, monitors for crashes and starts it again if close or crash occurs. Also it creates logs folder where its dumping log files with dates and times of restarts.

Problem is that batch script cant close dialogs so if it crashes with popup dialog it wont continue. I suggest you find a free alternative for that, but by far best application for that is Firedaemon GA PRO. Ive been using it for my gameservers in days when I ran on Windows and with proper configuration it works flawlessly and has web interface > Fusion < which can be controlled over web by anyone that has login info.

FI/EU servers use it at the moment so ask Soppa (http://sisu.kompassi.com/) for opinion on it. You can try it for free 30 days.

Share this post


Link to post
Share on other sites
MaSSive' pid='51753' dateline='1337739660']

As for hive restart that can be done too but it makes batch script complicated. This what I did now is not even close to complicated as it can be. For now its just starting starting OA server' date=' monitors for crashes and starts it again if close or crash occurs. Also it creates logs folder where its dumping log files with dates and times of restarts.

Problem is that batch script cant close dialogs so if it crashes with popup dialog it wont continue. I suggest you find a free alternative for that, but by far best application for that is Firedaemon GA PRO. Ive been using it for my gameservers in days when I ran on Windows and with proper configuration it works flawlessly and has web interface > Fusion < which can be controlled over web by anyone that has login info.

FI/EU servers use it at the moment so ask Soppa (http://sisu.kompassi.com/) for opinion on it. You can try it for free 30 days.

[/quote']

If you open regedit, go to HKEY_CURRENT_USER\Software\Microsoft\Windows\Windows Error Reporting, and set DontShowUI to 1, it should stop those crash dialogues from appearing, allowing the script to work properly.

Not a real solution if you actually want those dialogues for other purposes, but it's there if you want it.

Share this post


Link to post
Share on other sites

does the application also work if the server process runs, but an error message appear, like "out of memory" ? ^^

Share this post


Link to post
Share on other sites

Im working on getting a solution worked into the program to work with error messages and non-exe-ending crashes. Once I find a solution to this I will release it. My "beta" tester confirmed that everything seems to working smoothly thus far with the new version.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

×