RegisterRegister    Log inLog in    SearchSearch   

Post new topic   Reply to topic
 
View previous topic :: View next topic  
Author Message
theWeird



PostPosted: Sat Feb 20, 2010 6:37 am    Post subject: Debugging server startup Reply with quote

Hey there
I have some trouble running a savage XR server on linux.
The command line that is executed by GC client is this:
/home/gameserver/gamecreate/savage/server set config_port 11235

If I run this command by hand in SSH console everything works fine.
Server starts and is ready to be used.

But if I try to start the server in GC Controlpanel there are always this lines in my error log:
Start GameCreate attempted to start Weird Savage. 02/19/2010 21:30:37
Stop GameCreate stopped Weird Savage. 02/19/2010 21:30:34
Fail Process failure (Server crashed?) 02/19/2010 21:30:34
Start GameCreate attempted to start Weird Savage. 02/19/2010 21:30:13

Ok, it is possible to run GC client in foreground mode.
Using this I checked that the command that is ran by the client is correct.
But is it possible to run GC client in a kind of 'advanced debug mode'?
If there appears anything like an error using the startup command for the savage server I'd like to know which error it is so I could be able to fix it.
Back to top
View user's profile Send private message
adbot



PostPosted: Thu Mar 31, 2011 3:57 am 

Andrew
Mammoth


PostPosted: Sat Feb 20, 2010 1:25 pm    Post subject: Reply with quote

Try running the game using a screen, via Game Configuration.

Also, manually start the server using the same Command Line found via Server Overview, see what happens.
Back to top
View user's profile Send private message
theWeird



PostPosted: Sun Feb 21, 2010 1:10 am    Post subject: Re: Debugging server startup Reply with quote

Already tried:
theWeird wrote:

The command line that is executed by GC client is this:
/home/gameserver/gamecreate/savage/server set config_port 11235

If I run this command by hand in SSH console everything works fine.
Server starts and is ready to be used.


I also tried running in screen via game configuration, did not work.

The server's binary only works if it is started directly from its directory.
If I run the command above from directory /home/gameserver/gamecreate/savage the startup works fine. But if I run it from a directory like /home/gameserver/gamecreate the server binary can't load required libs in it's libs directory.
So I wrote this startup script to ensure that the Binary is started from the right location and named it /home/gameserver/gamecreate/savage/server:

#!/bin/bash
cd /home/gameserver/gamecreate/savage
./silverback.bin $*

As I wrote in my first post startup using the same command as GC uses works fine from any directory in the server (using your beta client, checked the command in foreground mode) but GC's startup still fails.
Back to top
View user's profile Send private message
Andrew
Mammoth


PostPosted: Sun Feb 21, 2010 12:39 pm    Post subject: Re: Debugging server startup Reply with quote

theWeird wrote:

The server's binary only works if it is started directly from its directory.
If I run the command above from directory /home/gameserver/gamecreate/savage the startup works fine. But if I run it from a directory like /home/gameserver/gamecreate the server binary can't load required libs in it's libs directory.
So I wrote this startup script to ensure that the Binary is started from the right location and named it /home/gameserver/gamecreate/savage/server:


That should not be necessary; GameCreate switches to the /gamecreate/savage directory before it runs the 'server' executable. It never starts the game server from its 'gamecreate' directory.

Quote:
As I wrote in my first post startup using the same command as GC uses works fine from any directory in the server (using your beta client, checked the command in foreground mode) but GC's startup still fails.


I think you should choose 'Require screen' for the game; and make sure you are running the Client beta (you can see the version information in GC Client when it starts up).

After you Start the server via GameCreate; immediately open the screen session that was just started.

You should then hopefully see what the server console is saying, to help point to the reason for the server failure.
Back to top
View user's profile Send private message
theWeird



PostPosted: Mon Feb 22, 2010 2:00 am    Post subject: Reply with quote

I am using your beta version of GC client in your sticky post in this forum.

After setting the game to 'require screen' and starting the server I tried to open the Screen:
screen -r Weird\ Savage
Cannot open your terminal '/dev/pts/5' - please check.

So I checked /var/run/screen/S-gameserver/ for running screen sessions.
There is no session created for the Savage server. Only the 4 instances of Teeworld.
I Re-Started the server and checked the screen dir again, no session for the savage server.

screen -r
There are several suitable screens on:
16596."Weird Ballworlds" (02/21/2010 04:58:33 PM) (Detached)
28306."Weird Waterworlds" (02/20/2010 05:08:26 AM) (Detached)
28295."Weird Testworlds" (02/20/2010 05:08:17 AM) (Detached)
28279."Weird Teeworlds" (02/20/2010 05:07:50 AM) (Detached)
Type "screen [-d] -r [pid.]tty.host" to resume one of them.
Back to top
View user's profile Send private message
Andrew
Mammoth


PostPosted: Mon Feb 22, 2010 7:56 am    Post subject: Reply with quote

Does Failure Reports report anything?
Back to top
View user's profile Send private message
theWeird



PostPosted: Mon Feb 22, 2010 8:44 pm    Post subject: Re: Debugging server startup Reply with quote

still the same:

theWeird wrote:
But if I try to start the server in GC Controlpanel there are always this lines in my error log:
Start GameCreate attempted to start Weird Savage. 02/19/2010 21:30:37
Stop GameCreate stopped Weird Savage. 02/19/2010 21:30:34
Fail Process failure (Server crashed?) 02/19/2010 21:30:34
Start GameCreate attempted to start Weird Savage. 02/19/2010 21:30:13
Back to top
View user's profile Send private message
Andrew
Mammoth


PostPosted: Tue Feb 23, 2010 9:44 am    Post subject: Reply with quote

If you can provide SSH access to me to investigate, and the URL to your GC panel, I can investigate further if you like.

It's a bit hard to do over a forum.
Back to top
View user's profile Send private message
Andrew
Mammoth


PostPosted: Thu Feb 25, 2010 10:26 am    Post subject: Reply with quote

I've had a look for you, its working now.

The problem appeared to be that when the SCREEN session was started, savage could not read the $HOME environment variable (the SCREEN has no environment variable passed to it called $HOME).

This caused the screen to be started, and Savage to be started, but savage immediately quit:

Quote:

Starting
System_Init()
Unable to create .savage directory in your home directory location, bailing out.


I captured this by replacing the server script with a shell script that paused after the process exited.

This lead me to believe it wanted access to the $HOME environment variable (it was empty).

I replaced the server exe with this (and named server to server_real):

Quote:

#!/bin/sh
HOME=/home/[your path]
export HOME
./server_real $@


The server is now online and pinging.
Back to top
View user's profile Send private message
theWeird



PostPosted: Fri Feb 26, 2010 6:44 pm    Post subject: Reply with quote

Wow, thank you very much!
Savage is working great now!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum powered by phpBB © 2001, 2005 phpBB Group
GameCreate Service Terms | Privacy Policy | © Copyright Mammoth Media 2001-2007
GameCreate™ is a trademark of Mammoth Media Pty Ltd. GameCreate® is a registered trademark in Australia.