Chapter 6: Servers

This chapter describes server objects and what you can do with them.

Introduction

Servers are the top-level object that the Directory Server controls. There are two types of server:

Your responsibilities as administrator include:

Command-line Interface

A number of commands are available for administering servers. These are:

casstart Starts an enterprise server
casstop Stops an enterprise server
cassi
Starts a service execution process.
casdump Requests a system dump
casdup Formats a trace or dump data set

For more information see the Reference Help topics Commands.

Server Information

You can see the information held in the repository about servers in the server table on the Home page of Micro Focus Server Administration. The information that is common to all servers appears with a white background, while the information that applies only to enterprise servers appears with a beige background.

The server table is available in two modes, summary and expanded. When you first start Enterprise Server Administration, it is shown in summary mode. You can switch to expanded mode by clicking the icon at the top left-hand corner of the table. The server table in summary mode is shown in the figure Home Page of Enterprise Server Administration in the section Visual Appearance in the chapter Introduction to Enterprise Server Administration. The server table in expanded mode is shown in Figure 6-1.

Server Table in Expanded Mode

Figure 6-1: Server Table in Expanded Mode

Information Applicable to All Servers

The following information in the table of servers on the Home Page is applicable to both types of server:

Information Applicable to Enterprise Servers

The following information in the table of servers on the Home Page is applicable only to enterprise servers:

When a server is running it has the status "Started". A check mark by an object associated with the server indicates that it is also operational.

Configuration Information

You can use the Configuration Information field on the Add Server and Edit Server pages for configuration data specific to enterprise servers. This field can contain the following section:

[ES-Environment]

Settings in this section are added to the environment of programs running under this enterprise server. You can use it to set arbitrary environment variables required by your programs, such as DDNAMEs, or to set system or COBOL run-time variables such as PATH and COBPATH. On UNIX, settings in this section are case-sensitive. For more information on setting environment variables, see the section Environment Variables in the chapter Configuration.

You can also use the Configuration Information field on the Add Server and Edit Server pages to set parameters for communications processes belonging to that enterprise server. Communications process settings in the server object apply to all of the communications processes for that enterprise server. To set parameters for only one communications process, use the Configuration Information field on the Add Communications Process or Edit Communications Process pages. For information on what you can enter, see the section Configuration Information in the chapter Communications Processes and Service Listeners.

Server Statuses

An enterprise server can have any of the following statuses:

Stopped The server is currently not running.
Stopping The server is currently in the process of terminating. This is normally a short-lived status value which should be shortly followed by a change to the value "Stopped".
Started The server is currently running and can respond to client and server requests. At least one communications process is started.
Starting The server is currently in the process of starting. This is normally a short-lived status value which should be shortly followed by a change to the value "Started".
Not Responding The server process was previously marked as "Started", but the server monitor has subsequently not been able to contact it. There may be some network connection error, or the server itself may have abnormally terminated without first marking itself as "Stopped".

If network communications are restored, and the server is still running, and the server monitor is on, then the server will be remarked as "Started" when the server monitor next checks whether the server is active.

The server might have encountered an unrecoverable communications error and the server process remains active, in which case you can shut it down by using Stop Server on the Server Details page.

The server might have encountered an unrecoverable communications error, that is, all the communications processes are inactive or not responding. If this happens, the server process shuts down. You can start it by using Start Server on the Server Details page.

Invalid An error has occurred such that it has not been possible to set the status to any other value.

A CCI Server can only have the status "Registered". This status indicates that the Directory Server has been notified that a CCI server has started. When the server stops, it deregisters itself and disappears from the list of servers.

Using Start and Stop Scripts

You can supply start and stop scripts to take additional actions before or after starting or stopping an enterprise server. You must include the casstart command in your start script, and the casstop command in your stop script. If you omit them the server will not actually be started or stopped. For details of these commands see the topics casstart and casstop.

The Directory Server sets some environment variables in the scripts' environment, which you can use in your scripts:

ES_HOME Server work directory (location of log files); this comes from the System Directory field on the Add Server or Edit Server > Properties > General page.
ES_SERVER Server name (note that Enterprise Server will use this as the server name if no -r switch is specified on casstart or casstop).
MFDS_PORT The port on which the Directory Server listens (usually 86).

For example, the start script could be used to set environment variables for the server, as follows;

set MY_VARIABLE=value
rem start the enterprise server
echo Enterprise Server %ES_SERVER% is starting
casstart   

where value is the value of the environment variable.

If your stop script contains commands that should only be executed after the server has stopped completely, it should pause after executing casstop until the cascd process for that server has exited. This is because the casstop command returns before the server has actually finished shutting down. You would need third-party tools to do this on Windows.

Then you could back up the log files or perform other tasks that should only be started after the server finishes shutting down.

When you click the server's Start or Stop button, the commands that you specify are used to generate a Windows batch file, which is then executed.

You can also create an "On server not responding" script. This script will be executed when all of the running communications processes for a server have entered the "Not Responding" state. That might indicate that the server is hung or has crashed, or it might result from network connectivity problems between the Directory Server and the enterprise server (if they run on different systems). You can use this script to notify a system administrator of the problem.

You specify start, stop and "On server not responding" scripts on the Edit Server > Properties > Advanced page.

How to

Stopping and Restarting Servers

You should stop all servers before stopping the Directory Server or shutting the machine down. When you stop the Directory Server using Enterprise Server Administration, there is an option to stop all servers first.

On system restart, unless Restore Servers on Startup on the Configure Options page is checked, the Directory Server does not automatically start any servers that were not stopped before shutdown (and so are still marked as "Started" in the Directory Server repository). If the Server Monitor is enabled on the Configure Options page it will check whether these servers are still active, and will mark them as "Not Responding" in the Enterprise Server Administration servers table on the Home page. Each server will then need to be restarted manually. You can do this by clicking Details and then clicking Start Server for each server.

If Restore Servers on Startup is selected, when Directory Server is restarted, it reads the list of servers that were previously marked as started, checks to see if they are running, and if not, attempts to restart them.

What You Can Do

What you can do depends not only on your permission level but also on the type of server you are dealing with. Once a server has been started, monitoring facilities are available if you have Add/Delete permission level or higher.

Enterprise Servers

If you have Modify permission level or higher you can:

If you have Add/Delete permission level or higher you can also:

How to...

A further set of facilities for server monitoring and control is available for any server with a status of "Started". These are known collectively as Enterprise Server Monitor and Control. For more information see the chapter Administering Servers Using ESMAC

CCI Servers

If you have Add/Delete permission level or higher you can delete a server. You would only need to do this if the server terminates abnormally and does not deregister itself from the Directory Server.

How to


Copyright © 2008 Micro Focus (IP) Ltd. All rights reserved.