Copyright © 2006 Together Teamlösungen EDV-Dienstleistungen GmbH
All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying, recording or otherwise, without the prior written permission of the Together Teamlösungen EDV-Dienstleistungen GmbH.
Together Teamlösungen EDV-Dienstleistungen GmbH DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
Table of Contents
This document describes the steps required to install Together Application Cluster on a Microsoft Internet Information Server web server.
Intel 80386 or later CPU, or compatible for the IIS server. (Pentium 200Mhz or faster recommended)
Before installing Together Application Cluster it will be helpful for you to obtain the following information about your planned site:
The list of machines on which you will be running Enhydra MultiServer instances.
The list of applications you intend to run on the Enhydra MultiServers.
For each application:
The name of the machine and the port number on which each instance of the application will run. The port number is the 'port' used when configuring a connection of type 'EnhydraDirector' using the MultiServer Admin application.
The URL prefix to be used to identify the application. (For example '/demoApp')
Whether the application requires 'session affinity'. That is, whether requests for the same session to an application should always be routed to the application server instance that created the session. Unless your application supports distribution of its sessions among other instances, you should assume that session affinity is needed. (However, if your application does not use session information at all, you do NOT need session affinity)
The name of the IIS web server instance on which you wish to configure Together Application Cluster.
The port number of the IIS web server instance on which you intend to configure Together Application Cluster. By default, this is port 80 (http).
Windows NT Installation:
Install Windows NT 4.0 and Service Pack 6 according to the Microsoft documentation and your organization's requirements. Together Application Cluster Requires:
TCP/IP Networking Support
Internet Information Server 4.0 or later.
Windows NT Configuration:
If you have not already done so, configure TCP/IP networking on at least one of the network interfaces on your system. Then, configure IIS 4.0 or later.
SAPI Filter: EnhydraFilter.dll
This is an ISAPI header preprocessing filter that reroutes Enhydra application URLs to the Together Application Cluster ISAPI Handler application. It may be configured either as a global ISAPI filter or as a local filter on a particular web server instance. If configured as a local web server instance, it will only route Enhydra URLs for the configured web server. If the filter is applied globally, then it will reroute Enhydra URLs for all IIS web servers on the system. See below for details on configuring the filter.
ISAPI Handler Extension: EnhydraHandler.dll
This is an ISAPI extension DLL that does the actual work of forwarding an Enhydra request to the correct Enhydra application server. It must be installed on each IIS web server instance that will serve your application's URL prefix. For example, if you have configured IIS to enable the web server 'www.myhost.com', and you want your application to be located at 'http://www.myhost.com/myApp', then you must enable the EnhydraHandler.dll extension on the www.myhost.com Web server instance. See below for details on configuring the handler.
Together Application Cluster Configuration File: enhydra_director.conf
This file contains the configuration for Together Application Cluster. If you configured EnhydraFilter.dll as a global filter, then there will only be one instance of this file system-wide that controls the configuration for all IIS web server instances on the system. If the filter was configured for specific servers, then a different instance of this file will exist for each server. The configuration file must be located in the same directory as the EnhydraFilter.dll.
These instructions assume that you will install the TAC files into 'C:\TAC'. If you wish to install the files in some other location, replace 'C:\TAC' with your own installation directory in all of the following steps.
Step 1: Obtain the Together Application Cluster files.
Download the ISAPI Together Application Cluster ZIP file or build the DLLs from the source code.
Step 2: Install the Together Application Cluster files.
If you downloaded the ZIP file, extract its contents into the directory 'C:\TAC'. If you built the files from the source code, copy the necessary files to this directory. After building from source, you would copy tese files to 'C:\TAC':
'.../isapi/EnhydraFilter/<Config>/EnhydraFilter.dll'
'.../isapi/EnhydraHandler/<Config>/EnhydraHandler.dll'
'.../isapi/enhydra_director.conf.default'
The '<Config>' token should be replaced with 'Debug' or 'Release', depending upon which configuration you used when building from the source.
When you are finished extracting or copying the files, the directory 'C:\TAC' will contain the following files:
EnhydraFilter.dll
EnhydraHandler.dll
enhydra_director.conf.default
This document assumes that you have already successfully built your application and installed your Enhydra multiserver and the application. It also assumes that you are using the MultiServer Admin application to add the connections for the application.
Step 1: Create Together Application Cluster connections for your application.
Bring up the MultiServer Administration page for your Enhydra server instance.
Select your application in the application list.
Click on the 'Connections' tab to manage connections for your application instance.
Within the 'Connections' tab, click 'Create'. A 'new connection' dialog box will appear.
In the dialog box, check 'EnhydraDirector' as the connection type.
Fill in the URL prefix and port. Also, if session affinity is NOT to be enabled, change the session affinity box from 'true' to 'false'.
Click 'OK' to accept the new connection.
In the main MultiServer admin page, click the 'Save State' floppy-disk icon to save your changes to the MultiServer configuration file. Click 'OK' to accept the rewrite of the configuration file.
Step 1: Stop IIS
Open the 'Services' dialog from the Control Panel. Start->Settings->Control Panel, then double click 'Services'.
Find the entry for 'World Wide Web Publishing Service' and select it.
Click 'Stop' to stop the 'World Wide Web Publishing Service'.
IIS is now stopped.
Step 2: Install the filter. (If installing globally - see below if not global)
Start the IIS Internet Service Manager program: Start->Programs->Windows NT 4.0 Option Pack->Microsoft Internet Information Server->Internet Service Manager
In the tree-view pane containing the folder 'Console Root', expand the sub-folder 'Internet Information Server' if it has not already been expanded. You should see a small computer icon next to the name of your machine.
Right click on the name of your machine. (NOT 'Default Web Site'!) You should now see a pop-up menu with a number of choices, including 'Properties'.
Click the 'Properties' menu item. This will bring you to the dialog box '* <YourServerName> Properties'.
In the 'Master Properties' frame, Select 'WWW Service' in the selection box, and then click 'Edit' to edit the master IIS properties for your machine. This will bring up the 'WWW Service Master Properties for <YourServerName>' dialog box.
Select the 'ISAPI Filters' tab in this dialog box.
If the 'EnhydraFilter' filter is already installed, remove it.
Click 'Add...'. This brings you to the 'Filter Properties' dialog box.
For the 'Filter Name' property, enter 'EnhydraFilter'.
For the 'Executable' property, type in or browse for the file 'C:\TAC\EnhydraFilter.dll'.
Click 'OK' to accept the filter name and executable.
Back in the 'WWW Service Master Properties' dialog box, click 'Apply' to add the filter. The filter will NOT become active until IIS is restarted. (later)
Click 'OK' in the 'WWW Service Master Properties' dialog box to dismiss it.
The filter is now installed and will become active when IIS is restarted.
*OR* Step 2: Install the filter. (If installing for a specific server)
Start the IIS Internet Service Manager program: Start->Programs->Windows NT 4.0 Option Pack->Microsoft Internet Information Server->Internet Service Manager
In the tree-view pane containing the folder 'Console Root', expand the sub-folder 'Internet Information Server' if it has not already been expanded. You should see a small computer icon next to the name of your machine.
Right click on the entry for your web site instance, or on 'Default Web Site' for the IIS default web site instance. You should now see a pop-up menu with a number of choices, including 'Properties'.
Click the 'Properties' menu item. This will bring you to the dialog box 'Default Web Site Properties'.
Select the 'ISAPI Filters' tab in this dialog box.
If the 'EnhydraFilter' filter is already installed, remove it.
Click 'Add...'. This brings you to the 'Filter Properties' dialog box.
For the 'Executable' property, type in or browse for the file 'C:\TAC\EnhydraFilter.dll'.
Click 'OK' to accept the filter name and executable.
Back in the 'Default Web Site Properties' dialog box, click 'Apply' to add the filter.
Click 'OK' in the 'Default Web Site Properties' dialog box to dismiss it.
The filter is now installed.
Step 3: Install the handler. (Repeat as needed for multiple IIS web sites).
Start the IIS Internet Service Manager program: Start->Programs->Windows NT 4.0 Option Pack->Microsoft Internet Information Server->Internet Service Manager
In the tree-view pane containing the folder 'Console Root', expand the sub-folder 'Internet Information Server' if it has not already been expanded. You should see a small computer icon next to the name of your machine. Underneath this, you should see entries for your web site(s). If you only have one web site on this system, it will usually be set up as 'Default Web Site'.
Expand the sub-tree for the web site.
If a virtual directory called 'EnhydraDirector' already exists, remove it.
Right click 'Default Web Site' (or the name of an alternate web site) and select 'New->Virtual Directory' from the pop-up menu. This will Bring you to the 'New Virtual Directory Wizard'.
The 'alias' to use for the virtual directory MUST be 'EnhydraDirector'. Case is important!
Click 'Next' in the wizard.
For the physical path, type in or browse, and enter 'C:\TAC'.
Click 'Next' in the wizard.
For the permissions, check the 'Allow Execute Access' and uncheck all other permissions. The 'execute' permission MUST be checked in order for the handler to work properly.
Click 'Finish' to add the new Virtual Directory.
The handler is now installed for the selected WWW server instance. Repeate Step 3 for each WWW server on which you intend to use Together Application Cluster.
Step 4: Create the configuration file.
Create the file 'C:\TAC\enhydra_director.conf'. The easiest way to do this is to copy the 'enhydra_director.conf.default' file to 'enhydra_director.conf'. The full description of the syntax and all of the directives available in the configuration file is beyond the scope of this document. However, the default file contains several useful examples that can be easily copied to match your site setup. The comments within the default file also describe most of the available options.
An important thing to note is that the configuration file is based on an XML DTD (EnhydraDirectorConfig.dtd) and is strictly validated. This means the the file MUST contain valid XML, and it MUST follow the format defined in the DTD. Case is important in all section and property names, and order is important among different sections.
Step 5: Start IIS
Open the 'Services' dialog from the Control Panel. Start->Settings->Control Panel, then double click 'Services'.
Find the entry for 'World Wide Web Publishing Service' and select it.
Click 'Start' to start the 'World Wide Web Publishing Service'.
IIS should now be running.
Step 6: Verify correct startup.
Run the 'Event Viewer' Start->Programs->Administrative Tools (Common)->Event Viewer.
Check the 'Application' log for EnhydraFilter events. You should see an event from the filter indicating that it processed the configuration file successfully.
Step 7: Verify connectivity
Start up a web browser.
If you have configured a <Status> section in the configuration, you can connect to its URL prefix to ensure that the handler is functioning. See the default configuration file for more information on the <Status> section.
Connect to one of your configured application prefixes.
If connection errors occur, they are logged to the Application event log and can be viewed with the 'Event Viewer'.
Problem: EnhydraFilter.dll fails to load when IIS is started.
Check that the IIS configuration has the right path for the filter DLL.
Check the 'Application' event log for errors reported by the filter or by IIS.
Ensure that the enhydra_director.conf file exists and contains valid and syntactically correct configuration data. If the syntax is not valid, the filter should report the specific errors and line numbers to the Application event log.
Problem: The Filter starts up OK but I can't connect to my application.
Check the application event log for EnhydraHandler error reports.
If you configured the <Status> section, check the status prefix for connection failures to your back-end Enhydra servers.
Make sure that the prefixes configured in enhydra_director.conf match the prefixes configured for your application on the Enhydra server. The prefixes MUST match EXACTLY, including case! Trailing slashes in the prefix are not significant and are ignored.
Make sure that the application servers and ports in the enhydra_director.conf file refer to valid and running instances of your application.
Make sure your application is running on the Enhydra server.
You application must use the 'EnhydraDirector' connection method on ports that the IIS handler will dispatch requests to.
It is highly recommended to configure the '<Status>' section in the configuration file so you can examine the runtime state and configuration of the handler.
Problem: The Event Log messages contain no newlines.
This a Windows NT problem that happens right after you first install an application that registeres itself with the event logger. If you reboot Windows NT this problem goes away.
Problem: MSVCRTD.DLL not found
You are trying to run a 'Debug' compiled version of the filter or handler, and do not have the Debug runtime libraries installed. These libraries come with Microsoft Visual C++.
Problem: IIS crashes with "Unhandled Exception", or the Web Application Manager reports that the handler is dying.
Hopefully you won't see this. :)
This is evidence of an error in the handler or filter DLL that needs the attention of Lutris engineers.
There's also the possibility that there is a bug in IIS.
Please report any bugs of this nature the Enhydra.org folks, at www.enhydra.org. The more details you can provide about what led to the failure, the better. Also, machine state information and configuration information is helpful.
If you have a way to reproduce the bug consistently, PLEASE include the necessary steps to do so if it is at all possible. This is VERY helpful when trying to resolve software problems.