• Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

Server Redirect Help

HappyTrueEvil

Grizzled Veteran
Apr 1, 2013
116
0
So ive recently got a web domain that I can put my compressed files for my redirect, problem is I am no good at website stuff so im not sure if im doing something wrong but here is my problem. I've compressed all the maps I have running on my server and uploaded them to the redirect site, problem is that when I clear my cache and try to down load the custom maps that I want to test its seems like the link is going fast then stops then picks back up, this is far different than the redirect that I had been using that just fly's through the down load, again im not to good with the web thing so I've put a regular indexing on to give the index page that is necessary, but the download is not smooth, how can I tell if its just the service or how im doing it? one big thing I notice, that I cant change, is on last redirect I was using when I pulled it up in browser and click on one of the files it would want to download it, on my redirect you click it and it just goes to a screen of garbage, almost like its set to just open it and not download it???


Any help please?
I can answer anyt questions.
 
...........
Double check you have enabled compression.......


do you mean check this on my redirect site? or server option (killingfloor.ini) because like I said the other shared redirect I was using worked fine I just compied and pasted new one that I have now, as far as enabling compressing on the url the only thing it will do is zip the uz2 files which will not make them work... I like the link you sent just wondering the catch , I have made a 5gb free site that uses same control panel but I guess I can try.... just bums me out that I finally have a place to upload my files without having to worry about someone overwriting them and causing mismatch errors.. and now its doesn't work as fast :(
 
Upvote 0
the download for a map/mut ect, will start then pause, then slowly start again, almost like its having trouble downloading, I need a way to tell if its setup right or if its just the speed I should expect from this domain.

Just put the url of the file directly into your browser and check the downloadspeed there. The speed ingame is usually a bit below what you'd get downloading it directly. For me, I don't use compression (because it's easier to maintain and not much faster in downloading anyway...) and host the files on the same server, where the kf-server runs on as well. You don't need a directory index on your webserver, it works just fine without. Just make sure that there are no inconsistencies regarding filenames (upper/lowercase). If you have access to it you can check the logfile if your client actually downloads the file from the webserver or just ignores the mirror there. (look for 404 errors)
 
Last edited:
Upvote 0
If i understand right, your web server is setup to display the contents of a file. It's not garbage, it would be the same as opening the file in notepad. You need to setup the web server to send the client uz2 files instead of displaying their contents. You can always right click and save as, if you want to see how fast it will download.

For me, I don't use compression (because it's easier to maintain and not much faster in downloading anyway...)

?? Without a redirect you're limited to about 10k/sec download speed. And when you have a 100MB file compressed to 50MB that's significant regardless of download speed.
 
Upvote 0
?? Without a redirect you're limited to about 10k/sec download speed. And when you have a 100MB file compressed to 50MB that's significant regardless of download speed.

If we're talking about files that big then yes, compression absolutely makes sense. The files i'm serving are quite small so it's not really a big deal for me.

Sidequestion, just out of pure curiosity... What do you guys use for compressing files? The two applications I tried back in the day where really painful to use.

@HappyTrueEvil: If you don't want to mess around with your webserver... Dropbox-Redirect is still working as far as I know and it's quite easy to set up and use.
 
Upvote 0
I use "ucc-bin compress". I download everything directly to my server. Then, compress everything on my server (linux).

The odd time I compress something on my machine (windows) I use "ucc compress"

Though I made a batch file/script so I just drop everything I want to compress into a folder and run the script.
 
Last edited:
Upvote 0
When the download stops, does it restart where it stopped or does it go back to 0% and downloads really slow?

If it goes back to 0% and downloads the same file a second time then the file on the web server is corrupted for whatever reason.

I would try compressing the files using ucc-bin or ucc.exe. If you get the same file, then check what method you are uploading the files.
 
Upvote 0
I wasn't aware that the ucc-bin binary can compress files... that's quite neat and fits nicely into my workflow. Thanks for the info!

Have a dirty 5 minute script. (no warranty etc etc "as is")

Code:
#!/bin/bash

UCCLOC=/home/steamy/killingfloor/server1/
OLD=`pwd`
UCC=./ucc-bin

cd $UCCLOC
for file in $@
do
        $UCC  compress $OLD/$file -nohomedir
        echo $PWD/$file
        #mv -v $file.uz2 $TEXRD
done

cd $OLD

Yes, I know it breaks with absolute paths.
(
 
Upvote 0
When the download stops, does it restart where it stopped or does it go back to 0% and downloads really slow?

If it goes back to 0% and downloads the same file a second time then the file on the web server is corrupted for whatever reason.

I would try compressing the files using ucc-bin or ucc.exe. If you get the same file, then check what method you are uploading the files.




I've still been trying to get this to work, the biggest difference from the redirects I have been using is that on them when you click the file in parent dir it prompts for download, when I click the file on mine its displays coded garbage, ive put full permissons on all files and dir, but still hasn't change it.
 
Upvote 0
I've still been trying to get this to work, the biggest difference from the redirects I have been using is that on them when you click the file in parent dir it prompts for download, when I click the file on mine its displays coded garbage, ive put full permissons on all files and dir, but still hasn't change it.

Maybe your webserver is case sensitive, use Wireshark to capture a network trace. Check in the HTTP request which file KF is requesting and if the webserver is returning "404" (not found).
If you don't know how to analyse the network trace please post here and then I'll help you.

PS. double checking, you have added a slash at the end of the URL right?
 
Upvote 0
I've still been trying to get this to work, the biggest difference from the redirects I have been using is that on them when you click the file in parent dir it prompts for download, when I click the file on mine its displays coded garbage, ive put full permissons on all files and dir, but still hasn't change it.

Add this to your .htaccess file.

AddType application/octet-stream .uz2
 
Upvote 0
Have a dirty 5 minute script. (no warranty etc etc "as is")

Code:
#!/bin/bash

UCCLOC=/home/steamy/killingfloor/server1/
OLD=`pwd`
UCC=./ucc-bin

cd $UCCLOC
for file in $@
do
        $UCC  compress $OLD/$file -nohomedir
        echo $PWD/$file
        #mv -v $file.uz2 $TEXRD
done

cd $OLD
Yes, I know it breaks with absolute paths.
(
 
Upvote 0
I was working on a more in depth script for compressing files on a Linux server, but stopped working on it once I found an all-in-one script for running a KF server. My script is still available for download at my site www.skillzservers.com in the downloads section, but I suggest giving Daniel Gibbs script a go.

http://danielgibbs.co.uk/lgsm/kfserver/

The only issue with his compression part of the script is that it only seems to compress maps and no other files. The script I was working on compressed every file in all the directories and omitted the default/stock files. It would also check to see if the file was already compressed in the destination and ignore it. I never finished it though.

I just wanted something to compress the files I gave it and my crude script works for that. Wasn't looking to do anything fancy or smart because unless its done perfect it often breaks stuff more than to helps. KISS xD

I've thought about complex scripting for stuff but honestly the cost/benefit ratio isn't there. Besides I have my own scripts for restarting servers etc (old versions may be posted here I forget). Most of the time when I look at others peoples stuff and I come to the conclusion that writing my own stuff is faster than modifying someone else's.
 
Upvote 0
Well my only response is you've never used his scripts and therefore you have no idea what you are missing. ;)

I can read bash just fine. xD

His script doesn't do anything I want it to do (or at least in a way I want it too or better than mine). I read it when I started my kf servers and I read it again just now. It still doesn't do what I want it to do. Not bashing (get it?) it but my own custom scripts do what I want from a script like that more.

I'm a picky Linux admin, I know what I want and I can code it. That's all.
 
Upvote 0
I mean that's cool. I wasn't aware that your script was setup to run it once and forget about it. Which IMHO is the best kind of scripts. I hate running multiple scripts in bash to get tasks done. Give me an all-in-one solution with cron.

I haven't logged into my servers shell in a while to monitor/fix any issues. They reboot everyday at 6AM and perform an update, email me the logs and then clear them so they don't take up valuable disk space on the server. Should the server go down it will be picked up in 30 minutes and restarted. I'll get an email anytime this happens. Generally it's the server running a ton of custom maps, it goes down a lot.

Installing a new server is easy as well; but then again I monitor/host over 25 game servers. So having automation in the scripts I run is a huge key. I don't have time to deal with each one individually all the time.
 
Upvote 0