Enhydra Multiserver on NT Server 4.0
by Tori Harris,The purpose of this document is to provide general information for use when setting up production servers (web and application). This document does not attempt to provide detailed instructions for building the servers. Instead, the intention is to supplement existing documentation with specific, timesaving information. Where possible, references to the full documentation are provided in this document. It is critical to read and understand the vendor-provided documentation first, then return to this document for specifics pertaining your production environment.
Installing Java on the Web/Application Server:
Relevant Documentation: Java 2 SDK readme file (C:\jdk1.2.2)
The installation of Sun's Java Software Development Kit (SDK) is very straightforward as of version 1.2.2. Note that this document was writen with version 1.2.2_005. Also note that there are currently problems with version 1.3 that prevent it from being used with "Serve Anything" as an NT service.
The following general steps should be used as a guideline for installing the SDK.
Installing Enhydra on the Web/Application Server:
Relevant Documentation: "Getting Started with Lutris Enhydra"
(http://www.enhydra.org/software/documentation/enhydra/index.html)
Lutris has greatly simplified and improved the installation process for Enhydra with version 3.0. This document was written with version 3.0.1.
The following general steps should be used as a guideline for installing Enhydra.
For example, change the default path from:
PATH=/bin:/usr/local/bin:/usr/local/enhydra/bin:$PATH
to:
PATH=/bin:/usr/local/bin:/usr/local/enhydra3.0.1/bin:$PATH
CTRL+C
within the console window to stop the application.Configuring Enhydra Multiserver to Run as an NT Service:
Relevant Documentation: srvany.doc
The "Serve Anything" (srvany) application included with the NT Resource Kit allows us to run the Enhydra Multiserver as an NT service. This arrangement is advantageous since the service will continue to run when a user logs on or off, will restart when the server restarts (if configured to do so), and can be monitored by various third party applications. The Srvany.doc file included with the application does a reasonably good job of describing the process required to install and run an application as a service. Note that it will be necessary to know the permanent location of the Srvany.exe file prior to installation.
Since we are running Enhydra Multiserver, which is nothing more than a Java application, we must supply all required parameters for running the application. In general, we must provide the exact same information as if we were running the application from a command prompt.
Note: Use extreme caution when editing the NT registry. An error may cause unpredictable results, including the requirement for a complete server rebuild.
The following is an Enhydra Multiserver-specific summary of the installation documentation for Serve Anything. Please review the "Srvany.doc" document before attempting an installation of the Enhydra service. These instructions assume that Enhydra is installed and functioning on your server and that you have a copy of Serve Anything from the NT 4.0 Resource Kit.
instsrv Enhydra c:\enhydra\srvany.exe
This will install the Enhydra service, which can then be accessed using the Service Control Manager applet (under control panel - services). Before the service will actually do anything, however, you must edit the NT registry.
The Enhydra service is located under:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Enhydra\
Under the "Edit" Menu, select "Add Key"
Key Name: Parameters
Class: REG_SZ
Under the "Edit" Menu, select "Add Value"
Value Name: AppDirectory
Data Type: REG_SZ (should already be filled in)
String: "c:\enhydra\"
Value Name: Application
Data Type: REG_SZ (should already be filled in)
String: "c:\jdk1.2.2\bin\java.exe" (be sure this matches the path to your java.exe file)
Value Name: AppParameters
Data Type: REG_SZ (should already be filled in)
String:
-cp "c:\usr\local\enhydra3.0.1\lib\enhydra.jar;c:\jdk1.2.2\lib\inetJDBC.zip;c:\jdk1.2.2\lib\Signio.jar;c:\jdk1.2.2\lib\epic.jar;%CLASSPATH%;c:\jdk1.2.2\lib\tools.jar" "com.lutris.multiServer.MultiServer" "c:\usr\local\enhydra3.0.1\multiserver.conf"
Note: You must ensure that the parameters match settings and file locations on your server. It may be possible to simplify the AppParamters string for some installations. The general format of the string is:
-cp classpath mainclass arguments
Type java at the command prompt for a full explanation. Here, we have included the full classpath (after the "-cp" switch) followed by the fully qualified class name, with the path to the multiserver.conf file as an argument.
Note: If you select "Allow Service to Interact with Desktop," you should expect to see a Java thread dump at the console when logging off the server. This should occur without any errors and does not appear to cause any problems with Java or Enhydra. When logging off the machine, the service will continue to run and the console window will still be visible once the user logs back into the server.
In addition, do not manually close the console window to kill the Enhydra service as this will cause a number of errors and will place the Multiserver in an unstable condition. To close the console window, use the Services applet to stop the Enhydra service (the console window will close automatically). Except for troubleshooting purposes, allowing the service to interact with the desktop is not recommended. . .especially in a production environment.
Configuring Enhydra Director:
Relevant Documentation: "Using Enhydra Director"
(http://www.enhydra.org/software/documentation/enhydra/index.html)
The Lutris documentation for using Enhydra Director with IIS is very thorough. Follow the directions closely to avoid problems with the www service on the server. Note that the enhydra_director.conf file contains a significant amount of commented information that describes how the file should be configured. Pay careful attention to the example configurations within the file. Although the instructions are "commented out," the code is not. . .but should be before being placed into production! Comment out all code that does not pertain to your configuration. When restarting the web server, delays of more than 2 minutes are a good indication that the enhydra_director.conf file contains uncommented, bogus configuration information. If this is the case, Enhydra Director will force IIS to execute DNS queries based on the examples in the file. Each query takes about 2 minutes to time out, causing delays of 5 - 10 minutes for the server to fully start.
Adding an Enhydra Application with the Multiserver Admin Console:
Relevant Documentation: "Getting Started with Lutris Enhydra" (http://www.enhydra.org/software/documentation/enhydra/index.html).
The "Installing Enhydra on the Web/Application Server" section discussed running a simple Enhydra application from the command line. On a production server, however, applications are started with the Enhydra Multiserver Administration Console. The console is a browser-based tool that provides a simplified method of adding and managing Enhydra applications. Once Multiserver is running as a service on the server (see the "Configuring Enhydra Multiserver to Run as an NT Service" section of this document) the console application is available to begin managing your applications. The following steps or normally required only once for each new Enhydra application installed on the server. To allow the Multiserver Console to run the new application, complete the first 10 steps in the "Placing an Application on the Enhydra Multiserver" section before completing the steps below.
admin
and password = enhydra
. This information can be
changed by editing the file at
c:\usr\local\enhydra3.0.1\apps\multiserverAdmin.conf.
Placing an Application on the Enhydra Multiserver:
Relevant Documentation: "Getting Started with Lutris Enhydra" (http://www.enhydra.org/software/documentation/enhydra/index.html).
This is likely the most common procedure undertaken by developers on the server (both in the lab and in production). Here, we assume that the server is already fully configured and running Enhydra Multiserver. In some cases (as it is in the laboratory), Enhydra may be running on the same machine as the web server (IIS). The procedure does not change, but may need to be repeated if there are multiple application servers.
Also note that any code ready to be moved to a production server must be fully tested using these procedures in the laboratory prior to being moved into production.If running from the Java class files:
Server.ClassPath[] = c:\usr\local\project\Myapp\classes
If running from the jar file:
Server.ClassPath[] = c:\usr\local\project\Myapp\output\lib\Myapp.jar