[Solution] Auto Reboot on crash

  • Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/
  • Weve updated the Tripwire Privacy Notice under our Policies to be clearer about our use of customer information to come in line with the EU General Data Protection Regulation (GDPR) rules that come into force today (25th May 2018). The following are highlights of our changes:


    We've incorporated the relevant concepts from the GDPR including joining the EU and Swiss Privacy Shield framework. We've added explanations for why and how Tripwire processes customer data and the types of data that we process, as well as information about your data protection rights.



    For more information about our privacy practices, please review the new Privacy Policy found here: https://tripwireinteractive.com/#/privacy-notice

ButchCassidy

Moderator
Feb 17, 2006
3,727
277
0
The Hole in the Wall
www.twbclan.com
For those who don't have this here is the TWB auto-reboot on crash batch file code.

TWI use the same code to allow your server to auto reboot on a crash detection.
Replace our server name and IP (and anything else you want to replace) with your own details in a .txt file then change that file to a .bat file.

Place this .bat file in your RO2 server root folder and make a shortcut and place it on your servers desktop.
Doouble click the .bat to start your server and away you go.

::=======================::
:: Server Guardian ::
::=======================::
::=======================::
:: SET YOUR VARIABLES! ::
::=======================::
::=======================::
:: Window and Log name ::
:: Replace "My Server" ::
::=======================::
set servername=Your Servers Name
::=======================::
:: Your start command ::
:: Replace after = ::
::=======================::
set runcmd=C:\your-server-folder\Binaries\win32\ROGame TE-MamayevKurgan?EnableWebAdmin=True?WebAdminPort=8585?minplayers=16?maxplayers=64 -seekfreeloadingserver -noinnerexception -multihome=109.70.149.99 -port=7777 -log=yourlog.log -PREFERPROCESSOR=0 -unattended
::=======================::
:: End of variables ::
::=======================::
:: This will keep the window clean and easy to read
@echo off
:: Sets the title of the window
title Server Guardian %servername%
:: Clears the window incase there is anything there
cls
:: Prints to the window what we are doing
echo Server Guardian has been started!
echo.
echo *************************************************************************
echo To close the server, close this window and type exit in the server window
echo *************************************************************************
echo.
echo.
echo %servername% is now starting...
>> "%servername%.log" echo.
>> "%servername%.log" echo.
>> "%servername%.log" echo (%date%)(%time%) Server Guardian has been started!
>> "%servername%.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...
>> "%servername%.log" echo.
>> "%servername%.log" echo (%date%)(%time%) %servername% is now ONLINE
>> "%servername%.log" echo (%date%)(%time%) Watching %servername% for crashes...
::Start the actual server
start /wait %runcmd%
echo.
echo (%date%)(%time%) Crash or Close detected!
echo %servername% is now restarting...
>> "%servername%.log" echo.
>> "%servername%.log" echo (%date%)(%time%) Crash or Close detected!
>> "%servername%.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
 

omniconsumer

Active member
Jul 5, 2011
432
32
28
New York City
discord.gg
Thank you.

So to clarify, the code would be (for my case):

set runcmd=C:\ro2server\Binaries\win32\ROGame TE-MamayevKurgan?EnableWebAdmin=True?WebAdminPort=8080?minplayers=32?-seekfreeloadingserver -noinnerexception -log=yourlog.log -PREFERPROCESSOR=0 -unattended

I left out some stuff like multihome and port, because it doesn't seem necessary to run our server. Does this seem correct?
Do I need to add the following text underneath this and save it to the new batch file?


::=======================::
:: End of variables ::
::=======================::
:: This will keep the window clean and easy to read
@echo off
:: Sets the title of the window
title Server Guardian %LMCserver%
:: Clears the window incase there is anything there
cls
:: Prints to the window what we are doing
echo Server Guardian has been started!
echo.
echo ************************************************** ***********************
echo To close the server, close this window and type exit in the server window
echo ************************************************** ***********************
echo.
echo.
echo %servername% is now starting...
>> "%servername%.log" echo.
>> "%servername%.log" echo.
>> "%servername%.log" echo (%date%)(%time%) Server Guardian has been started!
>> "%servername%.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...
>> "%servername%.log" echo.
>> "%servername%.log" echo (%date%)(%time%) %servername% is now ONLINE
>> "%servername%.log" echo (%date%)(%time%) Watching %servername% for crashes...
::Start the actual server
start /wait %runcmd%
echo.
echo (%date%)(%time%) Crash or Close detected!
echo %servername% is now restarting...
>> "%servername%.log" echo.
>> "%servername%.log" echo (%date%)(%time%) Crash or Close detected!
>> "%servername%.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
 
Last edited:

omniconsumer

Active member
Jul 5, 2011
432
32
28
New York City
discord.gg
Ok, it would work fine, except that the dialog box specifically for RO comes up telling me it crashed where I have to press enter. Not the one for windows, the one for ro2.

How do I disable this?

EDIT: I deleted the crashreport1300.exe file, but is this going to help I wonder? need help bad with this because server just keeps crashing without restarting because of the crash dialog box.
 
Last edited:

ButchCassidy

Moderator
Feb 17, 2006
3,727
277
0
The Hole in the Wall
www.twbclan.com
Ok this sounds like you have windows error reporting enabled..

There is a reg fix for this..

Create a .txt file and place the following inside..

Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Windows\Windows Error Reporting]
"ConfigureArchive"=dword:00000001
"DisableArchive"=dword:00000000
"Disabled"=dword:00000001
"DisableQueue"=dword:00000000
"DontSendAdditionalData"=dword:00000000
"DontShowUI"=dword:00000001
"ForceQueue"=dword:00000000
"LoggingDisabled"=dword:00000000
"MaxArchiveCount"=dword:000001f4
"MaxQueueCount"=dword:00000032
"LastQueuePesterTime"=hex(b):5b,46,83,21,95,5b,cc,01
"LastResponsePesterTime"=hex(b):32,78,e6,a4,96,5b,cc,01
[HKEY_CURRENT_USER\Software\Microsoft\Windows\Windows Error Reporting\ExcludedApplications]
[HKEY_CURRENT_USER\Software\Microsoft\Windows\Windows Error Reporting\Hangs]
[HKEY_CURRENT_USER\Software\Microsoft\Windows\Windows Error Reporting\Throttling]
[HKEY_CURRENT_USER\Software\Microsoft\Windows\Windows Error Reporting\Throttling\PCA2]
"LastTime"=hex(b):83,a5,ce,38,a4,62,cc,01
"Duration"=dword:12cc0300

Save the file and rename to Turn off process error ui.reg - now place on your server desktop double click this will disable the box you see appear when your RO2.exe server crashes.
Allowing your auto boot .bat to work correctly..

*********************************************************************************

If you wish to reverse this and enable windows error reporting than again place this inside a .txt file

Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Windows\Windows Error Reporting]
"ConfigureArchive"=dword:00000001
"DisableArchive"=dword:00000000
"Disabled"=dword:00000001
"DisableQueue"=dword:00000000
"DontSendAdditionalData"=dword:00000000
"DontShowUI"=dword:00000000
"ForceQueue"=dword:00000000
"LoggingDisabled"=dword:00000000
"MaxArchiveCount"=dword:000001f4
"MaxQueueCount"=dword:00000032
"LastQueuePesterTime"=hex(b):5b,46,83,21,95,5b,cc,01
"LastResponsePesterTime"=hex(b):32,78,e6,a4,96,5b,cc,01
[HKEY_CURRENT_USER\Software\Microsoft\Windows\Windows Error Reporting\ExcludedApplications]
[HKEY_CURRENT_USER\Software\Microsoft\Windows\Windows Error Reporting\Hangs]
[HKEY_CURRENT_USER\Software\Microsoft\Windows\Windows Error Reporting\Throttling]
[HKEY_CURRENT_USER\Software\Microsoft\Windows\Windows Error Reporting\Throttling\PCA2]
"LastTime"=hex(b):83,a5,ce,38,a4,62,cc,01
"Duration"=dword:12cc0300

Save the file and rename to Turn on process error ui.reg - now place on your server desktop double click this will enable the box you see appear when your RO2.exe server crashes.

Hope this helps..;)
 
Last edited:

omniconsumer

Active member
Jul 5, 2011
432
32
28
New York City
discord.gg
Thanks Butch. I did that, but it may not be the windows error reporting. I think its the one just for RO2, Am I mistaken? I took a screenshot of the box.

Do I have to restart the box in order for the registry changes to take effect? I justs did that after another crash. I hope it takes.

 
Last edited:

omniconsumer

Active member
Jul 5, 2011
432
32
28
New York City
discord.gg
Hey, thanks a lot for your help butch. I REALLY appreciate it.

However, that dialog box still came up on a crash! Aaaaaargh! :( I don't know anymore. I guess I can try and run the server as a service, but will have to wait for another crash to do that.

How are your servers faring with these crashes?

The free weekend was great, but its these next two weeks will be crucial for servers to establish themselves as reliable and consistent.

I also just went into services.msc and had to disable it. It was set to manual. Maybe this will help.


ALSO, I just noticed this.

Ok this sounds like you have windows error reporting enabled..

[HKEY_CURRENT_USER\Software\Microsoft\Windows\Windo ws Error Reporting\ExcludedApplications]
[HKEY_CURRENT_USER\Software\Microsoft\Windows\Windo ws Error Reporting\Hangs]
[HKEY_CURRENT_USER\Software\Microsoft\Windows\Windo ws Error Reporting\Throttling]
[HKEY_CURRENT_USER\Software\Microsoft\Windows\Windo ws Error Reporting\Throttling\PCA2]
"LastTime"=hex(b):83,a5,ce,38,a4,62,cc,01
"Duration"=dword:12cc0300

Is there supposed to be a space there in the windo ws? In the registry it created these new keys instead of changing the values of the ones there. I think this may have been a mistake?
 
Last edited:

Kinsman

FNG / Fresh Meat
Jul 2, 2011
127
4
0
Australia
yes delete those erroneous keys, remove FIVE spaces from the reg file including the topline and save again,

[HKEY_CURRENT_USER\Software\Microsoft\Windows\Windo ws Error Reporting]
[HKEY_CURRENT_USER\Software\Microsoft\Windows\Windo ws Error Reporting\ExcludedApplications]
[HKEY_CURRENT_USER\Software\Microsoft\Windows\Windo ws Error Reporting\Hangs]
[HKEY_CURRENT_USER\Software\Microsoft\Windows\Windo ws Error Reporting\Throttling]
[HKEY_CURRENT_USER\Software\Microsoft\Windows\Windo ws Error Reporting\Throttling\PCA2]

then run it again and reboot.
 

omniconsumer

Active member
Jul 5, 2011
432
32
28
New York City
discord.gg
yes delete those erroneous keys, remove FIVE spaces from the reg file including the topline and save again,

[HKEY_CURRENT_USER\Software\Microsoft\Windows\Windo ws Error Reporting]
[HKEY_CURRENT_USER\Software\Microsoft\Windows\Windo ws Error Reporting\ExcludedApplications]
[HKEY_CURRENT_USER\Software\Microsoft\Windows\Windo ws Error Reporting\Hangs]
[HKEY_CURRENT_USER\Software\Microsoft\Windows\Windo ws Error Reporting\Throttling]
[HKEY_CURRENT_USER\Software\Microsoft\Windows\Windo ws Error Reporting\Throttling\PCA2]

then run it again and reboot.

So basically, I will have to just remove the spaces and run the registry edit again. That's cool, thanks. :)
 

omniconsumer

Active member
Jul 5, 2011
432
32
28
New York City
discord.gg
I finally got it to work. I went into services.mcs windows error reporting manually. It was on manual and not disabled.

I manually edited the registry as well and changed the value of DontShowUI to 1. It worked. Thanks for your help! :)