Jump to content
SaltyMedic

Linux trouble with HC on dedicated server

Recommended Posts

New to Arma 3 administration. I'll post as much info as I can think might be useful. If I need to post more info please tell me what.
 
I have an Ubuntu 14.04.3 headless server running at home. I'm wanting to add Arma 3 game hosting to its list of duties. Specs:

  • Intel Xeon E3-1246 V3  (3.5GHz Quad-Core Processor)
  • 16 GB Ram

I first installed steamCMD and then Arma 3. I followed this site mostly to get it running. I am able to connect to the server and play off of it.
 
https://medium.com/arma-3-server-administration/installation-and-configuration-of-an-arma-3-linux-dedicated-server-7875c9030b7#.mvkckrsyk
 
I've managed to create a couple of missions and now I'm wanting to get into adding a headless client.

 

I've followed Monsoon's tutorial for getting a HC running, but something isn't working for me.
 
I've been reading lots of pages, forums, etc. and nothing I've tried seems to work. There seems to be some conflicting information out there for this as far as things used to work one way and now they are no longer necessary. I'm not sure what is current or not.

 

At one point, I was able to get the HC to connect and it would then disconnect on its own within a minute (according to what my terminal was saying). Not successful. Now something that I've changed (and I can't track down what that was) it just starts up as another server instead of as a client trying to connect to the server. When I got to mulitplayer > LAN, it shows two servers. The one I tried to start up as a client is not connectable though, not that I want it there.
 
I'm running the server and HC all on the same machine. I'm running the playable Arma 3 game itself on a separate Windows 8.1 machine on the same LAN.

 

The terminal tells me the Arma 3 server I'm running:

Arma 3 Console version 1.54 : port 2302
 
Arma server config file contents:
 

//source: https:||community.bistudio.com/wiki/server.cfg
// server.cfg
//
// comments are written with "//" in front of them.
 
//Add headless client
headlessClients[]={"127.0.0.1"};
localClient[]={"127.0.0.1"};
 
// GLOBAL SETTINGS
hostname = "SaltyMedic Server";		// The name of the server that shall be displayed in the public server list
password = "XXXXX";					// Password for joining, eg connecting to the server
passwordAdmin = "XXXXX";				// Password to become server admin. When you're in Arma MP and connected to the server, type '#login xyz'
serverCommandPassword = "XXXXX";               // Password required by alternate syntax of [[serverCommand]] server-side scripting.
 
//reportingIP = "armedass.master.gamespy.com";	// For ArmA1 publicly list your server on GameSpy. Leave empty for private servers
//reportingIP = "arma2pc.master.gamespy.com";	// For ArmA2 publicly list your server on GameSpy. Leave empty for private servers
//reportingIP = "arma2oapc.master.gamespy.com";	// For Arma2: Operation Arrowhead  //this option is deprecated since A2: OA version 1.63
//reportingIP = "arma3" //not used at all
logFile = "server_console.log";			// Tells ArmA-server where the logfile should go and what it should be called
 
 
// WELCOME MESSAGE ("message of the day")
// It can be several lines, separated by comma
// Empty messages "" will not be displayed at all but are only for increasing the interval
motd[] = {
	"", "",  
	"Two empty lines above for increasing interval",
	"Welcome to our server",
	"", "",  
	"We are looking for fun - Join us Now !",
	"http://www.example.com",
	"One more empty line below for increasing interval",
	""
};
motdInterval = 5;				// Time interval (in seconds) between each message
 
 
// JOINING RULES
checkfiles[] = {};				// Outdated.
maxPlayers = 64;				// Maximum amount of players. Civilians and watchers, beholder, bystanders and so on also count as player.
kickDuplicate = 1;				// Each ArmA version has its own ID. If kickDuplicate is set to 1, a player will be kicked when he joins a server where another player with the same ID is playing.
verifySignatures = 2;				// Verifies .pbos against .bisign files. Valid values 0 (disabled), 1 (prefer v2 sigs but accept v1 too) and 2 (only v2 sigs are allowed). 
equalModRequired = 0;				// Outdated. If set to 1, player has to use exactly the same -mod= startup parameter as the server.
allowedFilePatching = 0;                        // Allow or prevent client using -filePatching to join the server. 0, is disallow, 1 is allow HC, 2 is allow all clients (since Arma 3 1.49+)
//requiredBuild = 12345				// Require clients joining to have at least build 12345 of game, preventing obsolete clients to connect
 
 
// VOTING
voteMissionPlayers = 1;				// Tells the server how many people must connect so that it displays the mission selection screen.
voteThreshold = 0.33;				// 33% or more players need to vote for something, for example an admin or a new map, to become effective
 
 
// INGAME SETTINGS
disableVoN = 1;					// If set to 1, Voice over Net will not be available
vonCodecQuality = 0;				// since 1.62.95417 supports range 1-20 //since 1.63.x will supports range 1-30 //8kHz is 0-10, 16kHz is 11-20, 32kHz is 21-30
persistent = 1;					// If 1, missions still run on even after the last player disconnected.
timeStampFormat = "short";			// Set the timestamp format used on each report line in server-side RPT file. Possible values are "none" (default),"short","full".
BattlEye = 1;					// Server to use BattlEye system
allowedLoadFileExtensions[] = {"hpp","sqs","sqf","fsm","cpp","paa","txt","xml","inc","ext","sqm","ods","fxy","lip","csv","kb","bik","bikb","html","htm","biedi"}; //only allow files with those extensions to be loaded via loadFile command (since Arma 3 build 1.19.124216)
allowedPreprocessFileExtensions[] = {"hpp","sqs","sqf","fsm","cpp","paa","txt","xml","inc","ext","sqm","ods","fxy","lip","csv","kb","bik","bikb","html","htm","biedi"}; //only allow files with those extensions to be loaded via preprocessFile/preprocessFileLineNumber commands (since Arma 3 build 1.19.124323)
allowedHTMLLoadExtensions[] = {"htm","html","xml","txt"}; //only allow files with those extensions to be loaded via HTMLLoad command (since Arma 3 build 1.27.126715)
//allowedHTMLLoadURIs = {}; // Leave commented to let missions/campaigns/addons decide what URIs are supported. Uncomment to define server-level restrictions for URIs
 
 
// SCRIPTING ISSUES
onUserConnected = "";				//
onUserDisconnected = "";			//
doubleIdDetected = "";				//
//regularCheck = "{}";				//  Server checks files from time to time by hashing them and comparing the hash to the hash values of the clients. //deprecated
 
// SIGNATURE VERIFICATION
onUnsignedData = "kick (_this select 0)";	// unsigned data detected
onHackedData = "ban (_this select 0)";		// tampering of the signature detected
onDifferentData = "";				// data with a valid signature, but different version than the one present on server detected
 
 
// MISSIONS CYCLE (see below)
class Missions {};				// An empty Missions class means there will be no mission rotation
 
missionWhitelist[] = {}; //an empty whitelist means there is no restriction on what missions' available

 
Arma server startup
 

#!/bin/bash
# Wrapper file to start the A3 server
# Server installation path
#serverConfigDir=â€<a3_install>/public/serverconfigâ€
serverConfigDir=â€serverconfigâ€
# Network settings used in -cfg param
networkConfig=â€$serverConfigDir/basic.cfgâ€
# Server configuration settings used in -config param
serverConfig=â€$serverConfigDir/server.cfgâ€
# Server profile and difficulty settings used in -name param
profileName=â€publicâ€
# Server-side mods
mods="mods/@cba_a3;mods/@lockheed_c130"
# Start server
./arma3server -cfg=â€$networkConfig†-config=serverconfig/server.cfg -name=â€$profileName†-mod=$mods -world=empty -port=2302 -noSound

 
Arma HC startup

#!/bin/bash

# define directories
HOME=/home/steam/
A3DIR=$HOME/arma3/install

# setup mods
MODS=â€â€;
#MODS+=â€@cup;â€
#MODS+=â€@allinarmaterrainpack;â€
#MODS+=â€@asdg_jr;â€
#MODS+="mods/@cba_a3;"
#MODS+="mods/@lockheed_c130;"
# execute
cd $A3DIR 
./arma3server −client −connect=127.0.0.1 −port=2302 −pass=XXXX -noSound −mod=$MODS

What the terminal shows where I run the arma server starup:

.
.
.
Attempt to override final function - rscunitinfo_script
Attempt to override final function - rscunitinfo_script
Attempt to override final function - rscunitinfo_script
Attempt to override final function - rscunitinfo_script
 8:19:03 BattlEye Server: Initialized (v1.207)
 8:19:03 Host identity created.
[S_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed.
Setting breakpad minidump AppID = 107410
 8:19:03 Game Port: 2302, Steam Query Port: 2303
 8:19:03 Initializing Steam server - Game Port: 2302, Steam Query Port: 2303
Arma 3 Console version 1.54 : port 2302
 8:19:04 Connected to Steam servers

What the terminal shows when I start a HC

.
.
.
Attempt to override final function - rscunitinfo_script
Attempt to override final function - rscunitinfo_script
Attempt to override final function - rscunitinfo_script
Attempt to override final function - rscunitinfo_script
 8:19:20 BattlEye Server: Initialized (v1.207)
 8:19:20 Host identity created.
[S_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed.
CreateBoundSocket: ::bind couldn't find an open port between 2303 and 2303
Arma 3 Console version 1.54 : port 2314

I've tried running it with no mods and there is no difference.

 

I'm at a loss as to more trouble shooting. Thanks for any help

 

Jason

Share this post


Link to post
Share on other sites

IIRC there are issues currently with running an HC on Linux dedi.. there is a thread here somewhere for this

Share this post


Link to post
Share on other sites

From the looks of it you need to change the port the hc starts with.

-port=2312

Also you might want to add the public ip for the server to both if these:

headlessClients[]={"127.0.0.1"};

localClient[]={"127.0.0.1"};

And use it for the connect command on hc start up.

Unless they changed something in 1'54 I'm not aware about that is always how I've connected them

Share this post


Link to post
Share on other sites

Thanks for the input, but that did not fix it either

The terminal window for starting the HC shows:

Attempt to override final function - rscunitinfo_script
Attempt to override final function - rscunitinfo_script
Attempt to override final function - rscunitinfo_script
Attempt to override final function - rscunitinfo_script
17:19:44 BattlEye Server: Initialized (v1.207)
17:19:44 Host identity created.
[S_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed.
CreateBoundSocket: ::bind couldn't find an open port between 2303 and 2303
Arma 3 Console version 1.54 : port 2314

I don't know why it shows starting on port 2314, the startup line I have says -port=2312

 

The terminal window for the server shows:

Attempt to override final function - rscunitinfo_script
Attempt to override final function - rscunitinfo_script
Attempt to override final function - rscunitinfo_script
17:15:31 BattlEye Server: Initialized (v1.207)
17:15:31 Host identity created.
[S_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed.
Setting breakpad minidump AppID = 107410
17:15:31 Game Port: 2302, Steam Query Port: 2303
17:15:31 Initializing Steam server - Game Port: 2302, Steam Query Port: 2303
Arma 3 Console version 1.54 : port 2302
17:15:32 Connected to Steam servers

I would think that if it was successful it would have shown that the HC connected in the server window

 

Thanks

 

Jason

Share this post


Link to post
Share on other sites

It definitely seems like it's still trying to start on port 2302. Sometimes this is an error with the start up cmd. A space or character where it shouldn't be. A few other things to check:

Did you double check the ports are actually open on the router/fire wall?

Did you try flipping the ports? Use 2312 for the server and 2302 for the hc?

Try without battle eye?

Share this post


Link to post
Share on other sites

I checked for spaces and whatnot on the startup line, no problems there.

 

The ports are open, but I'm doing this all within the network, so that shouldn't matter

 

I changed the variable in my server.cfg file for BattleEye from 1 to 0. I'm assuming that is how you start the server without battleye.

 

Tried flipping the ports. They started on their respective ports when flipped, but the -client just doesn't seem to start as client as it just starts as another server

 

It seems the -client flag is ignored

 

Thanks

Jason

Share this post


Link to post
Share on other sites

Well at least that shows something.

 

Also I'm not sure, but it seems to me you are not giving the HC either of these parameters either:

 

-name=

 

or

 

-profiles=

 

I use

 

-name=headlessclient

 

-profiles=C:\users\JD\Desktop\serverCFG's\

 

You can obviously use what you'd like, but it basically creates a directory in whatever folder to place the .Arma3Profile that you need for HC and the name is just what it calls itself when seen on the player list. I'm pretty sure they are both required.

 

Lastly, I've ALWAYS used public IP's and ports, even when they are on the same machine, it just guarantee's connection.

 

But that's pretty much all i got, maybe it is just a 1.54 build. I'm going to upgrade later today, so if i find anything i'll let you know.

Share this post


Link to post
Share on other sites

Thanks for the information.

 

As to the public IP, I have a dynamic public IP. I also have a domain name that updates to that changing IP. I've tried putting that domain name in there, and it doesn't have any affect. The tutorial I read said pointing it to 127.0.0.1 should work.

 

Here is my starup line:

./arma3server −client −connect=127.0.0.1 −port=2312 −pass=XXXXX -noSound -name=hc -profile=hc.Arma3Profile

Still, no joy. From what I understand, the default directory for the profile is ~/.local/share/Arma 3 - Other Profiles/

 

Within that, I have both hc and headlessclient directories. I'm not sure which one is supposed to be there. I did try putting in the absolute path to that profile file, and it still didn't work

 

Thanks

 

Jason

Share this post


Link to post
Share on other sites

I did not know you can use linux server installation for HC? I always assumed you have to use windows client with a own second serial number of the game?

 

can you point out to the linux HC tutorial you mentioned? I will try to reconstruct... thx.

Share this post


Link to post
Share on other sites

From what I've read, you don't need to buy a second copy of the game to run a HC. The arma3 server that runs on Linux will also run as a HC when started with the -client flag

 

Here's a link to Monsoon's tutorial

https://forums.bistudio.com/topic/178434-arma3-headless-client-guide/

 

From the BIWiki

https://community.bistudio.com/wiki/Arma_3_Headless_Client

 

Thanks for looking into this

 

Jason

  • Like 1

Share this post


Link to post
Share on other sites

that script did not work for me either... had the same error as you did.

 

what does work tho is this:

 

./arma3server -client -connect=127.0.0.1 -password=xxxx -port=2312
 
my 2nd server instance is running on port 2312 so if your server is running on port 2302 you have to give HC also the same port... so the HC knows what server on what port to connect to.
 
HC output:
Attempt to override final function - rscunitinfo_script
Attempt to override final function - rscunitinfo_script
Attempt to override final function - rscunitinfo_script
Attempt to override final function - rscunitinfo_script
13:54:39 Client connected: 127.0.0.1:2312
13:54:40  > Player headlessclient connecting
13:54:40  > Player headlessclient connected
13:54:41 Loading profile "HC"
 
I also only added like you ... this to server.cfg
//Add headless client
headlessClients[]={"127.0.0.1"};
localClient[]={"127.0.0.1"};

 

If I did not have that entry the server would kick the HC off the server again. Oh and the -pass=xxxx does not work you have to use -password=xxxx

 

EDIT: no idea why but the line does not work at all in a bash script...

 

For now I would recommend to run it in a screen.

 

i'm sure you can use this with mods like this:

./arma3server '-client -connect=127.0.0.1 -password=xxxx -port=2302 -mod=@mod1;@mod2;@mod3 -nologs'

  • Like 1

Share this post


Link to post
Share on other sites

Thanks so much for looking into that for me. I didn't think to try some of the changes that you made. I'm surprised the flag for password -pass and -password are different from the tutorial and what the BIWiki says. That's an important distinction.

 

I also had not thought to use the single quotes in the start line

 

I was able to get it to run from a script by using the single quotes

./arma3server '-client -connect=127.0.0.1 -password=XXXX -port=2302 mods=@mod1;@mod2'

Thanks so much for your help

 

Now to figure out how to use this headless client

 

Jason

Share this post


Link to post
Share on other sites

Damn, hadn't noticed that either.

 

There is plenty of good information out there on Headless Client. I generally just use this homemade script:

/*
Version 3
By Ryan [506th IR]
Simple script to transfer ownership of AI to a Headless Client.
Name the Virtual Headless Client HC in the mission editor.
Place the following:

[] execVM "scripts\simpleHC.sqf";

in init.sqf


*/

if (hasInterface) exitWith {};
_cycleCount = 0;
while {true} do
{
	if (isServer) then
	{
		if (!isNil "HC") then
		{
			_HCid = owner HC;
			_PlayerGroups = [];
			_AIGroups = [];

			{if ({isPlayer _x} count units _x > 0) then {_PlayerGroups pushBack _x;}; sleep 2} forEach allGroups;
			{if ({isPlayer _x} count units _x == 0) then {_AIGroups pushBack _x;}; sleep 2} forEach allGroups;
			{if !((groupOwner _x) isEqualTo _HCid) then {_x setGroupOwner _HCid;}; sleep 2} forEach _AIGroups;

		};
		if (isNil "HC") then
		{
		sleep 60;
		};
	};
	if(!hasInterface) then
	{
		if (_cycleCount < 5) then {_cycleCount = _cycleCount + 1; sleep 5;};
		if (_cycleCount isEqualTo 5) then {{if (count (units _x)==0) then {deleteGroup _x;}; sleep 2} forEach allGroups; 
		_cycleCount = _cycleCount - 5; sleep 5;};
	};
};

With a Virtual Entity named HC placed in the mission editor all AI will be transferred to HC ownership over time. It helps stabilize FPS, but does not give it too large of a boost that most everyone was hoping for.

  • Like 2

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

×