Jump to content
Sign in to follow this  
benu

Linux server setup howto

Recommended Posts

Did you do dos2unix ofpstart??? If not do it after the next change...

yes, i did it.

Share this post


Link to post
Share on other sites

something new<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> ofp]$ ./ofpserver start

Starting OFP server...

./ofpserver: line 30: =/home/ddk/ofp//ofp_server.2302.run: No such file or directory

Share this post


Link to post
Share on other sites

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">ofp]$ ./ofpserver start

Starting OFP server...

./ofpserver: line 30: =/home/ddk/ofp/ofp_server.2302.run: No such file or directory

Share this post


Link to post
Share on other sites

Are you sure the path is ok and you got the rights there? If yes we have to wait for killswitch to answer...

Share this post


Link to post
Share on other sites
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">ofp]$ ./ofpserver start

Starting OFP server...

./ofpserver: line 30: =/home/ddk/ofp/ofp_server.2302.run: No such file or directory

You have two "=":s in there somewhere. You might need to change

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">OFP_DIR==/home/ddk/ofpto<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">OFP_DIR=/home/ddk/ofpTo train you in logical thinking and basic problem solving, there's one other place where the extra "=" could be. Seeing as how line 30 references the environment variable "RUNFILE", where could that possibly be?

Good grief, this is getting ridiculous. Gimme an account on the bloody machine and I'll have the OFP server running in under 10 seconds (system time). banghead.gifbiggrin_o.gif

Share this post


Link to post
Share on other sites

Killswitch sicilian

Finally yay.gifbiggrin_o.gif

Thank you for help!!! thumbs-up.gif

Share this post


Link to post
Share on other sites
Quote[/b] ] You use FC2. That's good because I know that the ofp server runs just fine on it.

I'm running FedCore2, and I'm having no end of problems, I'm hoping someone can help me :/

I've got all the required files, I think they're all setup properly, chown to the right user, I start the server with ./ofpserver start and I get the following error in the logs...

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">WATCHDOG (6433): [Tue Feb 14 16:47:03 GMT 2006] Starting server (port 2302)...

16:47:04 Dedicated server created, memory used: 3748 KB

WATCHDOG (7551): [Tue Feb 14 16:47:05 GMT 2006] Server died, waiting to restart...

This error repeats nonstop til I stop the server with ofserver stop

My ofserver has the following ...

OFP_DIR=/home/myfolder/ofp

CONFIG=${OFP_DIR}/server.cfg

PORT=2302

PIDFILE=/home/myfolder/ofp/ofp_server.${PORT}.pid

RUNFILE=/home/myfolder/ofp/ofp_server.${PORT}.run

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

SERVER=${OFP_DIR}/server

(myfolder relates to my user)

server.cfg is very basic that only defines the admin password and hostname. Everything reports ok with ./ofpserver check. The link to the libs in the first page is broken, wil lthis solve my issues?

I'm going insane, I have no idea whats wrong. I've also tried running under wine, but that's crashing out with dorectx errors (again, I'm not 100%).

I have root for the box if needs

Share this post


Link to post
Share on other sites
I've got all the required files...

...The link to the libs in the first page is broken, wil lthis solve my issues?

If you don't have those old libraries, then you don't have "all the required files". They are absolutely neccessary. Link broken, eh? Try this one: old libs

Share this post


Link to post
Share on other sites

Guess who's back ... biggrin_o.gif

Well, the server starts fine, runs fine (with 6 people) but randomly crashes and restarts. There's nothing in the log that helps, it just says ...

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

22:49:47 Game started

WATCHDOG (3953): [Thu Feb 23 23:51:15 GMT 2006] Starting server (port 2302)...

23:51:19 Dedicated server created, memory used: 17592 KB

Operation Flashpoint Console version 1.96: port 2302 - Sockets

23:51:38 Server identity created

It was a standard MFCTI Everon coop map, a map we've played a the lan a 100 times with no problems like this. Is the linux server inherently unstable, or are we doing something wrong?

It crashed 3 times in total last night. First tine it lasted around 15 mins, second time around 70 mins, and the final one around 62 mins. All stock MFCTI maps with only the view distance increased to 1500. We werent doing anything particular in each session to force a crash, and the box wasnt doing anything at that time either...

:/

Share this post


Link to post
Share on other sites

Explain how the crash looks like? YOu all got disconnected and in the server console you can't see anything? Is the process running after a crash?

More details needed...

Did you noticed this behavior ion other missions, too?

Share this post


Link to post
Share on other sites

We're all kicked off, and we're running linux dedicated server so I cant see the console - I was running the game with tail -f on the log file, and all it said was what I posted above.

It never actually says it stops working, just ...

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

20:52:59 Roles assigned

20:52:59 Reading mission ...

20:53:00 Mission read

20:54:09 Game started

WATCHDOG (7251): [Thu Feb 23 22:03:37 GMT 2006] Starting server (port 2302)...

22:03:40 Dedicated server created, memory used: 17588 KB

Operation Flashpoint Console version 1.96: port 2302 - Sockets

22:04:00 Server identity created

The server will be running fine, and then suddenly restart (automated with watchdog I assume).

It's totally random. Sometimes it crashes after 10 mins, other times after an hour. We've only tried it with ZeusCTI with a load of addons. I'm trying it at the moment with only the required MFCTI 1.16.pbo addon and if it continues to crash, I'll try running one of the vanilla missions.

I can post the ./ofpserver, flashpoint.cfg and server.cfg if needs .

Cheers smile_o.gif

Share this post


Link to post
Share on other sites

Sorry thought you run the win32 under wine because of your pm. My knowledge on linux isn't that big - win32 is my world.

But post the files perhaps I can see something easy... or others will help.

Share this post


Link to post
Share on other sites

server.cfg

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

password = ***;

passwordAdmin = ***;

hostname = "HAPPY FUNTIME KILLING";

motd[]=

{

};

MaxMsgSend=128;

MaxSizeGuaranteed=256;

MaxSizeNonguaranteed=256;

MinBandwidth=262144;

MaxBandwidth=524288;

MinErrorToSend=0.0095;

kickDuplicate="false";

voteThreshold=0.33;

voteMissionPlayers=0.5;

reportingIP="";

class Missions {

};

./ofpserver

<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/ofpuser/ofp

CONFIG=${OFP_DIR}/server.cfg

PORT=2302

PIDFILE=/home/ofpuser/ofp/ofp_server.${PORT}.pid

RUNFILE=/home/ofpuser/ofp/ofp_server.${PORT}.run

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

SERVER=${OFP_DIR}/server

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

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=/home/ofpuser/ofp/libs

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

if [ -f ${OFP_DIR}/${RUNFILE} ]; then

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

sleep 5s

else

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

fi

unset LD_LIBRARY_PATH

done

;;

*)

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

;;

esac

flashpoint.cfg

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

Product="Resistance";

Language="English";

HW_Type="Direct3D HW T&L";

Adapter=0;

3D_Performance=5067;

CPU_Benchmark=5639;

Resolution_W=1024;

Resolution_H=768;

Resolution_Bpp=16;

LOD=7.500000;

Limit_LOD=0.018260;

Shadows_LOD=0.050000;

MaxObjects=256;

Cockpit_Textures=4096;

Landscape_Textures=4096;

Object_Textures=4096;

Animated_Textures=64;

Textures_Drop_Down=4;

Texture_Heap=16;

File_Heap=16;

Total_Memory=768;

MaxLights=32;

Light_Explo=1;

Light_Missile=1;

Light_Static=1;

Frame_Rate_Pref=500;

Quality_Pref=500;

refresh=75;

ls -l of ofp

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

drwxrwxr-x 2 ofpuser ofpuser 4096 Feb 24 12:45 addons

drwxr-xr-x 2 ofpuser ofpuser 4096 Feb 23 13:16 cack_libs

drwxr-xr-x 3 ofpuser ofpuser 4096 Feb 23 10:10 dta

-rw-r--r-- 1 ofpuser ofpuser 553 Feb 23 10:01 flashpoint.cfg

drwxrwxr-x 2 ofpuser ofpuser 4096 Jun 28 2004 libs

-rw-rw-r-- 1 ofpuser ofpuser 37405 Feb 24 14:25 log.2302.txt

drwxr-xr-x 2 ofpuser ofpuser 4096 Feb 23 09:44 missions

drwxr-xr-x 2 ofpuser ofpuser 4096 Feb 23 20:12 mpmissions

drwxr-xr-x 2 ofpuser ofpuser 4096 Feb 23 09:41 mpmissionscache

-rwxrwxr-x 1 ofpuser ofpuser 3047 Feb 23 10:23 ofpserver

-rwxr-xr-x 1 ofpuser ofpuser 2773 Feb 23 10:15 ofpserver_backup

drwxr-xr-x 3 ofpuser ofpuser 4096 Feb 23 09:43 old_addons

-rw-rw-r-- 1 ofpuser ofpuser 2374 Feb 23 10:10 readme.txt

drwxr-xr-x 6 ofpuser ofpuser 4096 Feb 23 10:10 res

-rwxrwxr-x 1 ofpuser ofpuser 6825488 Feb 23 10:10 server

-rw-r--r-- 1 ofpuser ofpuser 331 Feb 24 12:47 server.cfg

drwx--x--x 3 ofpuser ofpuser 4096 Feb 24 14:25 tmp2302

-rwxr-xr-x 1 ofpuser ofpuser 6516 Feb 23 10:10 tolower

-rw-rw-r-- 1 ofpuser ofpuser 3040 Feb 23 10:10 tolower.c

drwx--x--x 3 ofpuser ofpuser 4096 Feb 23 10:35 users

drwxr-xr-x 2 ofpuser ofpuser 4096 Feb 23 09:41 worlds

ls -l of libs

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

-rwxr-xr-x 1 ofpuser ofpuser 91085 Jun 28 2004 ld-linux.so.2

-rwxr-xr-x 1 ofpuser ofpuser 1325063 Jun 28 2004 libc.so.6

-rwxr-xr-x 1 ofpuser ofpuser 15918 Jun 28 2004 libnss_dns.so.2

-rwxr-xr-x 1 ofpuser ofpuser 44639 Jun 28 2004 libnss_files.so.2

-rwxr-xr-x 1 ofpuser ofpuser 70056 Jun 28 2004 libresolv.so.2

addons contains the MFCTI 1.16.pbo only.

ofpuser = my login (not running as root)

Share this post


Link to post
Share on other sites

Well, after a few tries and editnig of the script, I've got it working!

I have no idea waht the watchdog was doing wrong, but I'm running the server from the command line with all the required switches and it's been working all weekend with around 10 hours of gametime racked up.

Cheers for the help.

Share this post


Link to post
Share on other sites

Converting OFP directory:

ofp-server-1.96.shar: line 152004: gcc: command not found

ofp-server-1.96.shar: line 152005: ./tolower: No such file or directory

i get that error while converting iv learnt in a few hours linux and iv setup the server as well as i can i think i need somebody to look over it or somthing?

could somebody possibly help me and il give then root details so they can have a look as im totaly baffled

geezup@hotmail.co.uk add me

Share this post


Link to post
Share on other sites
Converting OFP directory:

ofp-server-1.96.shar: line 152004: gcc: command not found

ofp-server-1.96.shar: line 152005: ./tolower: No such file or directory

The first error tells us that you haven't got the GNU C/C++ compiler package installed on your machine. It is needed so the ofp server "install" script can compile a small program called "tolower".

The second error comes from the script not being able to see that command, since it could not be compiled. :-)

So, what you need to do is this: <span style='color:red'>Install gcc</span>.

How you go about doing that depends on which variant, "distribution" of GNU/Linux that you are using. Tell us that and we'll be able to help you further.

Share this post


Link to post
Share on other sites
thanks for reply

the linux is Redhat Linux Fedora 2

thx

Ok. FC2 it is. Do it like so:

<ul>[*] Update your system using "yum -y update" (This will take some time to finish, might need a reboot.)

[*] Install gcc: "yum -y install gcc"

I will assume that you have your yum config set up OK, pointed to Fedora Legacy these days and that all pertinent keys have been imported. This forum is not the place to sort out Yum troubles and general system admining.

Share this post


Link to post
Share on other sites
Config: '"' encountered instead of ','

that on the serverconfig file or??.

Yes,

That's in the server config file. Is it still the same as the one you posted?

Share this post


Link to post
Share on other sites

While editing the motd[]=  section in server.cfg you have to remember to leave a comma at the end of each line,

like this:

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

motd[]=

{

"FDF MOD VERSION 1.2",

"MAX FACE 25K",

};

that's bad:

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

{

"FDF MOD VERSION 1.2"

"MAX FACE 25K",

};

Share this post


Link to post
Share on other sites
While editing the motd[]= section in server.cfg you have to remember to leave a comma at the end of each line

...except the last line. (Actually, it doesn't seem to do any harm, but it doesn't have to be there.)

Share this post


Link to post
Share on other sites
While editing the motd[]=  section in server.cfg you have to remember to leave a comma at the end of each line

...except the last line. (Actually, it doesn't seem to do any harm, but it doesn't have to be there.)

Same on the checkfiles array...

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  

×