Closed ghost closed 10 years ago
Try logging how many times server_monitor is run using the below code. Post your .rpt if you get more than one line saying "server_monitor.sqf execution count = ". the count should only ever = 1 and never more.
Put this code at the line below waituntil{isNil "sm_done"}
if (isNil "server_initCount") then {
server_initCount = 1;
} else {
server_initCount = server_initCount + 1;
};
diag_log format["server_monitor.sqf execution count = %1", server_initCount];
Are you running vanilla server_monitor.sqf? Also what does your init.sqf look like?
Just about to release 1.0.4.2 today. Have yet to have this problem on the dev server, will wait a bit longer to see if anything comes out of this report.
icomrade - I don't understand your reply.
vbawol, not running custom pbo, but others that replied in the thread are. I've only had it happen once. Here is my init.sqf: https://www.dropbox.com/s/0nk87lqv7p7fph4/init.sqf
icomrade is talking over this file: https://github.com/vbawol/DayZ-Epoch/blob/master/SQF/dayz_server/system/server_monitor.sqf
I still don't understand what you want to know about my server's RPT file. You want me to add that code to my server_monitor.sqf? What will it do?
You should add this:
if (isNil "server_initCount") then {
server_initCount = 1;
} else {
server_initCount = server_initCount + 1;
};
diag_log format["server_monitor.sqf execution count = %1", server_initCount];
under https://github.com/vbawol/DayZ-Epoch/blob/master/SQF/dayz_server/system/server_monitor.sqf#L10
The code posted wont fix your issue, it will log how many times the initialization of the hive is run . It will be majorly helpful in determining where the issue lies.
Diag_log outputs text logs to your server.RPT file, if you do not want to provide the whole thing you can search for lines in the .RPT that match this.
search for "server_monitor.sqf execution count =" in your server's RPT after you add the suggested code to your server_monitor.sqf file. post the results.
I'm sorry guys, had to leave town for work and won't be back for a day or two. Maybe ask one of the people that replied to the forum post to do thus. If it hasn't been done by the time I return home, I'll do it on my server.
Sorry, i did not notice the issue already reported. Last restart, it surprisingly went all fine. But before, here are my findings..:
..............
0:13:02 ca\buildings2\a_advertisingcolumn\a_advertcolumn.p3d: No geometry and no visual shape
0:13:04 Warning Message: Script z\addons\dayz_server\compile\server_handleZedSpawn.sqf not found
0:13:32 "infiSTAR.de ProPlan by infiSTAR.de - Waiting for bis_fnc_init..."
0:13:32 "infiSTAR.de ProPlan by infiSTAR.de - bis_fnc_init done - STARTING!"
0:13:32 Warning Message: Script low_admins.sqf not found
0:13:32 Warning Message: Script blacklist.sqf not found
0:13:32 "infiSTAR.de ProPlan by infiSTAR.de - AntiHack Loading..."
0:13:33 "infiSTAR.de ProPlan by infiSTAR.de - AntiHack Loaded!"
0:13:33 "infiSTAR.de ProPlan by infiSTAR.de - CREATING AdminMenu"
0:13:33 "infiSTAR.de ProPlan by infiSTAR.de - ADDING PublicVariableEventHandlers"
0:13:33 "infiSTAR.de ProPlan by infiSTAR.de - FULLY LOADED"
0:13:33 Warning: z\addons\dayz_communityassets\models\compass.p3d:0 Error while trying to generate ST for points: 863, 853, 852
0:13:35 "HIVE: Starting"
0:13:35 "server_monitor.sqf execution count = 1"
0:13:35 "HIVE: trying to get objects"
0:13:35 "HIVE: found 3608 objects"
0:13:35 "HIVE: Commence Object Streaming..."
0:13:36 "HIVE: got 2230 Epoch Objects and 1378 Vehicles"
0:13:46 UH1Y_DZE: ObsTurret - unknown animation source ObsTurret
0:13:46 UH1Y_DZE: ObsGun - unknown animation source ObsGun
0:13:48 "HIVE: Vehicle Spawn limit reached!"
0:13:48 "HIVE: Spawning # of Debris: 100"
0:13:48 "HIVE: Spawning # of Ammo Boxes: 3"
0:13:48 "HIVE: Spawning # of Veins: 50"
0:13:48 "Total Number of spawn locations 5"
0:13:54 "DEBUG VEIN: on road [11654.2,10606.6]"
0:13:54 "EPOCH EVENTS INIT"
0:13:54 "WAI: AI Config File Loaded"
0:13:54 "WAI: AI Monitor Started"
0:13:54 "WAI: Mission Config File Loaded"
0:13:54 "WAI: Starting AI Missions Moniter"
0:14:43 Client: Remote object 2:1124 not found
0:19:16 Server error: Player without identity [PBP]Kramarz (id 327496364)
0:19:32 "DayZ Epoch: PRELOAD Functions\init [[
And that was happening a couple of times in a row. (until the last time ive restarted)
Looks like the hive is starting TWICE sometimes that is causint the issue? As you can see, the first time it loaded everything fine, but the second time it loaded, it messes all things up, resulting in bases/vehicles not spawning correctly.
Please post your entire log file to pastebin.com. It looks like your missing files server_handleZedSpawn.sqf and can you reproduce this without infistar?
From those logs it looks like the code server is starting twice starting again with:
"DayZ Epoch: PRELOAD Functions\init [[:0 (FunctionsManager)],any]" 0:19:32 "DayZ Epoch: MPframework inited"
Also both times it shows:
"server_monitor.sqf execution count = 1"
If this is only an issue with infistar then I believe this line #include "\z\addons\dayz_code\system\REsec.sqf"
in the init.sqf conflicts.
Really we need to reproduce this with 100% vanilla files.
I've added it to my servers, neither of which has infistar or any other anticheat other than the one included with the game. If I see the issue again, I will post the report. I am still on 1.0.4.1.
This is one of the.. i belive 3 logs when it happened to me so far.. (SO FAR it has been good - last 2 restarts)
About the file server_handleZedSpawn.sqf - I've removed it from my files. Why? I've compared your files with mine, and that file was missing from yours, so i figured out it's implemented somehow/somewhere in the code and it is unnecessary - hence the removal.
And about
I do not have such line in my init.sqf (mission PBO).
(if it's any help, im using a dedibox which is hosted on nitrado.net.
That file was removed and should no longer even be called as the function server_handleZedSpawn was added to server_functions.sqf. This means that your server files are not fully in-sync with ours.
Thanks for the logs, I will look into them further.
The reason i cannot... well...i do not want to really just replace my files with yours is the amount of customizations we have made. It's easier for me to compare file by file for changes and merge accordingly.
I have synced server_functions.sqf with yours, looks pretty much clean. But im having problems finding where server_handleZedSpawn is called, so i can remove it, could you help?
Edit: Typos
from time to time i got the same issue. after a restart all is back. this is really curios
i changed my "server_restart.bat" after kill the arma2oaserver.exe to wait 30 seconds after restart the server and now i dont have the issue anymore.
Just in case anyone was wondering I think he was refering to adding this to his restart, so the server is force killed if it runs too long after shutdown.
:KILL_A2OA_SERVER
rem kill the task
taskkill /im arma2oaserver.exe 2> nul
rem check the exit status
if errorlevel 128 goto DONE_A2OA_SERVER
goto DONE_A2OA_SERVER
:DONE_A2OA_SERVER
cd\
cd C:\Program Files\Bohemia Interactive\ArmA 2
start start_DayzServer.bat
timeout 2
If you host with a GSP, such as Vilayer, that's not an option. It would be better to fix the problem than give a work around that most server owners can't do.
Without a reliable way to reproduce the problem on any of our servers and not knowing how your server is started (the GSP's startup script). it will also be extremely difficult to diagnose this issue using SQF code.
How do you restart your servers? Just had a thought that this could be caused by only reloading the mission and not actually restarting the server.
Vilayer uses TCAdmin. You just click on Restart, or Stop and then Start. I have scheduled restarts where TCAdmin restarts the server every 4 hours.
Reproduceable and ill try to fix it.
In case you still need a log, this just happened on my server: https://www.dropbox.com/s/u6beizq6ztwi06l/ARMA2OASERVER%202.txt
@BetterDeadThanZed meet me @ 18:30 GMT+1 on Teamspeak ts3.dayzepoch.com
I will attempt to be there at that time. Also, I know that log has a bunch of errors for my mission system. I missed a , and it's been fixed. :)
Is is possible that #restart is being issued? Also, the best way to restart a server is by using the #shutdown command via BEC instead of just killing the process.
When I first switched to Vilayer, I tried using BEC to restart the server, using the #shutdown command. This resulted in TCAdmin not knowing the server was offline. I don't know why this happens, as using BEC with HFB worked fine and they also use TCAdmin. Vilayer's support told me that it's not supported and I have to use the TCAdmin scheduled restart. This wasn't an issue until after 1.0.3.1.
I don't know if the person that replied to my support ticket at the time didn't know what he was talking about or just didn't want to bother to try and help me. Perhaps if you guys contacted them, they'd listen to you. I still say it would be better to find the cause of this problem rather than have people try a work around. Lots of people are hosted with Vilayer, so it's going to be an issue with a lot of server owners.
Just confirmed this is caused by using #restart command.
We may try to make a workaround to allow restarting only the mission. For now #restart should not be used and the server should be shutdown completely instead.
I don't think it's the #restart command that does it, but rather how the server is restarted when that command is used. I say this because I don't use BEC to restart my server so I know the use of the #restart command is not the cause. What did you guys change after 1.0.3.1 that would cause this to suddenly start happening? What changed? I'm going on 2 days without a reply from Vilayer in regards to this issue and it's driving me nuts.
Using the #restart command is the only way we see that could cause the server monitor to load twice. It maybe that vilayer is using this command in there restart process.
What changed is that the hive is trying to prevent issues by preventing reloading the hive while it is already initialized as it could cause other stranger issues.
If you wish ask them to contact me vbawol@veteranbastards.com or send me a contact.
I can tell you with 100% certainty that Vilayer does NOT use BEC to restart the server. I know this because in October when I switched to them, I tried using BEC to restart, just like I had done previously with other hosts. It resulted in the control panel (TCAdmin) not reading the server's status. TCAdmin said the server was running, but it wasn't. They told me I couldn't use BEC to restart my server because of TCAdmin and instead I had to use the scheduler in the control panel, which kills the process at a specific time, then TCAdmin starts it again.
I'd love to ask them to contact you directly, but since I've gone 2 days without a reply to either support ticket I have in with them, it's unlikely they'd contact you.
Vilayer finally responded:
Im sorry for the problems you have been having with your server, the way TCadmin handles the shutdowns is nothing like the way that Epoch offers, it is run on a service level on the servers. When we send the kill command to the server it kills the process for the server, then it will close BEC, Whitelister, MySQL and any other tools that are running in our backend. We have not had any problems reported of servers not restarting so if you are having problems with your server then please let us know so we can investigate it further.
Not very helpful.
I can tell you with 100% certainty that Villayer is not using any rcon commands to shut down the server. I used to work for GSP so I know how TCAdmin works. It stops the process by killing it. The server is run as a service and the service is simply killed, TCAdmin then automatically restarts it.
So how do they automate your restarts as you previously said they do not automatically restart if you use the #shutdown command.
I am 100% certain that this issue is caused by issuing a #restart command.
Use #shutdown instead of #restart this fix issue with a hanging thread of the hiveDLL.
Here's their response to my ticket. They confirmed what I've said:
Our back end system after turning off the server goes through the following process to turn everything back online; Service Launch BEC, Whitelister, ServerMesssages, MySQL Server Once these have all started the PBO's are created and put in the correct folders from the VilayerCustomCode folder and then once this has all been checked the server itself will turn on, the whole process can take 1-2 minutes before the server is full restarted.
I can confirm from reading that what has been posted on GIT that we do not use #restart from bec and that the service is fully terminated which makes the batch script provided in the previous ticket void as that just checks the server when killed using BEC is offline.
If there is a problem with the database not communicating with the server then this is a problem with the way Epoch is communicating or some custom code causing problems as far as I can tell, we have not had any other tickets about this come in and none of the other staff have seen this problem.
Perhaps this issue needs to be reopened?
@BetterDeadThanZed How are the automated restarts done? That only explains what happens on server startup.
TCAdmin has a scheduler that you simply put in when you want it to restart the server, then it does what Vilayer explained.
@vbawol i am having the same issue, my server restarts via BEC using #shutdown then waits for 5 seconds and kills the process if it is still running, then waits another 10 seconds to start the server again
Try waiting 60 seconds (after #shutdown - BEFORE killing the process) for the connection to close on its own between restarts.
My restart kill the arma2oaserver.exe and restart the Server within a half second. I don't recommend to use a command in BEC to shutdown the server.
Hmm, I always close the server using #shutdown then wait 60 seconds, if the process is still running force kill it and wait 5 seconds, then start the server again.
I'm not sure this is related but I think it's worth nothing that this started happening to my server right after I started using the new Hiveext.dll
So if you use #shutdown to close the game, then BEC closes immediately thereafter since it loses connection. So how do you restart the server without calling a batch file or something? You can't call a batch file then without using some other scheduling app. I'm speaking about running it on a dedi box, not through a GSP with TCAdmin.
It seems that with 1.0.4.1, sometimes the object_data table isn't read, resulting in base, vehicle, and anything else in that table not appearing on the server. The data is still in the table. It's just not loaded. See this thread: http://epochmod.com/forum/index.php?/topic/7196-database-issues