http redirects and Win2K server


([xor]Syren) #1

I run a pure, dedicated server that uses several custom maps and campaigns (each new campaign I build has a different version number). Instead of having players download from the server, I have the files hosted and redirect them. This works fine for the most part, but occasionally, somone will connect and start to download a map and the application crashes (goodbye xp!). I’ve looked through all the log files, but nothing shows up that I can see. The server runs like a champ if I turn the redirects off. Any ideas what might cause this behavior? I’ll be glad to furnish any other info that might lead to a solution.

By the way, these forums are great. I’ve usually been able to do a search for any info I need and find it. Keeps me coming back… Well, that and this --> :moo: hehehe

Server Info:
JRO’s Liquor Cabinet
192.108.21.44


([xor]Syren) #2

Well, if anyone’s curious, I set the fallback URL to the same IP as the initial redirect and that seems to have fixed the issue. Who knew…


(TTimo) #3

you’re saying that the server is crashing, right?
you don’t know what is happening to the client otherwise?

the fallback url is supposed to be used when the client reports that it can’t download … it is then redirected to a simple URL with the web browser.


([xor]Syren) #4

Yah, I would watch the server console when someone connected who didn’t have the maps or camgaign files. The console would go crazy and then the app would randomly shut down (giving basically a memory error in the Event log). Since setting the fallback URL to the same IP, there hasn’t been a crash.


(TTimo) #5

I looked through the fallback url code, but I don’t see how it could cause a crash, specially based on the value (it only really cares if it’s empty or not).

However, if you get a +set developer 1 +set logfile 2 log of the crash server side. I’d be interested to give it a look (email to ttimo@idsoftware.com)


(Lekdevil.NL) #6

Syren, could you also post your server.cfg file (minus the passwords, of course)? With that, I could try to replicate the error on a Win2K and on a Linux server.

Thanks!


(TTimo) #7

yeah if we get more chances to reproduce, we might find a fix.

quick question actually. How many people are using the http/ftp downloads? Server wise and client wise? Do you know many server admins who use it? Any things you’d like to comment about it?


(Lekdevil.NL) #8

IMHO it’s the best new server-side feature in a Q3-type engine ever. The servers I know that are using it are Timelord and the BoD clan server, but there are probably many more.

My comment would be that due to a lack of specific documentation, http/ftp redirect is a lot trickier to set up than it ought to be. I think that a description of what all the relevant cvars do and of how to set up the directory structure on the http/ftp server, would help immensely in getting this feature a wider acceptance. Just my 0.02, of course.


(TTimo) #9

actually, I wrote some docs for them in the sample server.cfg
but it never made it to the general readme
it doesn’t mention that you can put ftp or http urls with login and pass. I’ll try to put together an item on the linux faq about it.

set sv_maxRate “13000” // 10000 standard but poor for ET
set sv_dl_maxRate “42000” // increase/decerease if you have plenty/little spare bandwidth
set sv_allowDownload “0” // global toggle for both legacy download and web download
set sv_wwwDownload “0” // toggle to enable web download
set sv_wwwBaseURL “” // base URL for redirection
set sv_wwwDlDisconnected “0” // tell clients to perform their downloads while disconnected from the server
set sv_wwwFallbackURL “” // URL to send to if an http/ftp fails or is refused client side


(Lekdevil.NL) #10

Thanks, that would be great!

Oh, and there is one other thing that I’m curious about: when connecting to a server that has a couple of custom maps, the client will download all custom .pk3 files and not just the one that’s currently running on the server. I’m wondering if this is a bug or a feature… IMHO, the client should only download the one .pk3 file (and download the next when the map changes, and so on).

Any ideas?


(TTimo) #11

The pk3s being downloaded are the ones in the pure list (try cvarlist pak to get an exact list on the server).

I think it’s by design, all the pk3s in the base game are added to the pure list. If you want to download only the current pk3, run the server with +set fs_game mymaps or so, and it will only flag the active pk3 (it’s like a mod with no code)


(Lekdevil.NL) #12

Oh, and I found a bug in the client-side http download code (or so I think).

When the client gets redirected to a server that is not listening on port 80 and returns a TCP ACK/RST as a response to the client’s TCP SYN packet, the ET client does not abort the download attempt but just keeps on trying to connect. While this happens, the music and animation on the client starts to stutter. Some people have reported crashes as well.

I’ve got a network trace dump of the traffic between client and servers, if needed.

Thanks!


(Lekdevil.NL) #13

Hmmm… I’ll try that. But if there’s any chance to get this behavior changed in the 2.56 patch, I’d strongly advise them to do so (I don’t know if you have any saying in that). Imagine for instance a server that has 20 custom maps on it but that only has two of them in rotation. Any client connecting to that server would first have to download all those 20 maps to be able to play on the server. I think this undermines the intent of the auto-download feature (i.e. hassle-free no-brains connect-and-play functionality). Changing the fs_game cvar would only be a workaround for modless servers, it seems, and would clutter the list of game types in game browsers…

Danke!


(TTimo) #14

No. You put the 20 pk3s in mymaps/ instead of etmain/, you run the server with +set fs_game mymaps, and only the current pk3 will be in the pure list.

If there’s a mod, you put the additional pk3s together with the mod. If you have several mods … I guess you need to copy the files around or use symlinks on a decent OS :wink:

The current design won’t change for next patch, it would affect etmain/ too much. I can’t say I like the fact that all pk3s in etmain/ are on the pure list, but afaik that’s the case in q3 and rtcw also. The developers are used to work with this scheme, as it makes it easy to release incremental patches by dropping in a new pk3.


(Lekdevil.NL) #15

Well, I don’t think the fact that every .pk3 file in etmain gets on the pure list is the issue (at least not the one I’m on about), it’s the fact that every map that’s on the pure list and that client does not already have, gets downloaded to the client, and not just the single map that is currently loaded on the server.

But forgeddaboutdat for a moment, as I doubt this will change in the upcoming patch anyway…

To get this thread back on topic: I think I’ve found the pattern that causes the server to crash when redirecting downloads (i’ve sent you an email as well, but perhaps some other server admins can verify). It looks like the server crashes when the following conditions are met:

  1. The server has both sv_allowDownload and sv_wwwDownload set to “1”, and sv_wwwDlDisconnected set to “0”
  2. The “etmain” folder on the server contains a map .pk3 file that the client does not have
  3. The map .pk3 file is not present in the location pointed to by sv_wwwBaseURL/etmain

When a client connects to the server under these conditions and tries to download the .pk3 that is not present on the web server, the ET server crashes. This is not a very uncommon situation: if a server admin adds a new .pk3 to the ET server directory but forgets to upload the same file to the web server, the error condition is created. Note that the sv_wwwDlDisconnected must be set to “0” for the crash to occur (at least on my test system).

Can anyone try this and see if they come up with the same results?

Thanks!


([xor]Syren) #16

Hey guys, sorry I haven’t replied in a bit – been out on vacation. Here’s a copy of my server.cfg file:

==================
set dedicated “2” // 1: dedicated server for lan 2: dedicated server for internet
// set net_ip “” // set to override the default IP ET uses
// set net_port “27960” // set to override the default port ET uses

// Public Information
// Edit the items in quotes
set sv_hostname “^QJRO^7’s Liquor Cabinet”
set g_motd “^7Have a drink and have fun”
sets “Administrator” “^7[^Qxor^7]”
sets “Email” "etadmin@xor.com"
sets “Location” “Boulder”
sets “Connection” “Big ole Pipe”
sets g_needpass “0”

// Server Information
sets “URL” “http://et.xor.com

// PASSWORDS & CLIENTS

set sv_maxclients “30” // number of players including private slots
set g_password “” // set to password protect the server
set sv_privateclients “0” // if set > 0, then this number of client slots will be reserved for connections
set sv_privatepassword “” // that have “password” set to the value of “sv_privatePassword”
set rconpassword “" // remote console access password
set refereePassword "
” // referee status password
seta sv_fps “30”

// DL, RATE

set sv_maxRate “13000” // 10000 standard but poor for ET
set sv_dl_maxRate “42000” // increase/decerease if you have plenty/little spare bandwidth
set sv_wwwDownload “1” // toggle to enable web download
set sv_wwwBaseURL “http://192.225.42.239” // base URL for redirection
set sv_wwwDlDisconnected “0” // tell clients to perform their downloads while disconnected from the server
set sv_wwwFallbackURL “http://192.225.42.239” // URL to send to if an http/ftp fails or is refused client side (if blank or set to 127.0.0.1 would cause the crash)

// MOTD ETC

set sv_hostname “^QJRO^7’s Liquor Cabinet” // name of server here
set server_motd0 " ^MBottom’s Up!^7" // message in right corner of join screen here
set server_motd1 " "
set server_motd2 “Spawn Campers get kicked”
set server_motd3 " "
set server_motd4 “Have a drink and have fun”
set server_motd5 " ^7[^Qxor^7]"

// Teams settings
set team_maxPanzers “2”
set team_maxplayers “15”
set team_nocontrols “1”

// MISC SETTINGS

set g_heavyWeaponRestriction “20”
set g_antilag “0”
set g_altStopwatchMode “0”
set g_autofireteams “1”
set g_complaintlimit “6”
set g_ipcomplaintlimit “3”
set g_fastres “0”
set g_friendlyFire “1”
//set g_gametype “4” // Game type should be set from map rotation script
set g_minGameClients “8”
set g_maxlives “0”
set g_alliedmaxlives “0”
set g_axismaxlives “0”
set g_teamforcebalance “1”
set g_noTeamSwitching “0”
set g_voiceChatsAllowed “4”
set g_doWarmup “0”
set g_warmup “35”
set g_spectatorInactivity “300”
set sv_floodProtect “1”
set sv_allowDownload “1”
set sv_pure “1”
set sv_minping “0”
set sv_maxping “0”
set match_latejoin “1”
set match_minplayers “2”
set match_mutespecs “0”
set match_readypercent “100”
set match_timeoutcount “0”
set match_warmupDamage “2”
set team_maxplayers “0”
set team_nocontrols “1”
set pmove_fixed “0”
set pmove_msec “8”
set sv_cheats “0”
set g_inactivity “300”
set g_userAlliedRespawnTime “23”
set g_userAxisRespawnTime “23”
set g_landminetimeout “0” //landmines will dissappear when planter disconnects if set to 1.

//ShrubMod settings
set g_XPSave “5”
set g_goomba “2”
set g_spawnInvul “2”
set g_dropHealth “2”
set g_moverScale “2”
set g_forceLimboHealth “1”
set g_weapons “23”
set g_skills “6”
set g_slashKill “2”
set g_packDistance “3”
set g_censor “”
set g_dragCorpse “1”
set g_logOptions “7”
set g_teamDamageRestriction “35”
set g_shove “80”
set g_shoveNoZ “1”
set g_intermissionTime “30”
set g_privateMessages “1”

// IP Bans
set g_filterban “1”
set g_banIPs “”

// Server/Rcon LogFiles
set g_log “logs/JROrcon.log”
set logfile “2”
set g_logSync “0”

// LMS ONLY SETTINGS

set g_lms_teamForceBalance “1”
set g_lms_roundlimit “3”
set g_lms_matchlimit “2”
set g_lms_currentMatch “0”
set g_lms_lockTeams “0”
set g_lms_followTeamOnly “1”

// VOTING

set g_allowVote “1”
set vote_limit “5”
set vote_percent “60”
set vote_allow_comp “1”
set vote_allow_gametype “0”
set vote_allow_kick “1”
set vote_allow_map “0”
set vote_allow_matchreset “1”
set vote_allow_mutespecs “0”
set vote_allow_nextmap “0”
set vote_allow_pub “1”
set vote_allow_referee “0”
set vote_allow_shuffleteams “1”
set vote_allow_swapteams “0”
set vote_allow_friendlyfire “0”
set vote_allow_timelimit “1”
set vote_allow_warmupdamage “1”
set vote_allow_antilag “0”
set vote_allow_balancedteams “1”
set vote_allow_muting “0”

// Master Server List
set sv_master1 “etmaster.idsoftware.com
set sv_master2 “master.gamespy.com:27900
set sv_master3 “master0.gamespy.com
set sv_master4 “clanservers.net
set sv_master5 “eg.dynip.com

// PUNKBUSTER
// sv_punkbuster is a readonly variable. Use +set sv_punkbuster on command line or use the command pb_sv_enable in the console
//pb_sv_enable
//
//Use the section below for PB. The section above was the original left for reference sake.
//
// PunkBuster
set sv_punkbuster “1”
pb_sv_enable
PB_SV_LanMask “172.16.4”
exec pbadmin.cfg

// LOGGING

set g_log “etserver.log” // Game logging
set g_logsync 0
set logfile 0 // Console logging ( 1: enable 2: enable and sync )

// MAP ROTATION

exec campaigncycle.cfg // Campaign mode
//exec objectivecycle.cfg // Objective mode
//exec lmscycle.cfg // Last Man Standing mode

// WATCHDOG

// in case the game dies with an ERR_DROP
// or any situation leading to server running with no map
//set com_watchdog 10 // defaults 60
set com_watchdog_cmd “exec campaigncycle.cfg” // defaults to quit

=======================

And here is the .bat we use to call the dedicated server:

cd \Program Files\WolfET
ET.exe +set com_hunkmegs 512 +set com_zonemegs 56 +set sv_pure 1 +set dedicated 2 +set fs_game shrubmod +exec jro.cfg

======================

Since setting the fallback URL to the same IP, the machine has been up for about 6 straight days. We run 2 different campaigns with at least half of the maps in each being different custom built maps. Every client that connected would download all the .pk3’s in the server’s etmain that they did not already have (I only keep etmain updated with .pk3’s the server is currently running). Also, I was very careful to make sure that the web redirect had the exact same listing of .pk3’s