Monday, April 20, 2009

The Dangers of Not Paying Attention to Software Prerequisites

What to do if you get a Method not found error in the LENS Alert Agent...

The other day I was doing a demo of LENS using someone else's laptop. This is a bad idea in most situation, but I was in a hurry. I think that's the first excuse of every software developer whenever something goes wrong. Everything was going well until I tried to switch servers, at which point I received the following error.
Method not found: 'Boolean System.Threading.WaitHandle.WaitOne(Int32)'.
Have you ever been in the middle of a demo and have your own code crash in front of everyone? It's not pleasant. Fortunately, I knew exactly what the problem was. In setting up the demo, I had neglected to check that the .NET Framework 2.0 SP2 was installed (see my April 10 post for more information). It had .NET 2.0, but not SP2. The installer correctly detects .NET 2.0, but fails to complain if SP2 is missing. Upgrading the system to SP2 solved the problem.

The moral of this story is twofold:
  1. Always verify the system requirements before installing software. Don't expect the installer to be smart enough to detect subtleties like which service packs are installed.
  2. Try not to use other people's PCs when doing demos in front of customers.
I intend to fix this issue in the next Alert Agent release, and hopefully make the installer "service pack aware." In the meantime, should you receive the above exception, you'll know how to fix it: just install .NET 2.0 SP2.

Note: you may also install .NET 3.5, SP1 which contains .NET 2.0 SP2 and provides additional functionality for other (newer) applications you may install.

Friday, April 10, 2009

LENS Server Software Requirements and Configuration

This is a follow up to my post awhile back on Configuring the CS 1000 for LENS and Locate911. I've been receiving a lot of questions on the actual configuration and system requirements for our software version of LENS.

Officially, our system requirements are as follows:
  • Windows Server 2003 or later
  • Microsoft .NET Framework 2.0 Service Pack 2 or later (Requires users to be current with all .NET updates from Microsoft. Note: These updates are not automatically installed as they are not required security updates. Users must go into Windows Update and select the updates to be installed. A reboot is recommended after such an update.)
  • Windows SNMP Service installed and running
So let's go through that list one at a time. As noted above, we officially support Windows Server 2003 or later, though I've been able to get it to run on other Windows versions. Unless you're simply testing the Trial Version of LENS, I highly recommend you stick with a supported server installation for something as critical as 911 notifications. With that in mind, I'm focusing on installing the product on a fresh copy of Windows Server 2003.

On my default installation of Windows Server 2003, the .NET Framework and the Windows SNMP Trap Service were not installed. If that's the case with you, you'll need to install SNMP first. Instructions on doing that can be found here.

The next thing you need is the latest version of the .NET Framework 2.0, which can be found here.

Something worth pointing out is the unintuitive numbering scheme that Microsoft uses on the .NET Framework. Many people think that because they have .NET 3.0 installed, they already have something newer than .NET 2.0 SP2. This is not the case. Most of the .NET Framework installations do include the older versions, but it's not clear by looking at the version number what service packs may also be included. An explanation of what gets installed with which version can be found in this Microsoft Knowledge Base article. According to that article, .NET 2.0 SP2 is not available separately, but that's only the case for Vista and later. If you are running XP or Windows Server 2003, you can install .NET Framework 2.0 SP2 from here. My personal recommendation is that you upgrade your .NET Framework (2.0 or later) to the absolute latest service pack, and keep your framework up to date using Windows Update.

Now that .NET and SNMP are installed, you can get on with installing the LENS Server. The installer is fairly simple and has no user-defined options other than where to install it. On my Windows Server system, the installation requires exactly 1,064,960 bytes (or just under 1 MB).

Once the server is installed, it's still not running. You can use the Windows Services MMC Snap-in if you prefer, but we have provided an application to allow you to configure the server and its dependent services from one place. Look in the Start menu for the "Configure LENS Server" application and run it.

Notice that by default on my system, all three service components are currently stopped. Before you start any of them, make sure the application is configured the way you want it, and click Apply. Then you can start the services, in order, from top to bottom.

The first thing you need to do is configure your server's IP address. This is the address the LENS Alert Agents will connnect to, so make sure you select the right one from the Server IP Address dropdown.

Next, decide whether or not you want to use the map link generator. (This feature is not enabled in the Trial version.) If your Nortel PBX is a CS 1000 Release 5.0 or later, you can use this feature. Essentially, any time it receives an emergency call containing an Emergency Response Location (ERL), it adds a map link to the notification's details. The way it accomplishes this is to append the contents of the two fields, OSN Map Link Label and OSN Map Link to the Alert Details, substituting the string <erl> with the actual ERL number. Thus, if the OSN Map Link is http://www.mycompany.com/maps/map_<erl>.html and the ERL is 105, the link that appears in the Alert Details window will be http://www.mycompany.com/maps/map_105.html. Simple, but effective. Note that these links are not checked for validity, so if you don't actually provide a real target for all possible links, your users may end up with 404: Page Not Found errors when they click on them. If you leave the fields blank, or no ERL exists in the alert, then no link will be generated. ERLs are described in this recent post.

Once you've set these options, feel free to click Apply and start the services. You'll notice that if everything is working, the Messaging Daemon will start automatically with the eTelemetry LENS Server. Should the Messaging Daemon not start, stop the LENS Server, change your IP Address, click Apply, and try again. That usually clears things up. The main cause of the Messaging Daemon not starting is a bad IP address, so make sure you've selected the right one.

I've been asked about memory usage in the LENS Server, so here are some real numbers. According to the Windows Task Manager, the SNMP Trap service is using 2mb and the LENS Server Service is using 16mb. Given that neither application stores information locally, these numbers don't tend to change much during their execution.

If you are running the full LENS Server (as opposed to the trial), it's time to set up the Email functionality. Click the Email tab and fill in all of the available information. The only optional field is the From Name. Make sure you have a working mail server. When you're finished, click Apply, and then restart the LENS Server. The LENS Server only reads its configuration at start up, so you must restart it.

If you want to test your email configuration, I recommend that you use 911 Misdials rather than actual 911 calls. Misdial Prevention is standard on CS 1000 5.0 and later, and is available as a free patch for older systems back to Release 24. See your Nortel support personnel for more information on obtaining and installing this patch.

At this point you should have a working LENS Server up and running. Install the LENS Alert Agent on as many Windows PCs as you'd like (only one on the Trial Version), and use them to know precisely when and where anyone on your network has dialed 911. As always, feel free to post comments and/or questions.

In a future post I will discuss the system requirements and configuration options for the LENS Alert Agent, along with some more creative ways it can be used.