Jump to content
pvt_ammo@hotmail.com

Correct restart procedure.....

Recommended Posts

So I've restarted my server on a 6 hour basis but randomly sometimes tents/vehicles do not load and I have to keep restarting the server until they do. I've read that there's a certain way to restart a DayZ server so it loads all the databases correctly but nobody ever goes into detail on how this is achieved.

Could someone please explain to me what this correct procedure is, if there is one?

Thanks.

Share this post


Link to post
Share on other sites

As a player affected by this, I will give you my bump.

  • Like 1

Share this post


Link to post
Share on other sites

Are you killing the server's process, or are you issuing the #shutdown or #restart commands via RCon? I used to kill the process, and it seemed like I had more issues, but now I have BattlEye Extended Controls issue the #shutdown command on a schedule, and then my monitoring script notices the server is shut down, so it restarts it.

Edited by Mister_Magotchi
  • Like 2

Share this post


Link to post
Share on other sites

Are you killing the server's process, or are you issuing the #shutdown or #restart commands via RCon? I used to kill the process, and it seemed like I had more issues, but now I have BattlEye Extended Controls issue the #shutdown command on a schedule, and then my monitoring script notices the server is shut down, so it restarts it.

Do you have some information about how to set that up?

Share this post


Link to post
Share on other sites

It's a little confusing at first, but you just need to follow the instructions at the BattlEye Extended Controls website.

To get you started, though, here's the contents of my Config.cfg for it:


[Bec]
Ip = 74.91.120.179
Port = 2302
BePath = ..\US303\BattlEye
LogDir = US303
Admins = Admins.xml
Commands = Commands.xml
[Misc]
KickLobbyIdlers = 300
Scheduler = Scheduler.xml
Timeout = 60

My Scheduler.xml:


<?xml version="1.0"?>
<Scheduler>
<job id="0">
<time>01:55</time>
<day>1,2,3,4,5,6,7</day>
<loop>0</loop>
<cmd>say -1 This server will restart in 5 minutes, as scheduled.</cmd>
<cmdtype>0</cmdtype>
</job>
<job id="1">
<time>02:00</time>
<day>1,2,3,4,5,6,7</day>
<loop>0</loop>
<cmd>#shutdown</cmd>
<cmdtype>0</cmdtype>
</job>
<job id="2">
<time>07:55</time>
<day>1,2,3,4,5,6,7</day>
<loop>0</loop>
<cmd>say -1 This server will restart in 5 minutes, as scheduled.</cmd>
<cmdtype>0</cmdtype>
</job>
<job id="3">
<time>08:00</time>
<day>1,2,3,4,5,6,7</day>
<loop>0</loop>
<cmd>#shutdown</cmd>
<cmdtype>0</cmdtype>
</job>
<job id="4">
<time>13:55</time>
<day>1,2,3,4,5,6,7</day>
<loop>0</loop>
<cmd>say -1 This server will restart in 5 minutes, as scheduled.</cmd>
<cmdtype>0</cmdtype>
</job>
<job id="5">
<time>14:00</time>
<day>1,2,3,4,5,6,7</day>
<loop>0</loop>
<cmd>#shutdown</cmd>
<cmdtype>0</cmdtype>
</job>
<job id="6">
<time>19:55</time>
<day>1,2,3,4,5,6,7</day>
<loop>0</loop>
<cmd>say -1 This server will restart in 5 minutes, as scheduled.</cmd>
<cmdtype>0</cmdtype>
</job>
<job id="7">
<time>20:00</time>
<day>1,2,3,4,5,6,7</day>
<loop>0</loop>
<cmd>#shutdown</cmd>
<cmdtype>0</cmdtype>
</job>
</Scheduler>

I have the Bec directory inside the game's main directory.

As Bec exits when the game shuts down, my monitoring script (a tweaked version of R4z0r49's) also kills it (to make sure it's closed) and starts it again at the same time it starts the server.

Edited by Mister_Magotchi
  • Like 3

Share this post


Link to post
Share on other sites

we had this aswell with tents and vehicles disapearing. what you have to do is the following.

log in to your admin control panel and simply use the restart button.

when the server comes back up connect to it.

once your in the lobby DO NOT click the ok button.

let the timeout counter in the top right corner run all the way to zero and then the server will auto load onto the next screen itself.

once you are there all should be fine and you can click continue in the bottom right.

we had several failed restarts but since we have been doing it the way i said above we have never lost a tent or vehicle to a restart.

its as if that you have to let the timeout run all they way down and let it load its self or else it doesnt fully load everything onto the server.

atleast this method has been working for us.

  • Like 1

Share this post


Link to post
Share on other sites

The problem with that is that the first person to join the server is the person that gets to accept the mission.

Either way, I also haven't had any issues with missing tents or vehicles since I started using the #shutdown command. In fact, the problems we do sometimes have (which I think are common) are that the tents sometimes reappear fully stocked, even after flattening, and the vehicles sometimes reappear in full condition, even after being destroyed.

Edited by Mister_Magotchi

Share this post


Link to post
Share on other sites

What kind of monitoring script are you using to restart the server when it gets shutdown automatically?

Edit: Nevermind, I'm blind

Edited by Peep

Share this post


Link to post
Share on other sites

we had this aswell with tents and vehicles disapearing. what you have to do is the following.

log in to your admin control panel and simply use the restart button.

when the server comes back up connect to it.

once your in the lobby DO NOT click the ok button.

let the timeout counter in the top right corner run all the way to zero and then the server will auto load onto the next screen itself.

once you are there all should be fine and you can click continue in the bottom right.

we had several failed restarts but since we have been doing it the way i said above we have never lost a tent or vehicle to a restart.

its as if that you have to let the timeout run all they way down and let it load its self or else it doesnt fully load everything onto the server.

atleast this method has been working for us.

Ok this is the other thing I was reading up on. To not force start the server and let it "soft start" is the key to getting it to load all the databases fully.

Is there a way for admins to join their locked server to get it soft started before anyone else joins? Perhaps passwording it, joining, soft starting and then removing the pass perhaps?

  • Like 1

Share this post


Link to post
Share on other sites

For anyone that's using http://r4z0r49sisle.com/Server.html and is interested in having BEC start up automatically as well:

  1. Create a shortcut to Bec.exe
  2. Place it in the root folder of your server
  3. Rename it to bec
  4. Edit the shortcut (Right Click -> Properties) and update the target to include your config file (ie: C:\Users\root\Desktop\dayz\BEC\Bec.exe -f Config.cfg)
  5. Open Start_Dayz_ServerV2.6.bat in a text editor
  6. Navigate to line 141 OR Ctrl+F search: start Expansion\beta\arma2oaserver.exe
  7. Add this line directly below it: start "" bec.lnk
  8. Done!

Example:


start Expansion\beta\arma2oaserver.exe -mod=EXPANSION\beta;EXPANSION\beta\Expansion;EXPANSION;ca;@dayz;@hive -ip=%serverip% -port=%serverport% -profiles=%servername% -config=%servername%\server_%randomnumber%.cfg -cfg=%servername%\Arma2_%randomnumber%.cfg -name=%servername% -world=Chernarus -nopatchcheck -nopause -pid=pid_%randomnumber%.txt %addinalperms%
start "" bec.lnk
echo (%date%) (%time%) Waiting for Dayz to start.

Seems to work fine and it's free... but if your server implodes, don't blame me.

Share this post


Link to post
Share on other sites

I do basically that, but I just throw BEC's directory into the Arma 2 directory (and don't use a shortcut), and I kill BEC before running it, just in case it's open:

  1. Extract BEC to ARMA2OA_DIR\Bec .
  2. Before or after the "start Expansion\beta\arma2oaserver.exe ..." line, put

    taskkill /im Bec.exe
    start /D Bec\ Bec\Bec.exe -f Config.cfg


Also, to fix the bug in R4z0r49's script which causes it to spawn an extra Arma 2 server process any time it sees (and kills) ANY hanging process (rather than just when arma2oaserver.exe is hung), change:

taskkill /f /fi "status eq not responding"

to:

taskkill /f /fi "status eq not responding" /im arma2oaserver.exe

Also, since the URLs of the scripts.txt, ban.txt, and bans.txt have all changed, I did the following:

  1. In Dayz_LaunchConfig.cfg, change the bottom section to:
    |=== Dayz Global Ban/Script files ===
    banfile=http://serverhosters.dayz.nu/.dayzhosters/battleyeconfig/ban.txt
    bansfile=http://serverhosters.dayz.nu/.dayzhosters/battleyeconfig/bans.txt
    scriptsfile=http://serverhosters.dayz.nu/.dayzhosters/battleyeconfig/scripts.txt
    dayzfilesusername=THEUSERNAME
    dayzfilespassword=THEPASSWORD


    Don't forget to put the right passwords in.

  2. In Start_Dayz_ServerV2.6.bat , replace all occurences of "wget.exe" with "wget.exe --user=%dayzfilesusername% --password=%dayzfilespassword%"

Edited by Mister_Magotchi
  • Like 2

Share this post


Link to post
Share on other sites

Hello Guys,

i have a little Problem with BEC and the Restart Script. Sometimes my Server crashed after the 'shutdown with Bec. The Restart Script doesn´t realize that the Server is crashed and didn´t restart the Server. Because there is this Window saying "server does not work anymore" and i have to klick OK. I tryed this in the Restart.bat:

Before or after the "start Expansion\beta\arma2oaserver.exe ..." line, put

taskkill /im Bec.exe

start /D Bec\ Bec\Bec.exe -f Config.cfg

and i change this:

taskkill /f /fi "status eq not responding"

to:

taskkill /f /fi "status eq not responding" /im arma2oaserver.exe

Can some1 help me please?!

Share this post


Link to post
Share on other sites

That monitoring script posted above is no longer available. Can someone please post theirs? Thank you.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×