Jump to content
Sign in to follow this  
rexehuk

Running Arma 2 Server as a Service

Recommended Posts

Hey all, trying to get Arma2Server running as a service but having some issues namely the following error:

Could not start the mArmaServer service on Local Computer

Error: 1053: The service did not respond from the start or control request in a timely fashion.

The actual Arma2Server.exe starts and the dedicated server goes up, but the service produces that error and the server closes down.

Anyone got any ideas?

Service name: mArmaServer

Startup Type: Automatic

Path to Exec: C:\Arma 2 Game Folder\arma2server.exe -winxp -maxMem 2047 -profiles=mainprofile -name=server -port 2302 -config=server.cfg -mod=@ACE;@ACEX;@ACEX_PLA;@CBA;@ACEX_SM;@MAP;@FDF_Podagorsk;@FRAN_quesh_kibrul;@isla_duala;@zcommon

Logon Type: Local System + Allow interaction with desktop

Server: Windows 2003 > Updated with latest SPs and Frameworks.

Any ideas? :yay:

Thanks in advance,

Rob

Share this post


Link to post
Share on other sites

What did you do to create the service? The armaserver executable was not created to be run directly as a service. Most that I know use a batch file to keep the program running, but there is a way, I'll see if I can dig up an old thread.

edit: even better, a Microsoft KB article.

The resource kit required for Server2003 to do this can be found here.

Edited by bhaz

Share this post


Link to post
Share on other sites

Already using that. Created exactly in the same manor as indicated in the article. Which is the reason I'm stumped :D

Share this post


Link to post
Share on other sites

Just so we're on the same page, this is what you did to create the service:?

  1. Use "sc " to create a new service that launches "srvany " (e.g. sc create MyService binPath= C:\Windows\System32\srvany.exe DisplayName= "My Custom Service" )
  2. Using RegEdit : create a "Parameters " key for your service (e.g. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MyService\Paramaters\ )
  3. Using RegEdit : within the newly created "Parameters " key , create a string value called "Application " and enter the full path to the application you are wanting to run as a service. (No quotes required.)

Also, check out your arma2.RPT file, the server could just be crashing by itself.
@FDF_P odagorsk

There's also a space there if you hadn't noticed.

edit:

One thing I just thought of, the parameters key may not like the use of semicolons, try launching without the -mod= parameter.

---------- Post added at 12:19 PM ---------- Previous post was at 11:45 AM ----------

Gave it a shot myself, using the instructions on the quote I posted above, seems to work alright.

I just threw srvany.exe in the root of C:\ and command lined this. (note the spaces after =, from what I remember they are required):

sc create TestService binPath= C:\srvany.exe DisplayName= "Test Service"

Registry settings in the spoiler.

serviceb.jpg

All I can suggest at this point is to start from scratch and keep it really basic until it actually works, (ie: no mods, configs, maxmems etc).

Edited by bhaz

Share this post


Link to post
Share on other sites

Cheers Bhaz. I managed to get it all working correctly along with a custom application I was writing for our dedi server.

In the end I opted for a wrapper class: http://kenai.com/projects/winsw/pages/Home

That tool works really well if you have the need to edit a servers modline/path without editing the direct services.

Thanks again,

Rob

Share this post


Link to post
Share on other sites

Pretty sure it will work with betas... that is just a modline added.

Here is an example config I used

<service>

<id>tArmaServer</id>

<name>ArmA 2 Test</name>

<description>Arma Test Service</description>

<executable>C:\ArmA 2 Mission Testing Server\arma2server.exe</executable>

<logpath>C:\Arma 2 Game Folder\logs</logpath>

<logmode>roll</logmode>

<startargument>-winxp -maxMem 2047 -profiles=missiontestprofile -name=server -port 2330 -config=server.cfg -mod=@ACE;@ACEX;@ACEX_PLA;@CBA;@ACEX_SM;@MAP;@FDF_Podagorsk;@FRAN_quesh_kibrul;@isla_duala

</startargument>

<interactive />

</service>

To make this work you need tArmaServer.exe (renamed from binary you download) and tArmaServer.xml with the code about in it and <id> matching the filename (tArmaServer.xml/exe).

Once that is done you simply run tArmaServer -install, and then you can proceed to call the service as you choose whether that be via windowsAPI servicecontrollers or manually via bat files and/or services.msc.

Share this post


Link to post
Share on other sites

-maxmem needs an = in there else thats just a broken switch

all the way through these threads you have -maxmem 2047, try -maxmem=2047, azs far as i can see you aren't actually running the maxmem switch with this command line argument.

If your happy with it, delete the whole -maxmem 2047, if you want to run it sstick the = in.

Share this post


Link to post
Share on other sites
Pretty sure it will work with betas... that is just a modline added.

It's not only a modline. As I know, you need to start the process from the arma2 installation directory with name beta\arma2server.exe so that Addons and Dta are first searched there.

Then, the -mod=beta will allow files in beta\Addons and beta\Dta to be loaded.

I don't know it overwriting PBOs from the beta\ subfolders into the original will work.

The winsw syntax talks about a "BASE", but it's set by itself.

I'll give it a try anyway.

Will restart when arma2server.exe crashes and dumps?

Share this post


Link to post
Share on other sites
It's not only a modline. As I know, you need to start the process from the arma2 installation directory with name beta\arma2server.exe so that Addons and Dta are first searched there.

Then, the -mod=beta will allow files in beta\Addons and beta\Dta to be loaded.

I don't know it overwriting PBOs from the beta\ subfolders into the original will work.

The winsw syntax talks about a "BASE", but it's set by itself.

I'll give it a try anyway.

Will restart when arma2server.exe crashes and dumps?

All you'd need to do this change this in the config

<executable>C:\ArmA 2 Mission Testing Server\arma2server.exe</executable>

to

<executable>C:\ArmA 2 Mission Testing Server\beta\arma2server.exe</executable>

And add the -mod=beta into parameter field. I am confident that would work for you.

Also thank you for people spotting some syntax errors in the modline, this application is a work in progress so they are my test configs. Depending on how things go it may be released to the community, for now it is a specialised dedicated server tool coded to work with our server.

Rgds,

Rob

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  

×