Jump to content
Sign in to follow this  
d3nn16

Linux server 1.62.98939 issues

Recommended Posts

Hello,

Here is a list of issues I encountered while setting up and running Arma on a Linux server. If you have any fixes please share them.

1- First issue I encountered is that I didn't know which Arma Linux Server (ALS) to use with which Arma game patch

I tried Arma 1.62 with ALS 1.60 and was unable to see the server in the server list from gamespy, this was fixed by using latest beta of ALS (1.62)

I thought that ALS beta has to be used with Arma beta, apparently that's not the case. The beta is like any other mod, it doesn't mean you have to use ALS beta.

2- Is it normal that the host name configured in -config file is not used by ALS ? Instead it uses the Linux host name for all instances of ALS I run on the Linux machine. Is there a way to setup different hostnames for each ALS instance ?

3- The arma2oa.cfg file (aka basic.cfg in Wiki and configured by -cfg switch) cannot be moved to a different location with -cfg switch. When I do that I have errrors in stdout of ALS and the arma2oa.cfg file has only one line with "Windowed=0;". The log reports missing parameters like 3D_performance. So I am forced to edit arma2oa.cfg file inside ALS installation folder. This is problematic for me as I am gathering all configuration files in different folders for each ALS instance. For now I am using symbolic link to achieve the desired effect (edit arma2oa.cfg file in a different folder then the ALS install folder).

4- The -profiles switch doesn't work. The profile file is placed in <ALS install folder>/<server name configured with -name switch>/<server name>.arma2oaprofile. I am also using symbolic link for this too.

5- I want to have different missions for the different ALS instances and this seems impossible without copy/pasting the ALS install folder several times. I tried placing missions in <ALS install folder>/<server name folder>/mpmissions folder but they are not visible in the missions list.

6- The net.log switch only activates log creation in ALS install folder. I would like to have it in a custom folder.

6bis- Is ALS creating RPT files / crash dumps / etc. Would be nice to configure the location of these files outside the ALS install folder.

7- When installing the ALS server (just after expanding the a2oa-server-1.62.98939 archive in the Arma game folder) there are 2 folders called expansion (lower e) and Expansion (capital E). For the ./install script to run correctly I copied the beserver.so from expansion/battleye to Expansion/BattlEye and deleted expansion folder. If I don't delete the expansion folder ./install doesn't convert files to lower in Expansion folder.

8- I am running 4 ALS instances on the same server but I can only see 2 of them in the servers list (and both have same name because I cant' configure it with server.cfg file). The 2 other instances that are not visible were started after the first 2 instances. Also sometimes only one instance is visible in the servers list.

9- The arma2oaserver script has a problem. After reading the script I guess the expected behaviour of running "arma2oaserver start" a second time would be stopping the first instance and starting a new one. This is not the case. The older instance will still be runnning at the same time as the second one.

You can modify the script to do nothing when "arma2oaserver start" is run a second time and runfile exists.

        if [ -f ${RUNFILE} ]; then
               echo "ArmA 2 server is already started"
       else
               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 &
       fi

10- How can I run a Arma beta server? I don't mean using the ALS beta version but using the beta mod. Can I install the beta patch on an Arma game then install ALS over this and then use the same -mod switch value as I would use for the Arma game? Can I use the same folder of this Arma game on which I applied the beta patch for starting non beta ALS instances?

Regards

Share this post


Link to post
Share on other sites

1: In general, for ArmA II 1.xx, use whatever is the latest "ALS" v 1.xx.yyyyyy. Thus, today, for the current Arma II v1.62 patch, you should use "ALS" 1.62.101906

2, 3, 4: This is most likely due to this very old bug: Linux server strips the first slash on some command line options, at least -cfg/-config

The suggested workaround for that is to have two leading forwards slashes in absolute paths, eg

CONFIG=//path/to/my/config.cfg

5: As you have noticed, the mpmissions folder must be in the root of the ALS installation folder.

Different server instances must live in their own folders. Maybe you can just symlink the

addons, common, dta, keys and expansion folders and just have a unique mpmissions folder per instance.

(I have not tried this, so I do not know if that'll work. It's worth a try.)

6: Yes, AFAIK the netlog goes where it goes and you cannot change that.

6': The Windows .RPT file correspond to the log output that the ALS created (eg log.2302.txt)

Crash dumps end up in core.<PID> files (unless core dumps are disabled for the user runnng the ALS).

7: That's an unfortunate chicken-and-egg problem. You have uploaded the game data files from a

Windows installation, which has the "Expansion" folder with a capital first letter. Then you need

to convert all file names to lowercase, which is done by first extracting the ALS archive and

then you compile the "tolower" utility. The catch is that the ALS tar.gz archive contains

"expansion/battleye/beserver.so". This means that at the point you're about to run "./tolower" there

will be one folder named "Expansion" and another called "expansion". D-oh! :-)

The solution: before you run the "install" script, move beserver.so into Expansion/BattlEye/ and

remove the lower-case "expansion" folder:

$ mv expansion/battleye/beserver.so Expansion/BattlEye/
$ rm -rf expansion
$ ./install

8: This could be due to the other two servers suffering from the "leading slash bug" mentioned in 2 - two of the servers never start up properly.

9: Nice - that's a good way of reminding the admin to stop the ArmA II server before launching a new one.

10: Copy the Expansion/beta folder from your Windows machine into expansion/ on your Linux machine. Run ./tolower again for good measure. Then alter the OTHERPARAMS line in the arma2oaserver start script to something like this:

OTHERPARAMS="-cpucount=2 -beta=expansion/beta;expansion/beta/expansion"

Edited by Killswitch

Share this post


Link to post
Share on other sites

Your version is from November '12, it's been two updates since. Even if Nix can be a struggle sometimes, it's always a good option to use latest server. General game updates can render your server unplayable if you don't.

Hostname is declared in server.cfg e.g hostname = "My Awesome ArmA2 server"; // The name of the server that shall be displayed in the public server list

For different missions on different servers you need to symlink mpmission directory. If you're running, let's say dayz, haze and ace, I suggest you put your dayz missions do dayzmp, your haze missions do hazemp and ace to acemp and sym-link the folders to your start-script.

You cannot run several instances of a server on the same port, be sure you give each server different port number. You and your mom would most probably don't wanna read the same pages from net (e.g this nerdy stuff).

The arma2oaserver script has a problem. After reading the script I guess the expected behaviour of running "arma2oaserver start" a second time would be stopping the first instance and starting a new one.

Not sure where the problem is. How would your server understand you want to restart your server? Or start a new one (why would you)? This is a start-script, rename it to reflect e.g. server mods or use restart command to restart current server (arma2oaserver restart).

Share this post


Link to post
Share on other sites

Thanks both for your replies and suggestions.

I installed latest ALS v1.62.101906 (copied server file).

It didn't solve my problem of setting the server name through the config.cfg file. And I did set it like Overlord mentioned it (hostname = "My Awesome ArmA2 server"; ) but the server still shows up with the value returned by the Linux "hostname" command. But hopefully I found a workaround, I use the hostname command in the startup script (I copy the name returned by "hostname" and change it with "hostname toto" then I restore it). After playing around with sudo files (normal users cannot use hostname to change the host name but only to display it) I finally copied the hostname binary in my config folder and gave it the setuid bit.

@Killswitch

The "leading slash bug" doesn't seem to occur in my case since I can indicate an absolute path for -config switch that the sever actually respects. For -cfg switch I also use an absolute path and the file is generated by server if it doesn't exist (so I conclude it understands the path).

Here is what I get in the server log file when using -cfg switch with an absolute file path (whether the file exists or not and it is well filled):

Warning Message: Preprocessor failed on file /home/arma/config/ctf/test.cfg - error 1.
Include file home/arma/config/ctf/test.cfg not found.
Cannot include file /home/arma/config/ctf/test.cfg
Warning Message: Preprocessor failed on file /home/arma/config/ctf/test.cfg - error 1.
Warning Message: No entry '/home/arma/config/ctf/test.cfg.3D_Performance'.
Warning Message: '/' is not a value
Warning Message: No entry '/home/arma/config/ctf/test.cfg.adapter'.
Warning Message: '/' is not a value
Warning Message: No entry '/home/arma/config/ctf/test.cfg.Resolution_Bpp'.
Warning Message: '/' is not a value
Cannot include file /home/arma/config/ctf/test.cfg
Warning Message: Preprocessor failed on file /home/arma/config/ctf/test.cfg - error 1.
Include file home/arma/config/ctf/test.cfg not found.
Cannot include file /home/arma/config/ctf/test.cfg
Warning Message: Preprocessor failed on file /home/arma/config/ctf/test.cfg - error 1.
Warning Message: No entry '/home/arma/config/ctf/test.cfg.3D_Performance'.
Warning Message: '/' is not a value
Warning Message: No entry '/home/arma/config/ctf/test.cfg.adapter'.
Warning Message: '/' is not a value
Warning Message: No entry '/home/arma/config/ctf/test.cfg.Resolution_Bpp'.
Warning Message: '/' is not a value

I also noticed the PID file is not created when using -cfg switch.

8- All instances finally showed up after one day, but when I restart them some dissapear.

10- When installing the beta in Windows it adds a new executable which doesn't run on Linux. Have you already installed the beta mod in a Linux server? Does it work with ALS server for you?

@Overlord

For different missions on different servers you need to symlink mpmission directory. If you're running, let's say dayz, haze and ace, I suggest you put your dayz missions do dayzmp, your haze missions do hazemp and ace to acemp and sym-link the folders to your start-script.

This is what I ended up using: the mpmissions folder in the ALS install folder is a symlink to a folder near the startup script. But I was hoping to have a -mission switch that would indicate the mpmissions folder location.

The idea is to have one ALS install folder where executables+addons are and several folders where all config and runtime files are for each ALS running instance. This way patching the server is finger-in-the-nose (just edit startup script to point to latest ALS folder) whatever the number of instances you are running.

Not sure where the problem is. How would your server understand you want to restart your server? Or start a new one (why would you)? This is a start-script, rename it to reflect e.g. server mods or use restart command to restart current server (arma2oaserver restart).

The problem is that I simply execute "./arma2oaserver restart" and I end up with 2 server processes (one of which cannot listen to the 2302 port of course). This also happened to me while using start a second time.

Here is what I believe is the cause of restart spawning 2 processes (happened with ALS v1.62.101906 too for me), from the arma2oaserver script:

   restart)
$0 stop
$0 start

When I do "echo $0" it outputs "-bash". From this I guess that stop and start actions are run in parallel which means that stop doesn't kill the process before the new one starts.

I customized the startup script and removed the watchdog, this new script runs start/stop/restart without issues for me (no process duplication):

f_start() {
if [ -f ${PIDFILE} ]; then
	PID=$(< ${PIDFILE})
	if [ -f /proc/${PID}/cmdline ]; then
		echo "Server is already started (PID=${PID})"
	else
		echo "Starting server..."
		cd ${ARMA_DIR}
		local _HOSTNAME=`/home/arma/server_config/hostname`
		/home/arma/server_config/hostname ${SERVERNAME}
		nohup ${SERVER} >>${LOGFILE} 2>&1 -server -config=${CONFIG} -port=${PORT} -pid=${PIDFILE} ${OTHERPARAMS} < /dev/null &
		sleep 10
		/home/arma/server_config/hostname ${_HOSTNAME}
		f_status
	fi
else
	echo "Server status could not be checked, PID file is missing"
	echo "Stop any existing server process and create a PID file with a fake PID"
fi
}

f_stop() {
if [ -f ${PIDFILE} ]; then
	PID=$(< ${PIDFILE})
	if [ -f /proc/${PID}/cmdline ]; then
		echo "Stopping server..."
		kill -TERM ${PID}
		sleep 5
		if [ -f /proc/${PID}/cmdline ]; then
			echo "Server process could not be terminated (PID=${PID})"
		else
			echo "Server is stopped"
		fi
	else
		echo "Server is already stopped"
	fi
else
	echo "Server could not be stopped, PID file is missing"
fi
}

f_status() {
if [ -f ${PIDFILE} ]; then
	PID=$(< ${PIDFILE})
	if [ -f /proc/${PID}/cmdline ]; then
		echo "Server is running (PID=${PID})"
	else
		echo "Server is not running (PID=${PID})"
	fi
else
	echo "Server status could not be checked, PID file is missing"
fi
}





case "$1" in

   status)
f_status
;;

   start)
f_start
;;

   stop)
f_stop
;;

   check)
echo -n "Server 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}"
;;

   restart)
f_stop
f_start
       ;;

   *)
echo " (start|stop|restart|status|check)"
;;
esac

Share this post


Link to post
Share on other sites

What distro do you use?

Here's an example of how to use symlink in start-script:

Dayz server

    start)
        rm -f mpmissions
        ln -s dayzmp mpmissions
if [ -f ${RUNFILE} ]; then
    $0 stop
fi

Haze server

    start)
        rm -f mpmissions
        ln -s hazemp mpmissions
if [ -f ${RUNFILE} ]; then
    $0 stop
fi

Ace server

    start)
        rm -f mpmissions
        ln -s acemp mpmissions
if [ -f ${RUNFILE} ]; then
    $0 stop
fi

This will delete current symlink and create a new one with correct missions according to server mods.

Share this post


Link to post
Share on other sites

I noticed that motd (message of the day) is not considered either (as hostname). Do you have same issue with latest ALS server?

The server does read the passwordadmin, reportingIP, maxplayers, battleye parameters so not reading the config file can't be the cause.

Share this post


Link to post
Share on other sites

In your server cfg, be sure to use reportingIP = "arma2oapc.master.gamespy.com";

from default cfg file:

//reportingIP = "armedass.master.gamespy.com";		// This is the default setting. If you change this, your server 
//reportingIP = "arma2pc.master.gamespy.com";            // In case of ArmA2 might not turn up in the public list. Leave empty for private servers
reportingIP = "arma2oapc.master.gamespy.com";         // For Operation Arrowhead
//reportingIP = "";

Share this post


Link to post
Share on other sites

@Killswitch

The "leading slash bug" doesn't seem to occur in my case since I can indicate an absolute path for -config switch that the sever actually respects. For -cfg switch I also use an absolute path and the file is generated by server if it doesn't exist (so I conclude it understands the path).

Here is what I get in the server log file when using -cfg switch with an absolute file path (whether the file exists or not and it is well filled):

Warning Message: Preprocessor failed on file /home/arma/config/ctf/test.cfg - error 1.
Include file home/arma/config/ctf/test.cfg not found.
Cannot include file /home/arma/config/ctf/test.cfg
Warning Message: Preprocessor failed on file /home/arma/config/ctf/test.cfg - error 1.
Warning Message: No entry '/home/arma/config/ctf/test.cfg.3D_Performance'.
Warning Message: '/' is not a value
Warning Message: No entry '/home/arma/config/ctf/test.cfg.adapter'.
Warning Message: '/' is not a value
Warning Message: No entry '/home/arma/config/ctf/test.cfg.Resolution_Bpp'.
Warning Message: '/' is not a value
Cannot include file /home/arma/config/ctf/test.cfg
Warning Message: Preprocessor failed on file /home/arma/config/ctf/test.cfg - error 1.
Include file home/arma/config/ctf/test.cfg not found.
Cannot include file /home/arma/config/ctf/test.cfg
Warning Message: Preprocessor failed on file /home/arma/config/ctf/test.cfg - error 1.
Warning Message: No entry '/home/arma/config/ctf/test.cfg.3D_Performance'.
Warning Message: '/' is not a value
Warning Message: No entry '/home/arma/config/ctf/test.cfg.adapter'.
Warning Message: '/' is not a value
Warning Message: No entry '/home/arma/config/ctf/test.cfg.Resolution_Bpp'.
Warning Message: '/' is not a value

Your log output suggests that Bug 23261 is exactly what's occuring. Try using two leading forward slashes at the beginning of your absolute paths, eg
-cfg=//home/arma/config/ctf/test.cfg

10- When installing the beta in Windows it adds a new executable which doesn't run on Linux. Have you already installed the beta mod in a Linux server? Does it work with ALS server for you?

You only load the beta game content (.pbo addons) from the beta folder in Linux. The Linux "beta exe" is the ALS itself (1.62.101906). Yes, I have used the beta mod in Linux and yes it does work.

Hope that helps. Good luck! :-)

Edited by Killswitch

Share this post


Link to post
Share on other sites

Killswitch,

I was able to start the beta, thanks for tip.

-cfg=//path_to_cfg_file works. I also tested it for profiles: "-profiles=//path_to_profile_folder -name=profile" but it didn't create any "profile" folder in the /path_to_profile_folder. Is this another bug affecting -profiles switch?

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  

×