Installing Novell exteNd

CHAPTER 6

Installing the exteNd Application Server as a Service or Daemon

This chapter describes how you can configure the exteNd Application Server to restart automatically when necessary:

 
Top of page

About services and daemons

With high-availability servers in a multiuser environment, it often makes sense to run them as Windows services or UNIX/Linux daemons. Running the exteNd Application Server and the database server as a service or daemon on the same machine ensures that both services restart automatically when the machine reboots. This helps you:

By default, the application server does not run as a service or daemon.

 
Top of section

What can run as a service or daemon

The following Novell exteNd Application Server programs can run as services or daemons:

Program

Description

Runs as

Application Server

Serves applications

Runs as a desktop program by default

Load Manager

Manages the activity of the servers in a cluster

Usually run as a desktop program

Dispatcher

Redirects requests to application servers

Cache Manager

Keeps server caches for clusters in sync

 
Top of page

Running as a Windows service

When you run high-availability servers in a multiuser environment, it can make sense to run them as Windows services. Running the Novell exteNd Application Server and the database server as services on the same machine ensures that both restart automatically whenever the machine reboots. If the application server connects to databases on other machines, you should also make sure they restart automatically on reboot.

 
Top of section

Creating a Windows service

There are two ways to create the Windows services for the exteNd Application Server and cluster servers:

During installation

The exteNd installer includes a choice (available with the Server and Custom install options only) to automatically create Windows services for the application server and cluster servers.

instServiceInstallReg

After installation

The Windows services may also be created after installation by using the utility SilverServiceUtil.exe. This is a command-line DOS utility and should be run from a DOS window. The following commands will create the Windows services for the exteNd servers (where nn and n.n refer to the version number of the application server):

  SilverServiceUtil.exe -create -service exteNdAppServernn -display \
  "Novell exteNd Application Server n.n" -program \
  %NOVELL_EXTEND_APPSERVER_HOME%\bin\SilverServer.exe
  
  SilverServiceUtil.exe -create -service exteNdCacheMgrnn -display \
  "Novell exteNd Cache Manager Server n.n" -program \
  %NOVELL_EXTEND_APPSERVER_HOME%\bin\SilverServer.exe
  
  SilverServiceUtil.exe -create -service exteNdLoagMgrnn \
  -display "Novell exteNd Load Manager Server n.n" \
  -program %NOVELL_EXTEND_APPSERVER_HOME%\bin\SilverServer.exe
  
  SilverServiceUtil.exe -create -service exteNdDispatchernn \
  -display "Novell exteNd Dispatcher n.n" \
  -program %NOVELL_EXTEND_APPSERVER_HOME%\bin\SilverServer.exe

 
Top of section

Starting a Windows service

The services need to be started after they are created.

Procedure To start a Windows service:

  1. Select Administrative Tools in the Windows Control Panel.

  2. Open Services and find the Novell exteNd Application Server n.n service.

  3. Right-click the service and select Start.

NOTE:   This procedure may vary a bit on the various Windows platforms.

The exteNd server does not normally open a DOS console window when it is started as a service. The console output is redirected to a text file stored in the %NOVELL_EXTEND_APPSERVER_HOME%\temp directory.

 
Top of section

Starting automatically after reboot

The services are configured as manual start. To have them restart automatically:

  1. Select Administrative Tools in the Windows Control Panel.

  2. Open Services and find the Novell exteNd Application Server n.n service.

  3. Right-click the service and select Properties. Change the Startup type to Automatic.

    instServiceAutomatic

 
Top of section

Passing command-line arguments

You can specify command-line arguments that will get passed to the exteNd servers when they are started as Windows services. To do this you edit the Windows registry entry for the service, using the Windows registry editor.

Procedure To specify command-line arguments:

  1. From the Start menu select Run.

  2. Enter regedit and click OK. This starts the registry editor.

  3. In the left panel, expand HKEY_LOCAL_MACHINE, SYSTEM, CurrentControlSet, Services.

  4. Click the service you want to add command-line parameters for. The registry settings for the service displays in the right panel.

  5. Right-click StartupOptions, then select Modify.

  6. Enter the startup command-line options and click OK to save them.

  7. Exit the Windows registry editor.

The command-line arguments will be passed into the exteNd server process the next time it is started as a service.

 
Top of section

Service dependencies

If the exteNd Application Server depends on a database server (or other server) that runs on the same machine, the database service must be started before the application server service.

You should add a service dependency to the application server service to guarantee that the database server will be started before the application server.

You do this with the SilverServiceUtil.exe command-line tool.

 
Top of page

Running as UNIX/Linux daemons

All UNIX and Linux distributions of the exteNd Application Server include the extendctl script, which can be used to start and stop exteNd server processes in the background.

The installation program also installs sample startup scripts that your system can run to automatically start the application server or cluster components as daemons at boot time.

Server path

Cluster path

$installationdirectory/etc/silverserver

$installationdirectory/etc/silvercluster

A system administrator with root privileges must copy the sample server and cluster scripts from the install directory into your operating system's boot directory.

 
Top of section

Manual start of exteNd server daemon process

The extendctl script can be used to start, stop, and restart server processes.

  $NOVELL_EXTEND_APPSERVER_HOME/etc/extendctl

For usage information, use extendctl -h. Here are some examples.

  extendctl start -A     (starts the appserver in the background)
  extendctl stop -A      (stops the background appserver process)
  extendctl restart -A   (restarts the background appserver process)
  extendctl status -A    (tests whether the appserver is running)
  extendctl tail -A      (starts a "tail -f" on the appserver console output)

The flag -A refers to the application server. Other options are available for use with cluster servers.

 
Top of section

Server console output

When the extendctl script starts an exteNd server in the background, the server's console output is redirected to a file with the following naming convention:

  $NOVELL_EXTEND_APPSERVER_HOME/temp/SilverServer.XXXXX.out

XXXXX begins at 00001 and is incremented by 1 each time a server is restarted.

You can optionally specify an alternate output directory. But you cannot change the naming convention for console output files.

The default behavior of the extendctl script is to delete all but the last few output files created by each server. The number of output files saved can be changed. And you can always start the output file index over again at 00001 by deleting the index file:

  $NOVELL_EXTEND_APPSERVER_HOME/temp/.outfile.index

NOTE:   Don't do this unless all exteNd server processes are stopped.

 
Top of section

Passing command-line arguments to exteNd background processes

To pass one or more command-line arguments to the application server (or a cluster server), use the -p option with the extendctl script. For example:

  extendctl start -A -p "+cp:p /tmp/foo.jar -nomonitor"

This causes the arguments "+cp:p /tmp/foo.jar -nomonitor" to be passed to the application server when it is started in the background. The argument to the -p switch must be enclosed in double quotes.

 
Top of section

Starting exteNd servers automatically after a reboot

The directory $NOVELL_EXTEND_APPSERVER_HOME/etc contains sample scripts that may be copied into the appropriate areas in /etc/init.d or /etc/rc.d. These scripts are named:

  silverserver (to start/stop an AppServer process)
  silvercluster (to start/stop the cluster control servers)

The variable EXTEND_HOME must be changed in these scripts to reflect the exteNd installation directory. These scripts support the start, stop, restart, and status commands.

The way to set up the application server or cluster servers to restart after a reboot varies from system to system. See your OS documentation or your UNIX/Linux system administrator for more information. Remember that the application server process must be started after any of its dependent daemon processes (that is, databases) are started. If the exteNd cluster servers are being used, they must be started before the server is started.

 
Top of section

Starting exteNd servers as a user other than root

An exteNd Application Server started by the system after a reboot will be running as the root user.

Procedure To specify a different user:

  1. Make sure the server is running.

  2. Start the SMC and connect to the server (see the overview chapter in the exteNd Application Server Administrator's Guide for details).

  3. Select View>Configuration to display the configuration panels.

  4. Select the General panel.

  5. Edit the user name in the Username for server (UNIX only) text box.

    TIP:   The specified user ID must have the proper permissions to files in the exteNd installation directory.

  6. Restart the server for the changes to take effect.

    Now the server will change its effective user ID whenever it starts up.

    IMPORTANT:   The server must be restarted as root. Otherwise, the server will fail to start—either because it can't change the user ID or because it can't read from or write to a file. These problems can usually be avoided if you ensure that the user ID being set for the server is the user that owns the exteNd install directory contents.

 
Top of page

Running on NetWare

In NetWare, the autoexec.ncf file is used to automatically restart the exteNd Application Server when the NetWare server restarts. When you install the application server, the commands for this are added by default to autoexec.ncf.

If you don't want the application server to restart automatically, you can edit autoexec.ncf to remove those commands.



Copyright © 2004-2005 Novell, Inc. All rights reserved. Copyright © 1997, 1998, 1999, 2000, 2001, 2002, 2003 SilverStream Software, LLC. All rights reserved.  more ...