Page 1 of 2

Server falls asleep after Game end

Posted: Sat Dec 31, 2016 8:29 pm
by Barbie
Sometimes my server falls asleep after Game ends and unfortunately I'm not able to reproduce this.
ucc.init.log wrote:2016-12-31 15:49:16 MH-Hangar.MonsterHunt0.EndGame LOG_Info: Game ended, reason='Hunt Successfull!'
!!!!!!!!!!!!!!! CALC END STATS
ngWorldStats: ExecuteWorldLogBatcher
Create Proc: sh ../NetGamesUSA.com/ngWorldStats/bin/ngWorldStats.exe -d ../NetGamesUSA.com/ngWorldStats/logs -g UT
bWorldBatchError is 0
2016-12-31 15:49:16 MH-Hangar.MonsterHunt0.EndGame LOG_Debug: leaving sub routine
[ EVENT ] The game has ended after 657 sec.
And then happens - nothing. Log ends at this line, Clients are disconnected, GameTracker seems not to get any updates any more. If I look into the process list ("top") I see that ucc is "sleeping" and CPU time is at idle level (not at 25% as it is if ucc is in an endless loop).
I also added some log lines into the code of MonsterHunt.EndGame() to see if code processing stucks there: "leaving sub routine" means that the end of MonsterHunt.EndGame() has been reached and passed. I tracked the logging down to Nexgen112.NexgenController.gameEnded() where the message [EVENT] The game has ended after ... is issued.
Any idea what happened there? Or better: what does not happen there? ^^

I recently modified the code of MonsterEnd's and after that I noticed this problem. It may be the reason, but I could not say, why.
MonsterEndSB

Code: Select all

// New trigger to end maps. The old MH ends will no longer work when using
// this gametype. Calls to monsterhunt.monsterend are not valid.


class MonsterEndSB expands Trigger;


function Touch(actor Other) {
local actor A;
	Super.Touch(Other);
	if (IsRelevant(Other))
		TriggerObjective();
}




function TakeDamage(int Damage, Pawn instigatedBy, Vector hitlocation, Vector momentum, name damageType) {
/******************************************************************************
Stupid design of original code: instead using a separate overridable
function for firing event all is thrown into one function... So I have to
duplicate all the code. --SeriousBarbie
******************************************************************************/
local actor A;

	if ( bInitiallyActive && (TriggerType == TT_Shoot) && (Damage >= DamageThreshold) && (instigatedBy != None) )
	{
		if (ReTriggerDelay > 0)
		{
			if (Level.TimeSeconds - TriggerTime < ReTriggerDelay)
				return;
			TriggerTime = Level.TimeSeconds;
		}
		// Broadcast the Trigger message to all matching actors.
		if (Event != '')
			foreach AllActors(class 'Actor', A, Event)
				A.Trigger(instigatedBy, instigatedBy);

		if (Message != "")
			// Send a string message to the toucher.
			instigatedBy.Instigator.ClientMessage(Message);

		if (bTriggerOnceOnly)
			// Ignore future touches.
			SetCollision(False);
		//log(self $ ".TakeDamage: DEBUG for" @ instigatedBy);
		TriggerObjective();
	}
}

function TriggerObjective() {
	if (MonsterHunt(Level.Game) != None)
	{
		if ( ! Level.Game.bGameEnded)
			Level.Game.EndGame("Hunt Successfull!");
		else
			warn(self $ ".TriggerObjective: Game already ended");
	}
	else
		warn(self $ ".TriggerObjective: Gametype is not 'MonsterHunt' and therefore cannot be ended by 'MonsterEnd'");
}

defaultproperties
{
	bTriggerOnceOnly=True
	//InitialState=OtherTriggerTurnsOn //SB: why this state?
	InitialState=NormalTrigger
	Texture=Texture'MonsterHunt.MHEnd'
	TriggerType=TT_PlayerProximity
}
MonsterHuntSB.MonsterEndsReplace

Code: Select all

class MonsterHuntSB expands TeamGamePlus config(BarbiesWorld);
const MonsterEndClassNew	= Class'MonsterEndSB';
...
function PostBeginPlay() {
	...
	Logger(Log_Verbose, "PostBeginPlay", "Number of replaced MonsterEnds:" @ MonsterEndsReplace());
	Super.PostBeginPlay();
}
...
function int MonsterEndsReplace() {
local MonsterEnd MH;
local MonsterEndSB MHNew;
local int result;
local Actor A;

	forEach AllActors(class'MonsterEnd', MH)
	{
		MHNew = Spawn(MonsterEndClassNew, , MH.Tag, MH.Location, MH.Rotation);
		if (MHNew != None)
		{
			logger(LOG_Debug, "MonsterEndsReplace", "spawned" @ MHNew @ "at location" @ MH.Location);
			if (class'SharedCode'.static.CopyProperties_Trigger(MH, MHNew, True))
			{
				if (MHNew.AttachTag != '')
					foreach AllActors(Class'Actor', A, MHNew.AttachTag)
					{
						MHNew.SetBase(A);
						logger(LOG_Debug, "MonsterEndsReplace", "set base to" @ A @ "for" @ MHNew);
						break; // MHNew can follow only one Actor
					}
				MHNew.PostBeginPlay(); // have a look at Trigger.PostBeginPlay() for explanation
				MHNew.GoToState(MHNew.InitialState);
			}
			else
				logger(LOG_Error, "MonsterEndsReplace", "CopyProperties_Trigger() faild for" @ MHNew);
			if (MH.Destroy())
				result++;
		}
		else
			logger(LOG_Error, "MonsterEndsReplace", "could not spawn" @ MonsterEndClassNew @ "at location" @ MH.Location);
	}
	return result;
}

Re: Server falls asleep after Game end

Posted: Sat Dec 31, 2016 9:07 pm
by Aldebaran
You have changed the SBMutFixTeleportersURL mutator lately, has it something to do with that perhaps when you have it installed?
What should happens next (after your log ends)? The mapvote opens it window? Perhaps a mapvote problem?
Has it to do with specific maps or can it happen with every map?
Only some ideas...

Re: Server falls asleep after Game end

Posted: Sat Dec 31, 2016 10:07 pm
by sektor2111
I cannot answer what is happening but I can figure what I don't like.
Super.Touch ??? What is this for ? What multiple touches do you need there ? I never see that in an end trigger yet... but anyway...
That log ? Purpose ? More useless connections ?
I found maps with end bStatic (a sort of crap) - server was reacting nasty at this point. You should not destroy stuff from Level as much as possible - just saying. I did a clone of Original MH but renamed to MH2 which reacts ending game a SINGLE time

Code: Select all

function TriggerObjective()
{
	local	MonsterHunt2 MH;
	local	Pawn P;

	if ( !Level.Game.bGameEnded )
	{
		MH = MonsterHunt2(Level.Game);
		if (MH != None)
			MH.EndGame("Hunt Successfull!");
		else
			log(Self$" > Ending Game - TriggerObjective - MH == None");
	}
}
Like I said and I'm ignored, a Null MonsterHunt is subclassing this MonsterHunt2 and everything has no single problem, because MonsterHunt running is in fact MonsterHunt2 but master doesn't know this and browser is happily showing a MonsterHunt.
The rest of objects which are used or not by you I don't know what they do and if are purged properly - or not. Since you said that 3072 map screws Skaarj from next Maps, something IS NOT good there, because in my server this is never happening and I was playing like that tens of times maps one by one. Each Level in my environment is initialized with all default properties and nothing from previous map as long as those modifications are not saved in any INI file for being loaded later.

Re: Server falls asleep after Game end

Posted: Sat Dec 31, 2016 10:30 pm
by EvilGrins
Well clearly it was very tired.

Re: Server falls asleep after Game end

Posted: Sat Dec 31, 2016 10:38 pm
by Barbie
Aldebaran wrote:You have changed the SBMutFixTeleportersURL mutator lately
I have a version that is integrated in my base mutator, so I don't run that Mutator. Furthermore it happens on maps without a travelling teleporter.
Aldebaran wrote:What should happens next (after your log ends)?
Usually the result of MapvoteLA13 is shown. Either
PlayerXXX has voted for MH-City(v3)
ProcessServerTravel: MH-City(v3).unr?game=BarbiesWorld.MonsterHunt
or
GetRandomMap() configured for List 1 took the random map: 22 MH-D1:1
ProcessServerTravel: MH-D1.unr?game=BarbiesWorld.MonsterHunt
Aldebaran wrote:The mapvote opens it window? Perhaps a mapvote problem?
No, as I wrote, clients are disconnected instantly. But I'll have a look at that mapvote, thanks for that hint.
Aldebaran wrote:Has it to do with specific maps or can it happen with every map?
I did not find any systematics yet and so I cannot reproduce the issue. It happens here and there...
sektor2111 wrote:Super.Touch ??? What is this for ?
It is the code that was originally in "exmhend" but is now executed in parent class. I'm not a friend of useless duplicating code.
sektor2111 wrote:That log ? Purpose ? More useless connections ?
I don't know what you are referring to: the warnings I added in TriggerObjective() or my logging system with "logger()"? Anyway, the purpose of both is that I want to be able to see what happened by reading the logs.
sektor2111 wrote:I found maps with end bStatic
Ah, a nice idea to have an initial report of Actors with Actor.bStatic != Actor.Default.bStatic.
sektor2111 wrote:Like I said and I'm ignored, a Null MonsterHunt is subclassing this MonsterHunt2
Of course not ignored... ;o)

Code: Select all

class MonsterHuntSB expands TeamGamePlus config(BarbiesWorld);
class MonsterHunt expands MonsterHuntSB;
sektor2111 wrote:as long as those modifications are not saved in any INI file
All essential INI files are write protected. This write-protecting-command is executed every time the server starts.

Re: Server falls asleep after Game end

Posted: Sat Dec 31, 2016 11:40 pm
by Aldebaran
Perhaps you can remember when the first time this issue occured. Have you changed something short time before? In server configuration or in code? When you can remember this it could help...

Re: Server falls asleep after Game end

Posted: Sun Jan 01, 2017 11:44 am
by UTPe
Hi Barbie,
maybe you have to turn off ngstats from ut99 by nulling these params into your UnrealTournament.ini file, see if it works:

[Engine.StatLog]
LocalBatcherURL=
LocalBatcherParams=
LocalStatsURL=
WorldBatcherURL=
WorldBatcherParams=
WorldStatsURL=
LocalLogDir=
WorldLogDir=
bWorldBatcherError=False
bLogTypingEvents=False



cheers,
Pietro

Re: Server falls asleep after Game end

Posted: Sun Jan 01, 2017 4:20 pm
by Barbie
UTPe wrote:maybe you have to turn off ngstats from ut99
...
[Engine.StatLog]
...
I have never touched these, yes. Looking at that names I guess this is intended for collecting statistics locally ("LocalBatcher") and remote ("WorldBatcher"). If so: Is a remote receiver still available at all?

Re: Server falls asleep after Game end

Posted: Sun Jan 01, 2017 7:49 pm
by UTPe
Barbie wrote:If so: Is a remote receiver still available at all?
As far as I know, ngstats service closed many years ago, so nowadays you can use it only locally.

Re: Server falls asleep after Game end

Posted: Fri Jan 20, 2017 5:24 am
by Barbie
I did changes in UnrealTournament.ini as suggested:
UnrealTournament.ini
[Engine.StatLog]
LocalBatcherURL=
LocalBatcherParams=
LocalStatsURL=
WorldBatcherURL=
WorldBatcherParams=
WorldStatsURL=
LocalLogDir=../Logs
WorldLogDir=
bWorldBatcherError=False
bLogTypingEvents=False
; (nothing else)

[Engine.GameInfo]
bExternalBatcher=False
bLocalLog=True
bWorldLog=False
bBatchLocal=False
...

[IpServer.UdpServerQuery]
GameName=ut
; (nothing else)
but the problem remains.

I read something about MapvoteLA13 and noticed the fix list:
* Fixed: If noone voted sometimes the server got stuck (if repeatlimit was > 0)
Oh well, I have a guess... :omfg:

Re: Server falls asleep after Game end

Posted: Mon Apr 24, 2017 7:41 pm
by Barbie
A bump here: Usually that No-Server-Response-on-Game-End happened all 1-2 days (estimated all 10 games). Since I changed from "MapvoteLA13" to "MapVoteULv1_2" at 19 April, that problem has not occurred any more... Knock on wood

Re: Server falls asleep after Game end

Posted: Tue Apr 25, 2017 6:35 am
by sektor2111
A note for MapVoteLA types.
There is that fart counting time for an empty server. If server is empty/not_empty, that thing which is running a SIMULATED function has no logic. This job is Server Authoritative and why should it work SIMULATED (client too) ? Is one of those lousy codes which I did not see fixed in any post LA13 releases... not to mention that can be counted using STATE code, not timer... I think that Pawn.AdjustAim running simulated does damage as well like that teleporterfix which it's crashing form the same simulated reasons (by running it only in server it doesn't do any damage - I'm not using it for A.I. reasons). At current stage I have it... not simulated, and game-server runs properly. Yeah, I have conformed "Engine.u" with another one "completed" with some stuff...

I could figure that thing in MapVote(s) by mistake, looking through stuff because it was not in intention to do more changes but I see that MapVote needs more changes...

The strawberry from cake:
MapVoteLA13 is a corrupted package after all. Check it by using "UCC PackageFlag MapVoteLA13.u" command and see what's happening... Client new comer with no files, it's crashing at decompressing/moving this bullshit. So to speak a new client needs to load this server-stuff inside the client-game for not crashing at file handling deals due to super duper protections used...

Re: Server falls asleep after Game end

Posted: Tue Apr 25, 2017 1:35 pm
by Barbie
Too early happy... Just the same No-Server-Response-on-Game-End occurred yesterday... :cry:
sektor2111 wrote:Check it by using "UCC PackageFlag MapVoteLA13.u" command and see what's happening...
above command wrote:Bad name index -344257/906

History: ULinkerLoad<<FName <- (LinkerLoad Transient.LinkerLoad4 3)) <- TagName <- FPropertyTag<< <- (After ListClass) <- LoadStream <- (Count 0) <- UStruct::SerializeTaggedProperties <- (None[-1]) <- UObject::Serialize <- (TextBuffer MapvoteLA13.WRI.ScriptText) <- UTextBuffer::Serialize <- (TextBuffer MapvoteLA13.WRI.ScriptText) <- LoadObject <- (TextBuffer MapvoteLA13.WRI.ScriptText 3==3/1398660 0) <- ULinkerLoad::Preload <- PreLoadObjects <- UObject::EndLoad <- UObject::LoadPackage <- UPackageFlagCommandlet::Main

Exiting due to error
:shock:

Re: Server falls asleep after Game end

Posted: Tue Apr 25, 2017 8:13 pm
by rjmno1
Well so far as i know it got something todo with the windows settings also.
You can edit your power management in the configuration settings when windows goto asleep set to never, and your monitor goes to sleep set also to never.
So your windows canot sleep again i think that that problem is solved now forever.
Especialy when you running a ut 99 server,when the server runs it canot goto asleep as well.
Maby this helps.Power management in control panel.

Re: Server falls asleep after Game end

Posted: Tue Apr 25, 2017 9:52 pm
by Barbie
rjmno1 wrote:Well so far as i know it got something todo with the windows settings also.
*cough* That server is running on Linux in a shared environment.