The Unreal Admins Page - Forums

The Unreal Admins Page - Forums (https://unrealadmin.org/forums/index.php)
-   UT2003/4 Server - Linux Specific (https://unrealadmin.org/forums/forumdisplay.php?f=107)
-   -   Switching Map breaks WebAdmin (https://unrealadmin.org/forums/showthread.php?t=27572)

Nacsiar 28th September, 2008 06:16 PM

Switching Map breaks WebAdmin
 
Hi.

When switching map, the WebAdmin interface stops functioning. I believe it's due to a failure binding the port to listen on, as shown by this line in the log:
Code:

WebServer DM-1on1-Albatross.WebServer (Function UWeb.WebServer.BeginPlay:0227) BindPort: bind failed
different ports doesn't help, so I'm guessing WebAdmin is opening a new instance before the old one finishes up. Is there any way to fix/prevent this from happening?

Thanks.

ARsEnAl51 28th September, 2008 07:03 PM

What ports are you using for the game server and webadmin? Try changing the webadmin port to something random (like 1337) and see if it helps.

Wormbo 29th September, 2008 09:44 AM

Sounds like a bad mod that holds on to some references it shouldn't, thus preventing the previous level (including the web server) from shutting down at map change.

Does it only happen when switching away from a certain map? Try disabling all your mods and switch them on again one at a time.

Nacsiar 29th September, 2008 04:24 PM

It's happening when moving away from DM-Antalus. I haven't tried moving away from another map yet.

I use a bash script to run my server (server-init). Heres what it contains:
Code:

#!/bin/bash
./ucc-bin-linux-amd64 server DM-Antalus?game=XGame.xDeathMatch?mutator=XGame.MutInstaGib ini=UT2004.ini log=ut2004log.log -nohomedir

This is the contents of ut2004log.log. I load the server, login to the WebAdmin then switch maps:
Code:

Log: Log file open, Mon Sep 29 16:15:29 2008
Init: Name subsystem initialized
Init: Version: 3355 (128.29)
Init: Compiled: Feb 21 2005 05:31:57
Init: Command line: DM-Antalus?game=XGame.xDeathMatch?mutator=XGame.MutInstaGib ini=UT2004.ini log=ut2004log.log -nohomedir
Init: (This is Linux64 patch version 3355.0)
Init: Character set: Unicode
Init: Base directory: /home/scan/ut2004serv/System/
Init: Ini:UT2004.ini  UserIni:User.ini
Init: Build label:  Build UT2004_Build_[2005-02-15_17.02]
Init: Object subsystem initialized
Log: Executing Class Engine.ServerCommandlet
Log: Browse: DM-Antalus?Name=Player?Class=Engine.Pawn?Character=Jakob?team=255?game=XGame.xDeathMatch?mutator=XGame.MutInstaGib
Log: Collecting garbage
Log: Purging garbage
Log: Garbage: objects: 36637->36631; refs: 417241
Log: Game class is 'xDeathMatch'
Log: Fixing up DM-Antalus
Log: Bringing Level DM-Antalus.myLevel up for play (20) appSeconds: 5.465082...
ScriptLog: Loading Admins & Groups
ScriptLog: Kick and Ban Privileges Loaded
ScriptLog: Maps & Game Privileges Loaded
ScriptLog: Admins & Groups Management Loaded
ScriptLog: Extra Privileges Loaded
ScriptLog: Mutators XGame.MutInstaGib
ScriptLog: GameInfo::InitGame : bEnableStatLogging False
ScriptLog: UdpServerQuery(crt): Port 7787 successfully bound.
Log: Resolving master0.gamespy.com...
ScriptLog: MasterServerUplink: MasterServerGameStats not found - stats uploading disabled.
Log: Defaulting to false
Log: Defaulting to false
Log: Resolving ut2004master1.epicgames.com...
WebAdmin: Loading Available Maps
WebAdmin: Loading Game Types
WebAdmin: xWebAdmin.UTServerAdmin Initialized on port 1337
Log: MasterServerUplink: Resolved ut2004master1.epicgames.com as 216.27.56.6.
Log: Resolved master0.gamespy.com (207.38.11.174)
ScriptLog: UdpGameSpyUplink: Master Server is master0.gamespy.com:27900
ScriptLog: UdpGameSpyUplink: Port 7788 successfully bound.
Log: MasterServerUplink: Connection to ut2004master1.epicgames.com established.
Log: Approval APPROVED
Log: Master server requests heartbeat 0 with code 9444
Log: Master server requests heartbeat 1 with code 9444
Log: Master server requests heartbeat 2 with code 9444
Log: Master server assigned our MatchID: 0
ScriptLog: ProcessServerTravel: DM-1on1-Trite?game=XGame.xDeathMatch?mutator=XGame.MutInstaGib
ScriptLog: PreClientTravel
Log: Server switch level: DM-1on1-Trite?game=XGame.xDeathMatch?mutator=XGame.MutInstaGib
Log: Browse: DM-1on1-Trite?Name=Player?Class=Engine.Pawn?Character=Jakob?team=255?game=XGame.xDeathMatch?mutator=XGame.MutInstaGib
Exit: Socket shut down
Log: Collecting garbage
Log: Purging garbage
Log: (Karma): Level Karma Terminated.
Log: Garbage: objects: 43784->37845; refs: 433062
Log: Game class is 'xDeathMatch'
Log: Bringing Level DM-1on1-Trite.myLevel up for play (20) appSeconds: 30.957544...
ScriptLog: Loading Admins & Groups
ScriptLog: Kick and Ban Privileges Loaded
ScriptLog: Maps & Game Privileges Loaded
ScriptLog: Admins & Groups Management Loaded
ScriptLog: Extra Privileges Loaded
ScriptLog: Mutators XGame.MutInstaGib
ScriptLog: GameInfo::InitGame : bEnableStatLogging False
ScriptLog: UdpServerQuery(crt): Port 7787 successfully bound.
Log: Resolving master0.gamespy.com...
ScriptLog: MasterServerUplink: MasterServerGameStats not found - stats uploading disabled.
Log: Defaulting to false
Log: Defaulting to false
Log: Resolving ut2004master1.epicgames.com...
WebAdmin: Loading Available Maps
WebAdmin: Loading Game Types
WebAdmin: xWebAdmin.UTServerAdmin Initialized on port 1337
Log: WebServer DM-1on1-Trite.WebServer (Function UWeb.WebServer.BeginPlay:0227) BindPort: bind failed
Log: MasterServerUplink: Resolved ut2004master1.epicgames.com as 216.27.56.6.
Log: Resolved master0.gamespy.com (207.38.11.174)
ScriptLog: UdpGameSpyUplink: Master Server is master0.gamespy.com:27900
ScriptLog: UdpGameSpyUplink: Port 7788 successfully bound.
Log: MasterServerUplink: Connection to ut2004master1.epicgames.com established.
Log: Approval APPROVED
Log: Master server requests heartbeat 0 with code 28288
Log: Master server requests heartbeat 1 with code 28288
Log: Master server requests heartbeat 2 with code 28288
Log: Master server assigned our MatchID: 0
Log: CTRL-C has been pressed.

Log: appRequestExit(0)
Exit: Preparing to exit.
Log: Purging garbage
Exit: Game engine shut down
Log: (Karma): Level Karma Terminated.
Exit: Socket shut down
Log: Garbage: objects: 40266->0; refs: 433062
Exit: Object subsystem successfully closed.
Exit: Exiting.
Log: FileManager: Reading 0 GByte 55 MByte 108 KByte 41 Bytes from HD took 0.828690 seconds (0.311607 reading, 0.517083 seeking).
Log: FileManager: 0.000000 seconds spent with misc. duties
Uninitialized: Name subsystem shut down
Uninitialized: Allocation checking disabled
Uninitialized: Log file closed, Mon Sep 29 16:16:15 2008

I am aware the server is somewhat out of date. The newest version gives me "Error closing socket" spam so I downgraded. System is x64 Ubuntu Server.

Wormbo 29th September, 2008 04:27 PM

Have you tried the 32bit version already?

Nacsiar 29th September, 2008 04:31 PM

The 32-bit version doesn't work for some reason:

Code:

scan@knuckles:~/ut2004serv/System$ ./ucc-bin
bash: ./ucc-bin: No such file or directory
scan@knuckles:~/ut2004serv/System$ ls ucc-bin*
ucc-bin  ucc-bin-linux-amd64  ucc-bin-macosx
scan@knuckles:~/ut2004serv/System$


ARsEnAl51 29th September, 2008 07:05 PM

Have you checked the permission for the file?

Nacsiar 30th September, 2008 02:01 AM

Code:

scan@knuckles:~/ut2004serv/System$ ls -l ucc-bin*
-rwxr-xr-x 1 scan scan  9231832 2005-02-20 11:27 ucc-bin
-rwxr-xr-x 1 scan scan 12868904 2005-02-21 11:42 ucc-bin-linux-amd64
-rw-r--r-- 1 scan scan 14133896 2004-11-23 11:15 ucc-bin-macosx

Nothing out of the ordinary in the relevant files, it seems (unless I'm mistaken, which I could be)

Edit: Okay, I decided an edit might be a bit cleaner than a double post, so I'll just update my progress. ucc-bin was failing miserably because 32-bit compatibility wasn't installed. Whoops! Incase anyone has the same problem, this can be fixed with:
Code:

sudo apt-get install ia32-libs
On Ubuntu Server.

ucc-bin does not seem to have the same problem as ucc-bin-linux-amd64. I can use this for now, but it's still kind of disappointing that it doesn't work 64-bit..

The_IMMortal 9th June, 2010 04:18 PM

Bumping an old thread :/ .

Anybody found a solution for this? Seems like x64 ucc-bin has this issue.
Any fix applied yet?

Wormbo 21st June, 2010 08:38 AM

And it works in 32bit mode?

The_IMMortal 9th July, 2010 09:26 AM

Yes, it does.
Installed some 32 compat-libs and it works. But in x64, no luck so far.

Wormbo 10th July, 2010 08:35 AM

If it works in 32bit mode then stick with it. The only real advantage of 64 bit mode is that the server may use more than 2GB (or 4? not sure about Linux, on Windows it's 2) of RAM, but then again all pointers are twice the size, so the server will require more RAM compared to the 32 bit version.

pd_ 5th October, 2010 06:56 AM

Sorry for bumping. I noticed the same problem - WebServer unable to bind its port - but I'm not using 64bit, in fact, it's certain that my mod is causing the issue.

Code:

Log: WebServer AS-Osaka.WebServer (Function UWeb.WebServer.BeginPlay:0227) BindPort: bind failed
netstat reports that the port is still being listened, so I guess it's exactly what Wormbo stated here:
Quote:

Originally Posted by Wormbo
Sounds like a bad mod that holds on to some references it shouldn't, thus preventing the previous level (including the web server) from shutting down at map change.

What kind of leftover references would be responsible for this?

I do hook myself into the GameStats class in order to track game events, creating my custom GameStats class instance when the match starts and passing all function calls to the original GameStats if present.

I will try cleaning the references it uses later on today, I just wanted to ask for maybe other ideas here, other admins and mod authors might find this useful.

EDIT:
My fix didn't work, I still have the BindPort failure, so the question remains: what kind of references could prevent the game from shutting down the webserver?

EDIT #2:
Solved by resetting a static reference to the Mutator to None upon server travel.

zavateandu 3rd January, 2012 07:13 AM

i have the same problem
what u mean by

resetting a static reference to the Mutator to None upon server travel.

please explain what i have to do and where to change

Wormbo 3rd January, 2012 09:48 AM

He probably assigned an actor from the current level to a default class property somehow and fixed his problem using the Mutator.ServerTraveling() event.
The engine only cuts the "referencing tree" at the level, so if another reference to an actor from that complex construct is created, the entire level is still referenced and won't be garbage-collected on map change.


All times are GMT +1. The time now is 07:40 PM.

 


All pages are copyright The Unreal Admins Page.
You may not copy any pages without our express permission.