Jump to content
  • 0

Need help setting up server restarts


Shadow{}Wolf

Question

Can someone point me to a true guide for this? I've googled and found several different threads with several different opinions, and most often with people having similar issues to me stating "Thanks i fixed it" without ever stating how.

 

I have a dedicated box all my own with RDP access on Windows 2008 R2. I have installed XAMPP and have MYSQL running as a service. My server operates great and stays up with no crashes or issues.

 

I want to be able to do restarts every 6 hours (6am, 12pm, 6pm, 12am) with warning messages at 15m, 10m, 5m, and 2m before restart.

 

I've installed BEC and it connects to my server properly. I can see the timed messages that it sends over it chat, and it does restart the server with the #shutdown command on time. However, once it shuts down, nothing comes back up. The server closes out and BEC immediately closes out as well. As far as I can tell i've followed all of the instructions that come with the software.

 

I did get firedaemon and try running everything as services instead, but I didn't have much luck. Each process i make give me an error that it wants to send me a message but can't because it's not compatible with windows, so it gets run in a seperate environment. The server exe started successfully this way, but the server was unreachable over the network.

 

As a bonus, i'd also like to make my Arma 2 recover from crashes on its own if possible.

 

Can anyone point me in the right direction?

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

You can use BEC to call a batch file to shutdown the server. The batch file will kill the armaOAserver.exe and then have that same batch file run the batch to start the server back up.

 

This is what I use on mine. It also has the rotate logs and restarts BEC as well.

 

If you need to see a snipit of my scheduler let me know.

 

Make sure to change the edit the file to match your folder structure.

@echo off
echo.
echo KILL arma2oaserver.exe
set serverkill="D:\Program Files (x86)\Steam\SteamApps\common\Arma 2 Operation Arrowhead\Expansion\beta"
cd /d %serverkill%
taskkill /im arma2oaserver.exe
echo.
echo Kill Bec.exe
set beckill="PATHTOBECFOLDER"
cd /d %beckill%
taskkill /im bec.exe
timeout 10
echo.
echo Starting Rotate Logs
:: Rotating the logs..
set logpath="D:\Program Files (x86)\Steam\SteamApps\common\Arma 2 Operation Arrowhead\instance_13_tavi"
cd /d %logpath%
start "" "rotate_logs.bat"
timeout 10
echo.
echo Starting Dayz Server
:: start the server..
set dayzpath="D:\Program Files (x86)\Steam\SteamApps\common\Arma 2 Operation Arrowhead\"
cd /d %dayzpath%
start "" "DayZ_Epoch_instance_14_Taviana.bat"
timeout 10
echo.
echo Starting Bec
:: start bec
set becpath="PATHTOBECFOLDER"
cd /d %becpath%
start "" "bec.exe" -f Config.cfg
echo.
echo Server Started 100%
cls
@exit
Link to comment
Share on other sites

  • 0

Go to Task Scheduler. Create a new task, create a task for the arma sever, add the command line, and schedule it to check every 5 minutes and repeat, Also set the settings so it won't create a new instance if the instance is already running. Do the same thing for BEC.

Link to comment
Share on other sites

  • 0

So my solution, based on input from this thread and on solving issues that popped up for me throughout, though probably not the cleanest, was this:

 

Excerpt from my BEC scheduler.xml

	<!-- 2 min to the 12:00 restart -->
	<job id="8">
		<time>11:58:00</time>
		<delay>000000</delay>
		<day>1,2,3,4,5,6,7</day>
		<loop>0</loop> 
		<cmd>say -1 This server will restart in 2 min.</cmd>
		<cmdtype>0</cmdtype>			
	</job>
	<!-- 12:00 restart -->
	<job id="9">
		<time>11:59:55</time>
		<delay>000000</delay>
		<day>1,2,3,4,5,6,7</day>
		<loop>0</loop> 
		<cmd>C:\GGW DayZ Epoch\Server_Restart.bat</cmd>
		<cmdtype>1</cmdtype>
	</job>
	<job id="10">
		<time>12:00:00</time>
		<delay>000000</delay>
		<day>1,2,3,4,5,6,7</day>
		<loop>0</loop> 
		<cmd>#shutdown</cmd>
		<cmdtype>0</cmdtype>

As you can see, that calls a restart.bat BEFORE it shuts down.

 

That restart.bat looks like this:

@echo off
timeout 20
echo.
echo Starting Dayz Server
:: start the server..
set dayzpath="C:\GGW DayZ Epoch"
cd /d %dayzpath%
start "" "DayZ_Epoch_instance_11_Chernarus.bat"
timeout 10
echo.
echo Starting Bec
:: start bec
set becpath="C:\GGW DayZ Epoch"
cd /d %becpath%
start "" "bec.exe" -f ggwconfig.cfg
echo.
echo Server Started 100%
cls
@exit

So the bat starts but waits 20 seconds before executing anything, during that 20 seconds the schedule will run #shutdown to ensure that the server is shutdown properly.

 

I've been running this for several days now. It runs 4 times a day at 6 and 12. I havn't had any issues at all. All database objects spawn back properly, no crashes, no bad starts.

Link to comment
Share on other sites

  • 0

hallo  i have a problem with BCE.

 

bec-config.png

 

my .bat 

 

 

@echo off

 
taskkill /IM arma2oaserver.exe /F
 
CD C:\Users\ENO\Desktop\chernarus
 
@echo off
start "arma2" /min "Expansion\beta\arma2oaserver.exe" -port=2302 "-config=instance_11_Chernarus\config.cfg" "-cfg=instance_11_Chernarus\basic.cfg" "-profiles=instance_11_Chernarus" -name=instance_11_Chernarus "-mod=@DayZ_Epoch;@DayZ_Epoch_Server;" -cpuCount=4 -maxMem=1578 -exThreads=7 "-BePath = C:\Users\ENO\Desktop\chernarus\instance_11_Chernarus\BattlEye"
 
CD C:\Users\ENO\Desktop\chernarus
 
start BEC\Runme
 
 
cls
 
exit

 

my config 

 

 

# This config file is only provided as an example file.

# Edit it to sute your needs.
# For more info on how to edit this file. use the Readme.txt file or visit http://www.ibattle.org/install-and-configure
 
 
#--------------------------------------------------------------------------------------------------------
[bec]
#--------------------------------------------------------------------------------------------------------
 
# Set the ip to your server. normally 127.0.0.1 will be fine.
Ip = 78.46.38.163
 
 
# Set the port to the server. default port is 2302
Port = 2302
 
 
# Set the path to the BattlEye directory that is currently in use by the server.
BePath = C:\Users\ENO\Desktop\chernarus\instance_11_Chernarus\BattlEye
 
 
# Set the path to your Admins.xml file containing your admins.
Admins = A2_Admins.xml
 
 
# Set the path to your Commands.xml file.
Commands = Commands.xml
 
 
#--------------------------------------------------------------------------------------------------------
[Misc]
#--------------------------------------------------------------------------------------------------------
 
# Set which type of hacks that will be added to your banlist.
# 0 = none. 1 = GameHack. 2 = Battleye Hack. 3 = both GameHack & Battleye Hack. 
# value 3 is set as default if this parameter is not defined.
Ban = 3
 
# Set the height & width of Becs console window
ConsoleHeight = 45
ConsoleWidth = 165
 
 
# Only allow english chars.
AsciiNickOnly = False
 
 
# Only allow english chars to be typed on the chat. Note, Warnings must be enabled. 0 or more.
AsciiChatOnly = True
 
 
# If AsciiChatOnly is set True. you can define none english chars that will be accepted.
# You separate each char with a , "note you need to define lower and upper case of the chars."
IgnoreChatChars = €,£,æ,Æ,ø,Ø,å,Å,ö,ä,ü,ß
 
 
# Set the amount of warnings a player will get before kicked. -1 is disabled. 0 instant kick
# 1 == one warning on a bad word. next bad word results in kick
Warnings = 3
 
 
# Kick players who has listed chars in their name
DisallowPlayerNameChars = []{}()0123456789
 
 
# Min length, kicks players who has to short name.
MinPlayerNameLength = 3
 
 
# Max length, kicks players who has to long name.
MaxPlayerNameLength = 16
 
 
# Set the name of your Arma3server.exe if it has been renamed from arma3server.exe to something else!
# if the exe has its original name. comment it out.
# DO NOT SET FULL PATH TO THE EXE FILE
ServerExeName = NewArmaExeName.exe
 
 
# Set path to the file containing a list of bad words. Note, Warnings must be enabled. 0 or more.
#WordFilterFile = BadWords.txt
 
 
# Set the path to the file containing whitelisted guids.
#WhiteListFile = WhiteList.txt
 
 
# Set custom whitelist kick message. Text must be in ascii letters.  MAX 58 CHARS. BE only does ascii on messages
#WhileListKickMsg = you are not whitelisted on this server.
 
 
# Kick people with offensive names
NickFilterFile = BadNames.txt
 
 
# Set the path to the Scheduler.xml file.
Scheduler = Scheduler.xml
 
 
# Kick people who are idleing in the lobby, kick will happen after given time, Min time is 90 sec. use 0 to disable this function.
KickLobbyIdlers = 0
 
 
# If enabled. Bec will create seperate chat files for each channel along with the main file.
#ChatChannelFiles = false
 
# Set the amount of Normal players who can connect. Set it to -1 to disable it. 
# If set to 0 it means only players who are listed in the Admins.xml, (or whatever you call it) will be able to connect to the server.
# Quick Example 1: server can holed 50 players. and you want to reserve 5 slots for admins. then set SlotLimit to 45.
# Quick Example 2: server can holed 50 players. and you want to reserve 5 slots for admins and 5 slots for friends. then set SlotLimit to 40,
# AND edit your admins.xml. ADD in all your frineds guid and remaining data, put them in group example 100. or whatever you feel likt.
# by using this method you can give some of your friends some access to some commands if you like or none. 
# in general this is works like .Whitelisting X player slots for admins and friends, while leaving the remaining Y slots for public.
SlotLimit = -1
 
# Set the message people will get when they try to connect and is not whitelisted. Text must be in ascii letters.
SlotLimitKickMsg = The Server has reached its player limit.
 
 
# The amount of time Bec will wait for the server to start up.
Timeout = 30
 
 
#--------------------------------------------------------------------------------------------------------
[Reporter]
#--------------------------------------------------------------------------------------------------------
# Reporter account. Fill in the username and password for your reporter account.
# GameHacks, BattlEye Hacks will be reported to a database. all players who connect will also be checked against this database.
 
# Set the Username for your account
#User = alfred
 
 
# Set the Password for your account
#Password = 123456
 
 
#--------------------------------------------------------------------------------------------------------
[ChatRestriction]
#--------------------------------------------------------------------------------------------------------
# Set max amount of chat lines a player is allowed to send for each channel. 
# Going passed the number will result in kick. -1 is disabled, 0 isntant kick.
# If the number is higher than 0 players will be sent warnings.
 
Lobby = 30
Global = 5
Side = 7
Group = 9
Vehicle = 11
Command = 13
Commander = 15
Direct = 17
 
 
#--------------------------------------------------------------------------------------------------------
[ChatSpam]
#--------------------------------------------------------------------------------------------------------
 
# Set max amount of chat lines per channel allowed within given time frame.
# Set the values to 0 to disable this function(s)
 
# Quick Example:
# Lobby = 5
# Lobby_Time_Lower = 10
# Lobby_Time_Upper = 15
 
# If the time between each new chatlines from a player is less than CHANNEL_Time_Lower the spam counter increases by + 1. 
# Consider the CHANNEL (Lobby) as the spam counter.
# When a player has (CHANNEL - 1) in spam counting. a warning will be sent to whom it may consern.
# If the time between each new chatline from the player is Greater than CHANNEL_Time_Lower and Less than CHANNEL_Time_Upper the spam counter stay as it is.
# If the time since the last chatline is greater then CHANNEL_Time_Upper the spam counter is reset to 1.
# To get optimal result play around a bit with the values on your server.
 
Lobby = 0
Lobby_Time_Lower = 0
Lobby_Time_Upper = 0
 
Global = 0
Global_Time_Lower = 0
Global_Time_Upper = 0
 
Side = 0
Side_Time_Lower = 0
Side_Time_Upper = 0
 
Group = 2
Group_Time_Lower = 1
Group_Time_Upper = 3
 
Vehicle = 0
Vehicle_Time_Lower = 0
Vehicle_Time_Upper = 0
 
Command = 0
Command_Time_Lower = 0
Command_Time_Upper = 0
 
Commander = 0
Commander_Time_Lower = 0
Commander_Time_Upper = 0
 
Direct = 0
Direct_Time_Lower = 0
Direct_Time_Upper = 0
 
 

 

i have you can help me

 

sry for my bad englich a german

Link to comment
Share on other sites

  • 0
# Set the name of your Arma3server.exe if it has been renamed from arma3server.exe to something else!
# if the exe has its original name. comment it out.
# DO NOT SET FULL PATH TO THE EXE FILE
ServerExeName = NewArmaExeName.exe
 
This tells me two things. 
 
1. You have not set a name for the executable.
2. You are using a config file that is for arma3.  < It still may be compatible but I suggest finding one that is suited for Arma 2 OA
 
I hope that gets you in the right direction.
 
Thanks!
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...