Sign in to follow this  
Followers 0
HeadRox

BEC server restart, stops server, but not starts it

1 post in this topic

Hi All,

Got a nice server running with BEC doing some scheduled messages.
Also got a 'job' for (as default) to restart every 6 hours.
Now it does close the server as it should but it doesnt start it again.
 

RCon admin #1: (Global) RESTART IN 10 MINUTES - START PREPARING TO LOG OUT
RCon admin #1: (Global) RESTART IN 5 MINUTES - START PREPARING TO LOG OUT
RCon admin #1: (Global) RESTART IN 2 MINUTES - SAVE GEAR AND LOG OUT
0RCon admin #1: (Global) RESTART IN 1 MINUTE - SAVE GEAR AND LOG OUT
RCon admin #1: (Global) THIS SERVER RESTARTS EVERY 6 HOURS - TYPE !UPTIME IN SIDE CHAT TO SEE THE SERVER UPTIME
Lost Connection!
Closing socket & exiting!

After this nothing happens.
So i'm not sure why it does not start the server again.

My server structure is:
C:\steamCMD\steamapps\common\Arma3Server  (with arma3server.exe)
C:\steamCMD\steamapps\common\Arma3Server\battleye  (incl BEconfig.cfg with rcon and max ping set)
C:\steamCMD\steamapps\common\Arma3Server\@ExileServer (with config.cfg)
C:\BEC  (with bec.exe shorcut with: C:\BEC\Bec.exe -f config.cfg --dsc

My config.cfg in C:\BEC

[Bec]
#--------------------------------------------------------------------------------------------------------

# Set the ip to your server. normally 127.0.0.1 will be fine.
Ip = 127.0.0.1

# 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:\steamCMD\steamapps\common\Arma3Server\battleye

# Set the path to your Admins.xml file containing your admins.
Admins = Admins.xml

# Set the path to your Commands.xml file.
Commands = Commands.xml

Restartserver.bat
 

 @echo off
::MAKE SURE ALL TASKS ARE REALLY STOPPED

taskkill /f /fi "status eq not responding" /im arma3server.exe
taskkill /f /im arma3server.exe
timeout 1

::IF YOU PLAY ON SAME PC AS SERVER, SOMETIMES RESTARTS GET HUNG UP BECAUSE OF IT SO MAKE SURE TO KILL CLIENTSIDE TOO, I DONT, BUT JUST IN CASE YOU DO

taskkill /f /fi "status eq not responding" /im arma3.exe
taskkill /f /im arma3.exe
timeout 1

:: KILL BATTLEYE IF IT ISN'T ALREADY
taskkill /im Bec.exe

::SHUTDOWN SERVERMONITOR IF IT IS ALREADY RUNNING - WE RESTART IT AT THE END OF THIS
taskkill /f /im cmd.exe /fi "windowtitle eq servermonitor.bat
echo Make sure all is clear

echo Restarting Battleye

::RESTARTING BATTLEYE
set becpath="C:\BEC\"
cd /d %becpath%
start "" /min "Bec.exe" -f Config.cfg
timeout 3
echo Battleye has started.. 
echo.
echo.
echo Starting ARMA 3 Server...

::RESTARTING THE ARMA 3 SERVER BE SURE TO EDIT THIS TO YOUR SERVER .EXE LOCATION -NOTE ALSO THIS IS WHERE YOU DEFINE WHERE YOU CONFIG.CFG IS
cd C:\steamCMD\steamapps\common\Arma3Server\
timeout 3
start "Arma3" /min /wait arma3server.exe -mod=@exile;Kart,Mark,Heli; -servermod=@exileserver;@ryanzombies;@RHSAFRF;@RHSUSAF; -config=C:\steamCMD\steamapps\common\Arma3Server\@ExileServer\config.cfg -port=2303 -profiles=SC -cfg=C:\Servers\Exile\@ExileServer\basic.cfg -name=SC -autoinit -enableHT
timeout 6
echo ARMA 3 Server has started

:: THIS RUNS THE SERVER MONITOR FOR YOU SO YOU DON'T FORGET
set ServerMonitorPath="C:\steamCMD\steamapps\common\Arma3Server\"
cd /d %ServerMonitorPath%
start "" "servermonitor.bat"
echo Server Monitor has started. Have Fun
timeout 5
exit

Servermonitor.bat

 @echo off
::IMPORTANT TO NAME IT SO WE CAN KILL IT
title servermonitor.bat
:start
C:\Windows\System32\tasklist /FI "IMAGENAME eq arma3server.exe" 2>NUL | C:\Windows\System32\find /I /N "arma3server.exe">NUL
if "%ERRORLEVEL%"=="0" goto loop
echo Server is not running, will be started now 
start "" /min /wait "C:\steamCMD\steamapps\common\Arma3Server\restartserver.bat" 
timeout 30
echo Server started succesfully
goto started
:loop
cls
echo Server is already running, running monitoring loop
:started
::THE 80 REFERS TO SECONDS AND HOW OFTEN IT WILL CHECK,YOU CAN SET IT TO WHATEVER YOU WANT. I JUST DONT WANT MY SERVER DOWN FOR MUCH LONGER THAN THAT!
::New error fault kill, will check for err fault and clear it and hopefully restart, a little more promise but no guarantee :)
taskkill /f /im WerFault.exe /fi "WINDOWTITLE eq Arma 3"
C:\Windows\System32\timeout /t 60
C:\Windows\System32\tasklist /FI "IMAGENAME eq arma3server.exe" 2>NUL | C:\Windows\System32\find /I /N "arma3server.exe">NUL
if "%ERRORLEVEL%"=="0" goto loop
goto start

Anyone have an idea for this issue?
 

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.