Jump to content
Sign in to follow this  
paxodeus

Server configs problem - cleaning file

Recommended Posts

Hay derps i have a problem. Im making arma 2 oa dedi server on debian. I trying to run server and it works fine! But...

I using this start command

./server start -cfg=/root/arma/config/arma2oa.cfg -cfg=/root/arma/config/server.cfg

What is a problem? After execute my server, config.cfg is cleaned to 0, i see onyl " Windowed=0; " inside :F changing chmod on file to read onyl not working....Any ideas?

in console i see

Error context ˇćˇˇćˇH§1§1

Cannot include file /root/arma/config/server.cfg

Warning Message: Preprocessor failed on file /root/arma/config/server.cfg - error 1.

Edited by paxodeus

Share this post


Link to post
Share on other sites

Use the start-script to start your server (e.g. arma2oaserver), and add path to config files there. (psst, it's all in the readme following server files ;) )

Share this post


Link to post
Share on other sites

When i trying run server with ./arma2oaserver scrpt - nothing happen.

trying:

./arma2oaserver start -cfg=/root/arma/config/arma2oa.cfg -cfg=/root/arma/config/server.cfg

./arma2oaserver start

and nothing, i see

Starting ArmA 2 server...

nohup: redirecting stderr to stdout

root@arma3coop:~/arma#

AND nothing....games server wont start anyway.

Share this post


Link to post
Share on other sites

found problem with server.cfg

I start server with

./server start -cfg=/root/arma/config/arma2oa.cfg -config=//root/arma/config/server.cfg

Now i have problem with arma2oa.cfg

Cannot include file /root/arma/config/arma2oa.cfg

Any ideas?

Share this post


Link to post
Share on other sites

Have you edited arma2oaserver to fit your server? Corrected paths to your configs? Everything you add behind ./arma2oaserver start is waste of time, it can be included in the start-script.

A couple of other things; I see you run from root. What a shame, NEVER DO THAT...., and you host name (correct me if I'm wrong) seems to contain digits. If my memory don't play tricks with me, it was nada in OFP, so I guess it's the same for AA2..

Post (or PM) your arma2oaserver, I'll see if I can help you.

Share this post


Link to post
Share on other sites

Here is my arma2oaserver =)

root@pax:~/arma# ./arma2oaserver check

ArmA 2 directory: / OK

Server executable: // OK

Port number: 2302

Config file: /root/arma/server.cfg OK

PID file: //2302.pid

RUN file: //2302.run

#!/bin/bash

#

# armaserver: ArmA 2 Linux Dedicated Server Control Script

# © 2010 BIStudio

# ArmA 2 binary version must be 1.04 or later

#

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

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

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

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

ARMA_DIR=/

CONFIG=/root/arma/server.cfg

PORT=2302

PIDFILE=${ARMA_DIR}/${PORT}.pid

RUNFILE=${ARMA_DIR}/${PORT}.run

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

SERVER=${ARMA_DIR}/

OTHERPARAMS=-cpucount=2

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

ulimit -c 1000000

case "$1" in

start)

if [ -f ${RUNFILE} ]; then

$0 stop

fi

echo "Starting ArmA 2 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 ArmA 2 server..."

if [ -f ${RUNFILE} ]; then

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

rm -f ${RUNFILE}

fi

# and terminate ArmA 2 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 "ArmA 2 directory: ${ARMA_DIR} "

if [ -d ${ARMA_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 ${ARMA_DIR}

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

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

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

done

;;

*)

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

;;

esac

Edited by paxodeus

Share this post


Link to post
Share on other sites

Do this:

Create a user on your nix server called arma2.

Copy your AA2 game folder to your arma2 users home folder.

Rename it to e.g. arma2.

Switch user to arma2.

Download a server of your choice.

Install it (follow instructions).

Correct your paths in start-script to point to actual dir

E.G (my OA config with default paths):

  • ARMA_DIR=/home/arma2/arma2oa //this is path to game folder
  • CFG=arma2oa.cfg //a config file where you can adjust several parameters
  • CONFIG=arma2oa-server.cfg //a config file where you can adjust several parameters
  • PORT=2402 //port which your server will use
  • PIDFILE=${ARMA_DIR}/oa-${PORT}.pid //where server should write its PID-file
  • RUNFILE=${ARMA_DIR}/oa-${PORT}.run //where server should write its RUN-file
  • LOGFILE=${ARMA_DIR}/oa_log.${PORT}.txt ////where server should write its log-file
  • SERVER=${ARMA_DIR}/server //where server should find the actual server
  • MOD="whateveryouwant; separatedby ;" //self explaining?


This setup will launch a working server for you. Remember Linux don't like CaPITal LETTeRs and SP a S In gs. And probably no special characters in server (host) name, e.g. [ )2Par=-.

I'm not sure what your log contain, but if you configure as described you'll find lots of answers in a file called oa _log.2402.txt

Share this post


Link to post
Share on other sites
ARMA_DIR=/

You installed arma directly in the root folder ?

Nope, server is in arma folder, there are also server files.

Share this post


Link to post
Share on other sites
Nope, server is in arma folder, there are also server files.

ARMA_DIR=/ tells server it is. This command/config tells server you use your root folder as game-dir.. You need to correct this path to your actual install dir (ref ^).

But I will strongly suggest you install the server under it's own account.

Edited by Overlord

Share this post


Link to post
Share on other sites

I do like you said, and still nothing...

log file:

WATCHDOG (22469): [sun Apr 22 13:05:40 UTC 2012] Starting server (port 2302)...

./arma2oaserver: line 110: /root/server/: is a directory

WATCHDOG (22469): [sun Apr 22 13:05:40 UTC 2012] Server died, waiting to restart...

WATCHDOG (22469): [sun Apr 22 13:05:45 UTC 2012] Starting server (port 2302)...

./arma2oaserver: line 110: /root/server/: is a directory

WATCHDOG (22469): [sun Apr 22 13:05:45 UTC 2012] Server died, waiting to restart...

WATCHDOG (22469): [sun Apr 22 13:05:50 UTC 2012] Starting server (port 2302)...

./arma2oaserver: line 110: /root/server/: is a directory

WATCHDOG (22469): [sun Apr 22 13:05:50 UTC 2012] Server died, waiting to restart...

WATCHDOG (22469): [sun Apr 22 13:05:55 UTC 2012] Starting server (port 2302)...

./arma2oaserver: line 110: /root/server/: is a directory

WATCHDOG (22469): [sun Apr 22 13:05:55 UTC 2012] Server died, waiting to restart...

WATCHDOG (22469): [sun Apr 22 13:06:00 UTC 2012] Starting server (port 2302)...

./arma2oaserver: line 110: /root/server/: is a directory

WATCHDOG (22469): [sun Apr 22 13:06:00 UTC 2012] Server died, waiting to restart...

WATCHDOG (22469): [sun Apr 22 13:06:05 UTC 2012] Starting server (port 2302)...

./arma2oaserver: line 110: /root/server/: is a directory

WATCHDOG (22469): [sun Apr 22 13:06:05 UTC 2012] Server died, waiting to restart...

WATCHDOG (22469): [sun Apr 22 13:06:10 UTC 2012] Starting server (port 2302)...

./arma2oaserver: line 110: /root/server/: is a directory

WATCHDOG (22469): [sun Apr 22 13:06:10 UTC 2012] Server died, waiting to restart...

WATCHDOG (22469): [sun Apr 22 13:06:15 UTC 2012] Starting server (port 2302)...

./arma2oaserver: line 110: /root/server/: is a directory

WATCHDOG (22469): [sun Apr 22 13:06:15 UTC 2012] Server died, waiting to restart...

WATCHDOG (22469): [sun Apr 22 13:06:20 UTC 2012] Starting server (port 2302)...

./arma2oaserver: line 110: /root/server/: is a directory

WATCHDOG (22469): [sun Apr 22 13:06:20 UTC 2012] Server died, waiting to restart...

WATCHDOG (22469): [sun Apr 22 13:06:25 UTC 2012] Starting server (port 2302)...

./arma2oaserver: line 110: /root/server/: is a directory

WATCHDOG (22469): [sun Apr 22 13:06:25 UTC 2012] Server died, waiting to restart...

WATCHDOG (22469): [sun Apr 22 13:06:30 UTC 2012] Starting server (port 2302)...

./arma2oaserver: line 110: /root/server/: is a directory

WATCHDOG (22469): [sun Apr 22 13:06:30 UTC 2012] Server died, waiting to restart...

WATCHDOG (22469): [sun Apr 22 13:06:35 UTC 2012] Starting server (port 2302)...

./arma2oaserver: line 110: /root/server/: is a directory

WATCHDOG (22469): [sun Apr 22 13:06:35 UTC 2012] Server died, waiting to restart...

WATCHDOG (22469): [sun Apr 22 13:06:40 UTC 2012] Starting server (port 2302)...

./arma2oaserver: line 110: /root/server/: is a directory

WATCHDOG (22469): [sun Apr 22 13:06:40 UTC 2012] Server died, waiting to restart...

WATCHDOG (22469): [sun Apr 22 13:06:45 UTC 2012] Starting server (port 2302)...

./arma2oaserver: line 110: /root/server/: is a directory

WATCHDOG (22469): [sun Apr 22 13:06:45 UTC 2012] Server died, waiting to restart...

WATCHDOG (22469): [sun Apr 22 13:06:50 UTC 2012] Starting server (port 2302)...

./arma2oaserver: line 110: /root/server/: is a directory

WATCHDOG (22469): [sun Apr 22 13:06:50 UTC 2012] Server died, waiting to restart...

WATCHDOG (22469): [sun Apr 22 13:06:55 UTC 2012] Starting server (port 2302)...

./arma2oaserver: line 110: /root/server/: is a directory

WATCHDOG (22469): [sun Apr 22 13:06:55 UTC 2012] Server died, waiting to restart...

WATCHDOG (22469): [sun Apr 22 13:07:00 UTC 2012] Starting server (port 2302)...

./arma2oaserver: line 110: /root/server/: is a directory

WATCHDOG (22469): [sun Apr 22 13:07:00 UTC 2012] Server died, waiting to restart...

WATCHDOG (22469): [sun Apr 22 13:07:05 UTC 2012] Starting server (port 2302)...

./arma2oaserver: line 110: /root/server/: is a directory

WATCHDOG (22469): [sun Apr 22 13:07:05 UTC 2012] Server died, waiting to restart...

WATCHDOG (22469): [sun Apr 22 13:07:10 UTC 2012] Starting server (port 2302)...

./arma2oaserver: line 110: /root/server/: is a directory

WATCHDOG (22469): [sun Apr 22 13:07:10 UTC 2012] Server died, waiting to restart...

WATCHDOG (22469): [sun Apr 22 13:07:15 UTC 2012] Starting server (port 2302)...

./arma2oaserver: line 110: /root/server/: is a directory

WATCHDOG (22469): [sun Apr 22 13:07:15 UTC 2012] Server died, waiting to restart...

WATCHDOG (22469): [sun Apr 22 13:07:20 UTC 2012] Starting server (port 2302)...

./arma2oaserver: line 110: /root/server/: is a directory

WATCHDOG (22469): [sun Apr 22 13:07:20 UTC 2012] Server died, waiting to restart...

WATCHDOG (22469): [sun Apr 22 13:07:25 UTC 2012] Starting server (port 2302)...

./arma2oaserver: line 110: /root/server/: is a directory

WATCHDOG (22469): [sun Apr 22 13:07:25 UTC 2012] Server died, waiting to restart...

WATCHDOG (22469): [sun Apr 22 13:07:30 UTC 2012] Starting server (port 2302)...

./arma2oaserver: line 110: /root/server/: is a directory

WATCHDOG (22469): [sun Apr 22 13:07:30 UTC 2012] Server died, waiting to restart...

WATCHDOG (22469): [sun Apr 22 13:07:35 UTC 2012] Starting server (port 2302)...

./arma2oaserver: line 110: /root/server/: is a directory

WATCHDOG (22469): [sun Apr 22 13:07:35 UTC 2012] Server died, waiting to restart...

Edited by paxodeus

Share this post


Link to post
Share on other sites

WATCHDOG (22469): [sun Apr 22 13:07:20 UTC 2012] Starting server (port 2302)...

./arma2oaserver: line 110: /root/server/: is a directory

You still use your root account to run server?

If you followed my suggestion, you should run it from /home/arma2

and edit your start-script as this

ARMA_DIR=/home/arma2

CONFIG=server.cfg

PORT=2302

PIDFILE=${ARMA_DIR}/${PORT}.pid

RUNFILE=${ARMA_DIR}/${PORT}.run

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

SERVER=${ARMA_DIR}/

OTHERPARAMS=-cpucount=2

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

Share this post


Link to post
Share on other sites

What if i cant use other account than root? And i MUST run it at root now? Its cannot be executed on root? Its impossible.

Share this post


Link to post
Share on other sites

since you are running it in root, create a directory in /opt/ i would suggest creating a directory called arma2 then upload the files and directories from the server arma2 stuff to that folder, then you can do the following once everything is uploaded and so fourth you need to chmod -R 0777 arma2 from the opt directory so all files and directories in the arma2 folder are read and write, then you need to open the 3 ports that arma2 uses in your iptables for connections.

then you can do the following to start you're server login as root like you normally do then go to cd /opt/arma2 then once you are in that directory do a screen so type in screen so it opens a new screen, then you type in

./server -config=yourconfigfile.cfg -cfg=arma2oa.cfg -cpuCount=whatevercpu count then that will start you're server (using root access) then you hold CNTL and hit D then A to un-attach the screen to go back to you're normal shell screen then you can check on your server by typing in screen -r and see what screen # it gave you then to go to that you type in screen -r # (# = whatever number)

Share this post


Link to post
Share on other sites

Cannot include file /home/arma2/config/arma2oa.cfg

Still have this problem.

Share this post


Link to post
Share on other sites

you do not seem to understand it would not go under /home/arma2/config/arma2oa.cfg open up your shell console under root access using putty, type in the following cd /opt then you will be in the opt directory then type in mkdir arma2 that will make the arma2 directory then upload your arma2 files and folders to that directory you just created. once you are done uploading all files to that directory then you can do what i told you above.

Or : you can pay me to do it for you :P its pretty simple i pretty much gave you the dumb'd down version on how to do it, not very technical at all..

Share this post


Link to post
Share on other sites

Great, on centos i run this server without problem in home/arma2 on debian i must use /opt ....make no sense.

Anyway

root@pax:~# cd opt

-bash: cd: opt: No such file or directory

So i have to make one?

Share this post


Link to post
Share on other sites

well i dont know about debian i know about centos that is what i run....that is how i set mines up.

Share this post


Link to post
Share on other sites

/opt is located in disk root/top folder. cd .. several times to go there, then cd opt.

As you might have seen, the difference between mattchicago an my suggestion is where to put arma2 dir. When you have chosen one, you have to correct all references/paths to fit your setup.

About linux root account; it's basically a super-user/administrator account, and should be used only for that. All other use/work should be done under normal accounts. That's for security reasons of course.

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  

×