Game Development Community

Linux Dedicated Server Issues.

by Jace · in Torque Game Engine · 11/07/2006 (8:30 pm) · 16 replies

Problem:

./server.bin -dedicated -mission starter.fps/data/missions/stronghold.mis
Sleep latency: 3ms
Sleep latency ok, enabling dsleep for lower cpu utilization
Alert: Error Could not find a compatible OpenGL display resolution. Please check your driver configuration.
Exiting

-End

This box is a linux server in a data center. I am running these commands on a remote shell I am sure this server doesnt have a 3d accelerated video card so is there anyway around this?

Also why would you need video for a dedicated server?

-Jace

#1
11/07/2006 (9:12 pm)
Im a newb but if anyone has this issue it is because I failed to neglect the: -game option on the command line.

*Punches self.

-Jace
#2
11/26/2006 (11:02 am)
Be sure you compile your binary with:
make dedicated
command.
#3
01/16/2007 (1:37 am)
Running it with make dedicated provides:

[/home/torquetest/TorqueGameEngineSDK-Linux-1-5-0/example]% ./torqueDemod.bin -dedicated -mission starter.fps/data/missions/stronghold.mis
Sleep latency: 19ms
Alert: Fatal-ISV: (console/consoleFunctions.cc @ 765) Copy of Torque is already running; exiting.
Segmentation fault

A ps aux shows it's not running. But we've rebooted repeatedly anyway... Also cleared ~/.garagegames

Running headless with a ./torquedemo.bin -dedicated returns the same results Jace observed months ago.

I'm starting to wonder if this thing is really meant for primetime? We can't get headless servers running on either Linux or 2k3. Multiple machines, multiple OS versions/distros. We have a couple working clients, but nothing for them to talk to...

Clean compiles or out-of-the-box. [shaking head]

We're pretty rapidly losing momentum, but I do like the idea of using TGE rather than roll-our-own and/or exceedingly expensive engines. I'd like to give this one more day before we scrap it.

TIA for any pointers.

--- Jodie for InteractIM
#4
01/16/2007 (11:52 am)
Running the risk of sounding like an ass here.

but what does the debugger have to say about this?
it seems to me this should be a trivial problem to solve.

if you are willing to get your hands dirty, I am confident it would not take much to solve this issue.
#5
01/16/2007 (11:58 am)
At least it's some form of response, thanks! Starting to think I was invisible...

So basically you buy the package, fire-up GDB, and start shooting their bugs as a first course of action?

Ok - let's say we debug this bit and fix it. Are we going to be doing this at every turn? If that's the case, we'd be better-off writing our own engine where we know the code and have accountability, no?

LeSigh.

Anyway, not to drop this on you. Sincerely - thanks for you input!

--- Jodie
#6
01/16/2007 (12:22 pm)
Well, starting off looking at console/consoleFunctions.cc @ 765, you find a function quitWithErrorMessage.

Poking about, you find this particular one is being called in function initCanvas in canvas.cs, caused thus:
if( !%canvasCreate ) 
{
     quitWithErrorMessage("Copy of Torque is already running; exiting.");
     return;
}

Since this is a dedicated server, you should find that a canvas *shouldn't* be created. So you search your code for where initCanvas is being called, and you find it's always being called from the function initClient. Huh. Dedicated server, calling... initClient. Well, that's obviously not right.

So you scroll back, and find that in the function startServer, there's this code:
// Start up in either client, or dedicated server mode
   if ($Server::Dedicated)
      initDedicated();
   else
      initClient();

Evidently, something's amiss...

Have you actually tried searching through the code, and finding out what's going on yet?

Alternatively, Torsion's pretty good at this kind of thing. You might also find sticking a trace(true) right at the start of main.cs pretty helpful, since it'll show you what your stack looks like.

Gary (-;

PS FWIW, that error message is TOTALLY misleading, and you should ignore it except as a pointer to the piece of code where you should *actually* start looking for the problem.
#7
01/16/2007 (1:14 pm)
Looks like Gary has a good jump on things for ya.
Go Gary, Go!

heh, well honestly this is perhaps script related then?

the First step is to completely assess the problem.
if that requires using the debugger to pinpoint the issue.. then so be it.

it would not be the first time I have used the debugger to locate a script error (oops)

this stuff should be working it has years under its belt.
but whenever you come up with a situation like this, you need as much information around it as possible
to facilitate people helping you to solve it.

so sure you just bought it but this could be a new problem, best to find all related possibilities.

your best bet is indeed like Gary has shown, to analyze the code path used for the dedicated.

start at the scripts and move thru the path untill you see the hiccup you have.
once you know where the problem is you need only know why.
it is the fastest way to solve all problems code related.

if your new to this scripting language, and the whole project.
maybe now is the time to take a step back and look at the big picture.
and then roll up your sleeves and analyze how this project runs, and which direction the code goes.

hope this helps.
#8
01/16/2007 (2:07 pm)
Thanks, Gary and BadGuy.

I'm not trying to be pissy or unhelpful, promise! I'm frustrated to an extent, but not with the community and those trying to help. GG needs to bear the brunt of the frustration, I'm certain.


No, I hadn't installed Torsion. Evaluating the debugger wasn't the first thing on my list. ;-)

So - I install Torsion and now I have a pretty windows debugger - and a remotely crashing Unix app. I didn't, at first glance, see remote debugging? Or a Linux/Headless version?

I generally don't change a lot of core-code in an evaluation. I would tend to check the source into version control, compile it on the test system(s), run any examples - THEN start "exploring".

I'd expect a commercial product to run out-of-the-box. If it's not running, then there's a hardware/OS/build-environment problem...

Two plus decades in software engineering has taught me the follies of hacking on evaluation tool code. Check the "doesn't run" checkbox, and move on to the next so I don't get bogged down. If the samples don't run - it's probably indicative of the product as a whole, right?

I think I'll spend another hour and if it's not apparent the actual problem at that point, check that "doesn't function to-spec" checkbox, put it on the shelf, and move on to the next product, and hope to have a chance to revisit it sometime down the road. It really does look promising.


Thanks again for your assistance!

--- Jodie
#9
01/16/2007 (2:08 pm)
Quote:Looks like Gary has a good jump on things for ya.
Go Gary, Go!

Heh. Only so much debugging other people's problems I'll try, without evidence they've at least looked at the problem themselves :-)

Gary (-;
#10
01/16/2007 (2:16 pm)
Quote:I'd expect a commercial product to run out-of-the-box

Torque on linux is currently a minor step or two behind the windows version. In my dreams, all the fixes that the community posts get pushed into GG's SCM, or at least equivalent fixes. Currently, linux support at GG just seems to be floundering.

For what it's worth, I have the latest version of torque running great on at least all three platforms [linux, mac, win], but I can't honestly claim it didn't require at least minor finegling on my part to get it working cleanly on all flavors of linux I have.

Gary (-;
#11
01/16/2007 (2:19 pm)
ROFL - ok, that's kinda embarassing.



- commented out the:
if ($Server::Dedicated) initDedicated(); else initClient(); block and forced initDedicated(); - still no go.

- inserting your "trace" command I see "default game"

Hmm. That contains "demo" Look at demo - it has no server code.

Force start.fps in place of demo. Execute. Voila. It initializes.

Now to see if it works over the network, since that was the stumbling-block with a 2k3 dedicated server. (which, incidentally, I'd rather have a dull rusty railroad spike driven through my skull with a ballpean hammer than actually committing us to running 2003Server in production. So I'm not terribly heartbroken about that. ;-)

Thanks again for the assistance. I'll follow-up here with the outcome of XP-client to Linux Server and provide an actual diff of the changes for posterity.

--- Jodie
#12
01/16/2007 (2:24 pm)
This is the Linux forum, so I don't have to don the Nomex for the above statement, right? ;-)

I believe Windows is a fine desktop operating system. Easily in the top-10. ;-) Server? Not so much. In other areas of the company, we have 27,000+ servers under management. In excess of 98% of our support resources goes into the 6% that are windows servers. <--- Justification based on experience to try to head-off some of the toasting I've set myself up for.

Thanks again!

--- Jodie
#13
01/16/2007 (2:26 pm)
Quote: Force start.fps in place of demo. Execute. Voila. It initializes

ooooh. Yeah, use starter.fps for all this.

Demo is a manifestation of all that is evil and hardcoded in the universe.

Gary (-;
#14
01/16/2007 (2:27 pm)
As far as getting GG to pay a little more attention to linux, ye're preaching the the choir. :-)

Gary (-;
#15
01/16/2007 (2:45 pm)
I have spent many of hours in the TGE-L code ;)

From past exp I can say with near 100% assurance that you did not compile a dedicated binary.

-Ron
#16
01/16/2007 (3:31 pm)
Thanks Ron. Yup - I compiled a dedicated binary. make clean;make dedicated and the binary generated was torqueDemod.bin (the "d" for dedicated).

Turned out to just simply be the

main.cs
----------

$defaultGame = "demo";
$displayHelp = false;

and -game for whatever reason not being recognized.

When I changed it to:

$defaultGame = "starter.fps";
$displayHelp = false;

life got much happier. And unlike the Win2k3 server, I am getting network communication. Takes surprisingly long for setup, given the hardware and connectivity on both sides, but - hey, NOW we can eval that. That's really all I'm asking for. ;-)

(Server: Linux RHE, dual processor Xeon P4 3.06/800 w/4GB of RAM and 8x10k RPM Seagate Chetah SCSI)
(Server Side Pipe: 34Gbit/sec multidrop fiber to 6 tier-1 carriers into 40gbit/sec route/switch fabric into 2x1gbit Intel 1000bt at the machine)
-
(Client 1: Dual Processor Xeon P4 3.06/800 w/2GB RAM, nVidia/LeadTek GeForce 6800 Ultra AGP w/512 and 8x7200 RPM Seagate Barracuda SATAII - XPSP2)
(Client 2: 4200 Athlon 64, 2GB RAM, nVidia/LeadTek GeForce 7980 PCI-ex w/512MB and 2x7200 RPM Seagate Barracuda SATAII - XPSP2)
(Client-Side Pipe: Intel 1000bt into HP8000M 24gbit switch fabric into dedicated Cisco 3600 to DS3 over Fiber to 2x Tier 1 carrier)

Obviously, we'd want to... test-down a bit for the real-world. But this is an "apples to apples, what if hardware and bandwidth weren't an issue?" comparison.

Thanks!

--- Jodie