Server setup notes

Jul 17, 2008 at 2:09 PM
Please use this thread for issues and questions on getting your server up and running (it is possible as is running with the latest build, just not as intuitive as I want it to be).

There was a bit of a confusion on getting the server code into CodePlex. My interface to source control wasn't working 100% so I kept pulling out a fresh copy to try again, by the end I had about 5 different trees with various levels of change in each of them. That's the cause of the source code not matching the zip file contents right now.

In any case, the other problem is performance counters (and usage reporting). In the original installer there was a tool to install some custom performance counters. This wasn't available in the codebase I was working on and I forgot about them. I'm assuming people might be seeing something like this in their event logs right now:

System.InvalidOperationException: The requested Performance Counter is not a custom counter, it has to be initialized as ReadOnly.
   at System.Diagnostics.PerformanceCounter.Initialize()
   at System.Diagnostics.PerformanceCounter..ctor(String categoryName, String counterName, String instanceName, Boolean readOnly)
   at Terrarium.Server.InstallerInfo.CreatePerformanceCounter(String id) in

I need to find my original files for Terrarium server to try to track down how to get the performance counters installed again.

Sorry about the problems. The issue is two-fold, I'm missing some files that were in the original installer and as a team decision we're not using any custom install tools so I have to use what's out of the box in Visual Studio (which isn't much when it comes to setting up databases and websites).

We'll have a fix for this, in the meantime any additional info you can post here would be helpful in tracking down missing bits. Thanks!
Jul 17, 2008 at 9:56 PM
Edited Jul 17, 2008 at 9:57 PM

I may be missing something obvious, but it looks like you will need to add a row to the VersionedSettings table with Version set to "Default" and Disabled set to "0". When I got my server running, I got the message about the "server is experiencing temporary difficulties". I tracked this down to the call to RegisterMyPeerGetCountAndPeerList webservice method, which in turn calls the TerrariumRegisterPeerCountAndList stored proc. The proc call was failing and not returning any data, so the client displayed the error message.

From what I saw, the TerrariumRegisterPeerCountAndList stored proc attempts to read a row from the VersionedSettings table that contains the settings for the current version. If that can't be found, then it looks for a row with a version of "Default". If there is now row for the current version, it attempts to write a row to the table with the default values. Since there is no default row, it bombs because the table doesn't allow NULL values to be inserted.

Anyway, I just added the row and got around this problem. Maybe there was something else that was the core issue, but I wanted to pass this along in case  it helps anyone else.

Jul 17, 2008 at 10:02 PM
Ooops..Just noticed that Bil already put out a patch for that!
Jul 18, 2008 at 3:03 AM

It's probably the former that's the fix. The schema I got should be fine. What I didn't get was the startup data (notice there's no tips). So maybe the startup of a new server there should be a row inserted. I modified the schema because the error was that it was trying to insert a null value, but maybe I shouldn't have. I need to look at the 1.2 server data again.

Jul 18, 2008 at 4:50 AM


Took a look at the original SQL setup file and found this:

-- ----------------------------------------------------------
-- Create Default Data
-- ----------------------------------------------------------

INSERT INTO VersionedSettings (Version, Disabled, Message)
VALUES        ('Default',0,'')


VALUES ('You can use Alt-Enter to enter a true Full-Screen view.')


So I need to roll the change back in the source tree and add this to the setup script.


Jul 29, 2008 at 4:18 AM

Hi guys,

We have a new codebase added today to the system which are the original missing tools from the 1.2 version. This includes the StyleEditor (that lets you create "skins" for the client application) and a server config/installer. For the 2.1 release that we're putting together (which will fix Vista DirectX problems) I'm going to include just the server config tool and create a new Server.msi installer. This will install the server code to c:\program files but run the serverconfig.exe after which will a) setup the website b) setup the database and c) install the performance counters.

This should correct server installs, peer counts, and a few other bugs.

Aug 2, 2008 at 7:38 PM
When is 2.1 going to be ready?