PDA

View Full Version : Server running as a service


imported_Ohmz
11-04-2003, 09:20 AM
First, let me apologize for the length of this post. I want to include enough detail to describe the problem accurately.

The problem is that the server refuses to run as a service for Windows 2000. I use FireDaemon to run it as a service the same way I do any other Q3 engine game - the others work fine. However, with CoD, it starts the process (I can see it from the task manager process list), but creates a file named __codmp and never fully starts up the server. I can tell it's not fully started because the process only takes up 3mb of RAM and the UDP port does not show up in a netstat -an, meaning it never bound the server to the port. The game will start up correctly if I run it manually using the same batch file that FireDaemon calls to run the gameserver. So it's something specific to CoD running as a background process.

Interestingly, this same setup works fine for me under Windows XP, using FireDaemon. Both the XP system and the Win2k Server have DirectX 9.0b. The only thing I can think of that is different between the two systems is that on the XP system I installed the game straight from the CDs, whereas on the Win2k Server the game was never installed - just copied via FTP. If I must install the game locally to make it work, I will pay to have it done (the server is 1500 miles away from me), but my gut feeling is that doing that will make no difference.

This problem is definitely CoD specific, because I can run any other game in this manner and it works fine - Q3, MoH, Halo, etc.

Anyone have any ideas? I will try contacting Activision as well, but I'm not too hopeful there. I'm wondering if they may have a special cvar or command line parameter that will fix this issue. Otherwise I may be stuck waiting for them to release a Windows dedicated server (if they even plan to). They must be doing something strange during the server initialization. I wouldn't doubt it since I've already noticed another peculiar problem where the server fails to run all of your config commands if you name your config file server.cfg. Any other filename appears to work fine.

-Ohmz

imported_Ohmz
11-04-2003, 10:11 AM
This probably goes without saying, but just in case, I am running the server like so:

codmp.exe +set dedicated 2 +exec codserver.cfg +map_rotate

-Ohmz

Irksome
11-04-2003, 10:17 AM
Have you checked the boxes console application and interact with desktop in Firedaemon? Also I assume you have tried deleting the service and installing a new one in case something went screwy?

imported_Ohmz
11-04-2003, 10:26 AM
Thanks for the reply. Yes, I did try that already, there was no difference, same problem. I also tried locating the game in a different directory structure and that made no difference either. I'm even using 8.3 compatible directory names. ;)

Another thing I find weird about the CoD dedicated server is that it displays an intro graphic when loading the server. I'm wondering if that might have something to do with the problem. I don't recall any of the other games doing this, including Q3, RTCW, ET, JK2 or 3, etc.

-Ohmz

Tighten
11-04-2003, 10:28 AM
Include your service parameters in your post.

I am currently running 37 COD servers as a service with WIN2k.

I don't use Firedaemon or serverdoc though. One of my partners who is also our programer made the program we use.

Here are some parameters:
-exe CodMP.exe -ip "yourip" -port 28960 +set sv_fps 20 +exec codserver.cfg +exec maps.cfg(if you want) +set maxclients # +set dedicated 2.

To trouble shoot why it is not running, here are a few things you can do.

Set up PcAnywhere and have the service interact with it, once you are on PCA then start the service, PCA will show you what is working and being exec'd and what is not.

Or, make a shortcut to the CoDMP.exe in the same directory where the main application is, launch the shortcut and look at the console.

You do not need to install the game on the server for it to run as a service.

If you need detailed help you can e-mail me so our conversation does not clutter these forums.

imported_Ohmz
11-04-2003, 11:52 AM
Thanks for the tips. I got it to work, but I'm not too happy with the solution. It requires that you have a user logged into the server at all times so that the gameserver can interact with the desktop of that user.

Here's hoping they come out with a dedicated server version that doesn't require desktop interaction to run. Why they made it that way to begin with is beyond me.

-Ohmz

Tighten
11-04-2003, 02:19 PM
Ok - Like I said I don't use firedaemon or server.doc but if it is installed as a service you don't need to stay logged in.

This work around may fix your problem.

Go to Computer management / users /new user. Make a user and set a password. Then add that user to the administrators, click apply or OK.

In "services" right click on the service name, properties/log-on/ and check "this account".

Now put the user name you have created along with that users password. This will make the service start under that user. It tells the program to use that user to start the program and believes that user is logged on and runs the service.

If I knew more about the proggy you were using I may be of more help.

imported_jeff
11-04-2003, 03:38 PM
OHMZ, we run FireDaemon for the AllAboutNothing.net servers and it works fine with CoD.

Here is our Fire Daemon entry info:

Working Directory: C:\Program Files\Call of Duty
Executable: C:\Program Files\Call of Duty\CoDMP.exe

Parameters: + set dedicated 2 + set net_ip 69.56.183.141 +exec main.cfg +set map_rotate

Note: there is not a space before the + set dedicated....
-------------------
Jeff
www.allaboutnothing.net
=[LLC]=AngryHomer

imported_IW-Inherent
11-04-2003, 03:54 PM
+set map_rotate should just be +map_rotate