Game Development Community

Connecting to linux -dedicated server from windows client

by Kevin Roe · in Technical Issues · 09/07/2006 (8:50 am) · 11 replies

I am assuming (since there was no mention of this anywhere in the docs) that it is possible to connect to a dedicated server running on linux from a windows client.
Server is running on Slackware 10, client is running Windows XP sp2.


Here is a log of what happens when the dedicated server is started up:

root@roia:/opt/TorqueDemo# ./demo.sh -dedicated -mission demo/data/missions/features.mis
Sleep latency: 19ms
%
--------- Initializing MOD: Common ---------
Loading compiled script common/client/canvas.cs.
Loading compiled script common/client/audio.cs.
%
--------- Initializing MOD: Torque Demo ---------
Loading compiled script demo/client/init.cs.
Loading compiled script demo/server/init.cs.

etc etc.....(post was too long, sorry)

*** LOADING MISSION: demo/data/missions/features.mis
*** Stage 1 load
*** Stage 2 load
Executing demo/data/missions/features.mis.
*** Mission loaded
Mission Type: DemoScene
Engine initialized...

Even though it encountered script errors, it seems to load at this point. Connecting from another linux box (Mandrake 9.2) running in a virtual machine inside the windows xp box does connect to the server, so I don't believe its a firewall issue (have opened ports 28000-28010 on the router as well as 1031,1048). But when connecting with windows xp client, it does this:

Got Connect challenge Request from IP:216.xxx.xxx.xxx:64035 (I ommited the IP address for this posting)
Got Connect Request
Connect request from: IP:216.xxx.xxx.xxx:64035
CADD: 1231 IP:216.xxx.xxx.xxx:64035
*** Sending mission load to client: demo/data/missions/features.mis
Mapping string: MissionStartPhase1Ack to index: 0
Sending heartbeat to master server [IP:69.64.50.217:28002]
Received info request from a master server [IP:69.64.50.217:28002].

At this point the windows client crashes. Here is the relevant part of console.log from the client:

Engine initialized...
Got Connect challenge Response
Sending Connect Request
Connection established 1559
Mapping string: ServerMessage to index: 0
Mapping string: MsgConnectionError to index: 1
Mapping string: MsgLoadInfo to index: 2
Could not locate texture: demo/client/ui/arrows/exit_d
....a bunch more of these Could not locate texture errors.
Mapping string: MsgLoadDescripition to index: 3
Mapping string: MsgLoadInfoDone to index: 4
Mapping string: MsgClientJoin to index: 5
Mapping string: ♥Welcome to the Torque demo app %1. to index: 6
Mapping string: ►♀Poser◄ to index: 7
Mapping string: MissionStartPhase1 to index: 8
*** New Mission: demo/data/missions/features.mis
*** Phase 1: Download Datablocks & Targets
Sending request for file demo/data/sound/takeme.wav (what is this?)

This is it. It stops right here. Then the server spits out this:

Client 1231 timed out.
Issuing Disconnect packet.
CDROP: 1231 IP:216.xxx.xxx.xxx:64035
Resetting server defaults...
Missing file: common/defaults.cs!
exec: Warning! Found a DSO from the future! (common/prefs.cs.dso)
Compiling common/prefs.cs...
Loading compiled script common/prefs.cs.
*** ENDING MISSION

Any help in this regard would be greatly appreciated. Glad to see the linux community coming out to bat.
-=Kevin

#1
09/07/2006 (9:25 am)
Kevin

the first step is : check if you server is visible from "outdise" for that use the method below :

eviwo.free.fr/torque/multiplayer.html

if your server is not visible in the list of server on the web site : solve this issue before to investigate futhermore.
#2
09/07/2006 (10:56 am)
When I start up the windows client, and run the fps demo mission, my server does show up on the list of available servers when i click 'query master'. Also the server shows up on master list when i follow your link and check the master list monitor. As I said, I don't believe this is a firewall issue. It appears that the server is sending something the client doesn't like, so the client application crashes.
#3
09/07/2006 (11:53 am)
Kevin

it is the first step

I read in the log "Client 1231 timed out." The tests below will confirm or not your issue.


second step : run the demo mission and host the game on "windows".

And check on the web site if your "hosted game" is visible from the web site.
I know that it is not your target configuration but this test will confirm that the issue does not come from the windows client.


An other way to test the client connection is to do a ping in a console from linux to the ip adress of the windows client.
#4
09/08/2006 (8:45 am)
The reason that the client is timing out is that the windows client crashes while its loading the mission data. This happens within 1-2 seconds after the client ui opens. The timeout does not come until a few seconds later on the server. Sorry, it looks like by my post that the crash is happening afterwards. I can run the demo on both machines and start a server, which are both seen by the master server. The problem is connecting to the linux instance from windows xp client. If I run linux inside the windows xp machine (using VMWare) and run the linux version of the client to connect to the game, it connects just fine. Since the virtual machine and the host windows box are sharing the same network interface and IP address, then it seems most likely there is some issue with the routine that is negotiating the connection and passing mission data. When the windows client first opens and the progress bar comes up and says loading mission data, the window almost immediately disappears (I'm assuming a crash here). I have on a couple occassions seen a bad packet error in the log on the windows client also.
#5
09/08/2006 (9:00 am)
We ran into a similar issue as well, where the windows client would crash upon connecting to the Linux server and occasionally vice versa. I'll have to look at our dev notes to see what the fix was. But if I recollect it had something to do with the Linux server sending a NULL packet to the windows client, and the windows client couldn't handle it.
#6
09/08/2006 (11:01 am)
Kevin

you use "query lan" to connect to the linux dedicated server ?

have you try to connect to your linux dedicated server form a pc which is not connected to the same network interface ? I mean a test with one of your friend who is connected to the web in an other place with a torque client provided by you ?
#7
09/08/2006 (11:12 am)
Yep if it's running on your Lan Querying the Lan works good.
#8
09/11/2006 (10:34 am)
The 2 machines are not on the same LAN. Both machines happen to be in the same physical location but are not a part of the same network. From the FPS demo I am clicking on 'query master server' and it IS listing the server as an available one to connect to. Once i try to connect to it though the client crashes. I am curious as to how you fixed this issue of the NULL packet, as it sounds like that might be the problem I am experiencing.
#9
09/11/2006 (12:18 pm)
We fixed the NULL packet error by moving our codebase completely from 1.4 and 1.4.2 to whatever it is thats currently in CVS HEAD.
The Linux binary installer for 1.4.2 did NOT like windows clients connecting to it for some reason, and the windows clients would choke on the NULL packet and die. :(
#10
07/16/2007 (5:40 pm)
I am curious how to fix this issue of the NULL packet.
#11
07/28/2007 (10:34 am)
Quote:Even though it encountered script errors, it seems to load at this point.
I had some problems with Windows XP vs Linux. My Linux box would run even with script errors and windows would crash, only when i fix all my errors did windows XP work