Redirect Problems (strange problems)

Discussions about Servers
Post Reply
User avatar
Wildcard
Average
Posts: 50
Joined: Fri Sep 09, 2011 9:06 pm
Personal rank: Admin Wizard
Contact:

Redirect Problems (strange problems)

Post by Wildcard »

Hello everyone,

I have an unusual problem it seems and I am looking for some help or insight on what kind of strangeness is going on with this redirect I have been using reliably for years and now over the past 2 months players have been noticing weird problems.

I have identified a problem I absolutely do not understand why is happening.

Here is what is happening when players connect to my servers. First, if needed the redirect server sends them a fast download of the file but the problem is for UNKNOWN reasons that file has foreign data in and that causes their game to see it as a mismatch and try to download directly from the server which is very slow or if I have turned off direct downloads which I have tried earlier this week they will get that connection failed: server refused to send file message. Anytime they try to reconnect to re-download the file then what happens is the redirect server sends them the file but this time it is perfect and has no foreign data in it and will be a fast download.

I need to find answers to this problem I studied the cache in a hex editor and notice that this foreign data seems to be inserted at the beginning of the file and somewhere into the file and at the end of the file. I have no idea what this small amount of data is or what it means but that's what keeps causing this download mismatch. Knowing there are some amazing people at ut99.org I have come in search of any insight about this and see if anyone here understands what it going on here. For now I leave you with the forensic material of my studies including screenshots of the files in the hex editor, a download link to the hex editor I use (freeware but be sure to dodge the tool bar and spam offers if present) and the two files I have examined. I will see if I can make any sense of this myself in the meantime.

After studying this problem many times it's like this in layman's terms.

1. First download goes fast but always fails.
2. Once the first download fails it will then re-download very slowly when this happens RECONNECT to get a fast good download.
3. Rinse and repeat for every download.

Start of file
Image
DIRECT LINK TO FULL UN-CROPPED .PNG SCREENSHOT


In the file.
Image
DIRECT LINK TO FULL UN-CROPPED .PNG SCREENSHOT


End of file
Image
DIRECT LINK TO FULL UN-CROPPED .PNG SCREENSHOT


Cache I investigated
http://gauntletwarriors.com/Downloads/R ... /Cache.zip

Hex Editor I used (freeware)
http://mh-nexus.de/en/hxd/
Image
User avatar
papercoffee
Godlike
Posts: 10453
Joined: Wed Jul 15, 2009 11:36 am
Personal rank: coffee addicted !!!
Location: Cologne, the city with the big cathedral.
Contact:

Re: Redirect Problems (strange problems)

Post by papercoffee »

A better place for this is the "server" section. ;)

Moved!
JackGriffin
Godlike
Posts: 3774
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: -Retired-

Re: Redirect Problems (strange problems)

Post by JackGriffin »

This is usually caused by textual mismatch of the offending file. If that's the case then here is how to deal with it:

Say you want to redirect a file called Spinner.u. However in certain maps it is used by the mapper/coder as spinner.u or SPINNER.u. UScript has no case sensitivity but certain Linux based software running on redirects does. This creates a problems where the file SPINNER.u will be sent by the redirect and fail the checksum of the client, forcing a slower from-the-server download.

How to fix it: This idea originally was solved by Hermskii, and I've used it a thousand times since then. Identify your offending file then upload it several times to your server, renaming it each upload. In this case I would upload Spinner.u, then rename it Spinner1.u and upload it again until I had Spinner, Spinner1, Spinner2, Spinner3 on the redirect. Now manually rename the Spinner1 to SPINNER, Spinner2 to spinner, and Spinner3 to SpinnerEXTRA. That way if you need to account for another spelling variation you have an EXTRA on the redirect.

It's a real pain in the ass but it's how to deal with these. Get with any of the major server admins and I'm sure they can help you identify the big handful of these files that cause this regularly. Depending on your chosen gamestyle it can be more or less. MH has a lot of these, regular DM not so many.
So long, and thanks for all the fish
User avatar
Wildcard
Average
Posts: 50
Joined: Fri Sep 09, 2011 9:06 pm
Personal rank: Admin Wizard
Contact:

Re: Redirect Problems (strange problems)

Post by Wildcard »

Yes, case sensitive. I have read that many times in my research of redirect problems. I will try renaming it a bunch of times like you suggested and see what results I get. I will do it with the first file that downloads from the server. I manage the redirect through a FTP client (filezilla)
Image
JackGriffin
Godlike
Posts: 3774
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: -Retired-

Re: Redirect Problems (strange problems)

Post by JackGriffin »

Many times if you carefully look at your logs you can spot the proper case presentation for the redirect. I've done that and also opened the map in editor to look at the file and see how the mapper used it.
So long, and thanks for all the fish
Higor
Godlike
Posts: 1866
Joined: Sun Mar 04, 2012 6:47 pm

Re: Redirect Problems (strange problems)

Post by Higor »

Your redirect is editing the files sent.
Those 0x0D0A are newline characters, and the first screenshot doesn't contain the initial newline because it's the first characters in the file.
This means it's not a new transfer protocol or smt, but rather intentional file editing.

On a different note.
With XC_Engine I have solved the case in map names to make usage of SwitchLevel and Open commands not break redirecting.
Never applied said fix to other packages because keeping all names the same across servers is a healthy practice.
Post Reply