Jump to content
Sign in to follow this  
wi77ard

help - linux server and random restarts

Recommended Posts

hi

i am renting a server and the server is laggy at times, the server company says

Quote[/b] ]It restarts totally randomly, but the problem is it doesnt kill the previous process, which eventually causes it to loop due to the port being in use.

this is an output it produces

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">WATCHDOG (5875): [Thu May 5 11:20:01 BST 2005] Server shutdown intentional, watchdog terminating

WATCHDOG (5892): [Thu May 5 11:20:01 BST 2005] Starting server (port 2302)...

11:20:01 Dedicated server created, memory used: 7040 KB

Operation Flashpoint Console version 1.96: port 2302 - Sockets

11:20:03 Server identity created

WATCHDOG (5892): [Thu May 5 11:20:20 BST 2005] Server shutdown intentional, watchdog terminating

WATCHDOG (5909): [Thu May 5 11:20:20 BST 2005] Starting server (port 2302)...

11:20:20 Dedicated server created, memory used: 7040 KB

what does this mean? and can it be fixed?

please help

Share this post


Link to post
Share on other sites

net speed, flashpoint.cfg settings (maxmsgsend ect) server specs, # of CPUs, linsux version, batch command that is used to run the server is what we need

and what is crashing? is the whole server rebooting or just ofp is crashing and restarting?

Share this post


Link to post
Share on other sites

Net speed = 100mbit

flashpoint.cfg...

Light_Explo=1;

Cloudlets=1;

Cockpit_Textures=2048;

Limit_LOD=0.019000;

CPU_Benchmark=1145;

3D_Performance=1145;

Frame_Rate_Pref=500;

VehShadows=1;

File_Heap=8;

Object_Textures=2048;

HW_Type="Direct3D";

MaxObjects=256;

Shadows=0;

Language="English";

Quality_Pref=500;

Resolution_W=1024;

Adapter=0;

Texture_Heap=8;

Resolution_Bpp=16;

Resolution_H=768;

Reflections=1;

MaxLights=12;

Sky=1;

Animated_Textures=128;

Light_Missile=1;

Landscape_Textures=2048;

Textures_Drop_Down=4;

Shadows_LOD=0.050000;

LOD=7.500000;

Total_Memory="128 MB";

Light_Static=1;

Product="Resistance";

refresh=75;

Server specs = dual amd mp, 2gb ddr

Fedora Core

Batch command = ./ofpserver start [nice and simple]

Share this post


Link to post
Share on other sites

There seems to be two instances of the watchdog (just an instance of the ofpstart script) running and they seem to be fighting.

Also, I need to know if you guys have noticed that the start script ("ofpstart") has parts that need to be edited to suit the particular setup you have on the server. That script needs write access to some runtime state files and it may or may not have that.

Re the "lagginess"...well, you're running an OFP server on a Athlon MP platform. That's a DDR266 memory platform and its old and crusty and above all s-l-o-w.

OFP likes two things: fast memory and fast processors. Is the game hoster running any other MP games on that very machine? If so...fugheddaboutit. OFP eats CPU like nothing else.

It can be fixed, but the hosting company needs to hire competent people to run the business... wink_o.gif

Share this post


Link to post
Share on other sites

ok first off, i have ftp access to the flashpoint server, do u want me to post the file here so u can take a look?

how would i know what has write access?

would running the server on a windows based server help any?

lastly, we are only a small clan and want hosting for 16 - 32 players, what spec of server would u recommend?

Share this post


Link to post
Share on other sites
ok first off, i have ftp access to the flashpoint server, do u want me to post the file here so u can take a look?
Near the beginning of the script ofpstart you should find this:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">#=======================================================================

#======== CONFIGURATION PARAMETERS ========

#======== MUST BE EDITED MANUALLY TO FIT YOUR SYSTEM PARAMETERS ========

#=======================================================================

OFP_DIR=/ofp

CONFIG=${OFP_DIR}/server.cfg

PORT=2302

PIDFILE=/var/run/ofp_server.${PORT}.pid

RUNFILE=/var/run/ofp_server.${PORT}.run

LOGFILE=${OFP_DIR}/log.${PORT}.txt

SERVER=${OFP_DIR}/server

#=======================================================================

I need to know how that part looks on your side. Also, is "ftp access" the only kind of access you have to the server? If so, how or what issues the "batch" command ofpstart?. Have the hoster automated that somehow or are you not giving me all the details?

It's possible that you actually have shell access (ie the possibility to get a command line window ('DOS prompt')) via SSH.

If that's all gibberish, don't fret. The details from the start script will help us get further.

Quote[/b] ]how would i know what has write access?
Either by simple testing from a command shell or by asking the hoster.
Quote[/b] ]would running the server on a windows based server help any?
Not sure what you mean here... of course you wouldn't see this particular problem on a Windows machine, since it's way of doing things is different. That said, the issue you have is probably dead easy to fix. I have this feeling that I could fix it in, oh, under a minute if I had shell access to the server in question. What takes time is this "un<bleep>ing by proxy" that we're doing over the forums. biggrin_o.gif
Quote[/b] ]lastly, we are only a small clan and want hosting for 16 - 32 players, what spec of server would u recommend?
There really is no upper limit on the server CPU speed and you'll probably run out of money before you're satisfied. Take a look at Mal's signature above, for the RN server. That's the ballbark, I'd say.

What they have done is build their own server and then overclock it to squeeze out even more performance of it. That machine is then colocated at some...well, colocation site where you rent shelf space for your server. This is different from renting a server from some flashy game hoster company, since they operate in a different way. A game hoster prefers to be able to host many games on one server ($$$) and that is quite possible for other games. OFP however, is a game hoster's nightmare in that it wants the whole machine to itself and then some, so to speak.

In essence, the best way for you guys to get an enjoyable server is to to the same - a DIY server placed at a colo center somewhere.

Share this post


Link to post
Share on other sites

thanks for quick repsones

heres a copy of the file

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">#!/bin/bash

#

# ofpserver: Operation Flashpoint Linux dedicated server control script

# (c) 2003 BIStudio

# OFP binary version must be 1.92 or later!

#

#=======================================================================

#======== CONFIGURATION PARAMETERS ========

#======== MUST BE EDITED MANUALLY TO FIT YOUR SYSTEM PARAMETERS ========

#=======================================================================

OFP_DIR=/home/server-20/ofp

CONFIG=${OFP_DIR}/server.cfg

PORT=2302

PIDFILE=${OFP_DIR}/ofp_server.${PORT}.pid

RUNFILE=${OFP_DIR}/ofp_server.${PORT}.run

LOGFILE=${OFP_DIR}/log.${PORT}.txt

SERVER=${OFP_DIR}/server

MODS="@ECP"

#=======================================================================

case "$1" in

start)

if [ -f ${RUNFILE} ]; then

$0 stop

fi

echo "Starting OFP server..."

# file to mark we want server running...

echo "go" >${RUNFILE}

# launch the background watchdog process to run the server

nohup </dev/null >/dev/null $0 watchdog &

;;

stop)

echo "Stopping OFP server..."

if [ -f ${RUNFILE} ]; then

# ask watcher process to exit by deleting its runfile...

rm -f ${RUNFILE}

fi

# and terminate OFP server process

if [ -f ${PIDFILE} ]; then

kill -TERM $(< ${PIDFILE})

if [ -f ${PIDFILE} ]; then

rm -f ${PIDFILE}

fi

fi

;;

status)

if [ -f ${RUNFILE} ]; then

echo "Server should be running..."

else

echo "Server should not be running..."

fi

if [ -f ${PIDFILE} ]; then

PID=$(< ${PIDFILE})

echo "PID file exists (PID=${PID})..."

if [ -f /proc/${PID}/cmdline ]; then

echo "Server process seems to be running..."

fi

fi

;;

check)

echo -n "OFP directory: ${OFP_DIR} "

if [ -d ${OFP_DIR} ]; then

echo "OK"

else

echo "MISSING!"

fi

echo -n "Server executable: ${SERVER} "

if [ -x ${SERVER} ]; then

echo "OK"

else

echo "ERROR!"

fi

echo "Port number: ${PORT}"

echo -n "Config file: ${CONFIG} "

if [ -f ${CONFIG} ]; then

echo "OK"

else

echo "MISSING!"

fi

echo "PID file: ${PIDFILE}"

echo "RUN file: ${RUNFILE}"

;;

restart)

$0 stop

$0 start

;;

watchdog)

# this is a background watchdog process. Do not start directly

while [ -f ${RUNFILE} ]; do

# launch the server...

cd ${OFP_DIR}

echo >>${LOGFILE} "WATCHDOG ($$): [$(date)] Starting server (port ${PORT})..."

export LD_LIBRARY_PATH=${OFP_DIR}/libs

${SERVER} >>${LOGFILE} 2>&1 -server -config=${CONFIG} -port=${PORT} -pid=${PIDFILE} -mod=${MODS}

if [ -f ${RUNFILE} ]; then

echo >>${LOGFILE} "WATCHDOG ($$): [$(date)] Server died, waiting to restart..."

sleep 5s

else

echo >>${LOGFILE} "WATCHDOG ($$): [$(date)] Server shutdown intentional, watchdog terminating"

fi

unset LD_LIBRARY_PATH

done

;;

*)

echo "$0 (start|stop|restart|status|check)"

;;

esac

Quote[/b] ]Also, is "ftp access" the only kind of access you have to the server? If so, how or what issues the "batch" command ofpstart?. Have the hoster automated that somehow or are you not giving me all the details?

dont know if i understand what ur getting at really, but the only access to the server i know that i have is through ftp and we can restart the server using a webpage.

i'm not sure but this file looks like it might be involved?

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">#!/bin/sh

#

# INX-Gaming.co.uk Game Switcher - Created By Aaron Taylor aka Moony1234

# Copyright (c)2004-2006 All Rights Reserved.

#

# Easy Server Start Script

#

#

home="/home"

user="server-20"

#

# DO NOT MODIFY ANYTHING BELOW HERE

#

case "`id`" in

uid=0\(root\)*)

echo "$0: This script cannot be run as root!"

exit 1

esac

cd $home/$user/ofp

./ofpserver stop > /dev/null 2>&1

cd $home/$user/ofp

./ofpserver start > /dev/null 2>&1

or perhaps this one lol

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">/home/server-20/ofp/ofpserver stop

/home/server-20/ofp/ofpserver stop

/home/server-20/ofp/ofpserver stop

/home/server-20/ofp/ofpserver start

regarding the write access i'll ask the host company

the reason i ask about windows server is coz we have run into problems using addons with the server too, we often have to open a missions .sqm file and define them before the server will accept it, and i understand from another post that this is a linux only issue.

building my own server is appealing, but i dont know if i could manage it, this all seems a little over my head. We pay Å40 for our server at the moment, and although the lag is there, most maps are playable with upto 16 players, the really annoying thing is the random restarts. However if renting 'shelf space' wasnt overly priced, we'd be interested in learning more, know of anywhere offering such a service?

cheers

Share this post


Link to post
Share on other sites

ok i've asked the server company and they said we only have ftp access for security reasons, whatever they are lol

Share this post


Link to post
Share on other sites
thanks for quick repsones

heres a copy of the file

<snip>

Looks ok.
Quote[/b] ]dont know if i understand what ur getting at really, but the only access to the server i know that i have is through ftp and we can restart the server using a webpage.
You understood me right - that's just what I was wondering.
Quote[/b] ]I'm not sure but this file looks like it might be involved?

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">#!/bin/sh

...

# Easy Server Start Script

...

I take it that script is the one being run from the web page where you restart the server from? It looks like it should work.
Quote[/b] ]or perhaps this one lol

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">/home/server-20/ofp/ofpserver stop

/home/server-20/ofp/ofpserver stop

/home/server-20/ofp/ofpserver stop

/home/server-20/ofp/ofpserver start

Where do those four lines come from?
Quote[/b] ]regarding the write access i'll ask the host company
No need to - things seem to be setup alright.
Quote[/b] ]the reason i ask about windows server is coz we have run into problems using addons with the server too, we often have to open a missions .sqm file and define them before the server will accept it, and i understand from another post that this is a linux only issue.
The problem you see comes from broken addons (<span style='color:red'>lack of proper addon dependency declarations</span>) leading to all kinds of problems, one being dedicated servers refusing to load missions. Unfortunately, 90% of all addons out there are like that... useless crap despite being all flashy and glitzy. AFAIK, this issue affects Windows dedicated servers too.
Quote[/b] ]building my own server is appealing, but i dont know if i could manage it, this all seems a little over my head. We pay Å40 for our server at the moment, and although the lag is there, most maps are playable with upto 16 players, the really annoying thing is the random restarts. However if renting 'shelf space' wasnt overly priced, we'd be interested in learning more, know of anywhere offering such a service?
Ok. For Å40/month, I think further problem solving can and should be performed by the game hoster's. If they are unable to solve it, they need to start hiring... crazy_o.gif Your access to the server is too limited to do proper problem analysis and solving.

Share this post


Link to post
Share on other sites

thanks for response killswitch

those four lines come from what i presume is something to do with the server restart function i have? its a file called ofpserverrestart

we do use alot of addons, detecting which one might cause the problem sounds like a lengthly process. i have told the server company what you think the problem is, hopefully they will be able to sort it from here.........

Share this post


Link to post
Share on other sites
thanks for response killswitch

those four lines come from what i presume is something to do with the server restart function i have? its a file called ofpserverrestart

I'd like to have a peek at that file
Quote[/b] ]we do use alot of addons, detecting which one might cause the problem sounds like a lengthly process.
You bet it is, especially if you're not used to it. And in the end, it's about as rewarding as unclogging public toilets - making addons actually work doesn't win you accolades or nice screenshots...

1 - Deconflicting the server restart sequence

Quote[/b] ]I have told the server company what you think the problem is, hopefully they will be able to sort it from here.........
Oh...I'm not sure I know what the exact problem is yet. This just struck me... that start/restart script could use a delay between the stopping and starting of the server. Like this:
Quote[/b] ]#!/bin/sh

#

# INX-Gaming.co.uk Game Switcher - Created By Aaron Taylor aka Moony1234

# Copyright ©2004-2006 All Rights Reserved.

#

# Easy Server Start Script

#

#

<...snip...>

cd $home/$user/ofp

./ofpserver stop > /dev/null 2>&1

<span style='color:red'>sleep 10</span>

cd $home/$user/ofp

./ofpserver start > /dev/null 2>&1

That sleep <time in seconds> might deconflict the stopping and starting of the server, solving the "port not available" problem.

2 - OFP and SMP/SMT machines

Furthermore, another thing comes to mind. OFP doesn't seem like being task switched between processor resources. You might cure some of the "lagginess" by locking the OFP process to one of the processors in the server. How do we go about doing this? Here's an excerpt of an edited ofpstart script, near the "start" part that will do just that (assuming the taskset command is installed on the server):

Quote[/b] ]

...

start)

if [ -f ${RUNFILE} ]; then

$0 stop

fi

echo "Starting OFP server..."

# file to mark we want server running...

echo "go" >${RUNFILE}

# launch the background watchdog process to run the server

nohup </dev/null >/dev/null $0 watchdog &

<span style='color:green'>

# wait for server process and lock it to CPU #1

sleep 20

if [ -f ${PIDFILE} ]; then

taskset -p 0x1 $(< ${PIDFILE}) &>/dev/null

fi</span>

;;

...

Share this post


Link to post
Share on other sites
flashpoint.cfg...

Light_Explo=1;

Cloudlets=1;

Cockpit_Textures=2048;

Limit_LOD=0.019000;

CPU_Benchmark=1145;

3D_Performance=1145;

Frame_Rate_Pref=500;

VehShadows=1;

File_Heap=8;

Object_Textures=2048;

HW_Type="Direct3D";

MaxObjects=256;

Shadows=0;

Language="English";

Quality_Pref=500;

Resolution_W=1024;

Adapter=0;

Texture_Heap=8;

Resolution_Bpp=16;

Resolution_H=768;

Reflections=1;

MaxLights=12;

Sky=1;

Animated_Textures=128;

Light_Missile=1;

Landscape_Textures=2048;

Textures_Drop_Down=4;

Shadows_LOD=0.050000;

LOD=7.500000;

Total_Memory="128 MB";

Light_Static=1;

Product="Resistance";

refresh=75;

Server specs = dual amd mp, 2gb ddr

Fedora Core

Batch command = ./ofpserver start [nice and simple]

i looked at your file and the ,maxmsg should be in this file and not your server confile, you can copy these as well, plus I see that server ram is 128 megs, this should be changed as it may be choking the server, which is run by the OFP Preference which is not availble for linsux and has to be done manually, also look over other settings, any questions just ask, this is our server config

Quote[/b] ]

MaxMsgSend=512;

MaxSizeGuaranteed=1024;

MaxSizeNonguaranteed=512;

MinBandwidth=10000000;

MaxBandwidth=13000000;

Light_Explo="1";

Cloudlets="1";

Cockpit_Textures="256";

Limit_LOD="0.019000";

CPU_Benchmark="2595";

3D_Performance="2595";

Frame_Rate_Pref="500";

VehShadows="1";

File_Heap="16";

Object_Textures="256";

HW_Type="Direct3D";

MaxObjects="256";

Shadows="1";

Language="English";

Quality_Pref="500";

Resolution_W="1024";

Adapter="0";

Texture_Heap="16";

Resolution_Bpp="16";

Resolution_H="768";

Reflections="1";

MaxLights="25";

Sky="1";

Animated_Textures="128";

Light_Missile="1";

Landscape_Textures="128";

Textures_Drop_Down="4";

Shadows_LOD="0.050000";

LOD="7.500000";

Total_Memory="2048 MB";

Light_Static="1";

Product="Resistance";

Linux is ok for CTF servers and medium sized co-ops but for hard core CTI server where there are 500 or so AI they do suffer dysnc on Multy CPU servers

the cause for this is linux sees the OFP exicutable running at 100% and moves it from CPU to CPU, since OFP is a real time game and as the load increases these CPU change overs causes the game to dysnc out, now most of the 3.0 HT servers are all the top CTI servers with OFP binded to a single CPU and run at real time leaving all other system threads running on the HT or other secondary CPU

Linux is a good web server, but for a MS windows based game you cant go wrong with a win2k or win2k3 advanced server

Share this post


Link to post
Share on other sites

the problem seems the have been the @ECP mod

i've changed the folder name and the problem seems to have stopped.

@killswitch

that is the whole file, just those four lines

@ RN

so can i just copy ur config and it will sort this?

Share this post


Link to post
Share on other sites
the problem seems the have been the @ECP mod

i've changed the folder name and the problem seems to have stopped.

@ RN

so can i just copy ur config and it will sort this?

yea, just change the ram to your 2 gigs, and look in your server.cfg and make sure the maxmesg ect are not in there as it will crash the server saying duplicate setting found on start up

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×