![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Installing Novell exteNd
CHAPTER 6
This chapter describes how you can configure the exteNd Application Server to restart automatically when necessary:
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:
Avoid security risks caused by keeping the server program logged in on the computer running the server
Automatically start the server whenever Windows or UNIX is started
Start the server remotely with the Windows Service Manager or with a UNIX shell
Run the server with administrative account privileges while you run other programs using your local accounts
By default, the Application Server does not run as a service or daemon.
The following Novell exteNd Application Server programs can run as services or daemons:
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.
There are two ways to create the Windows services for the exteNd Application Server and cluster servers:
The exteNd installer has an option (available with the Server and Custom install options only) to automatically create Windows services for the Application Server and cluster servers.
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:
SilverServiceUtil.exe -create -service exteNdAppServer51 -display \ "Novell exteNd Application Server 5.1" -program \ %NOVELL_EXTEND_APPSERVER_HOME%\bin\SilverServer.exe SilverServiceUtil.exe -create -service exteNdCacheMgr51 -display \ "Novell exteNd Cache Manager Server 5.1" -program \ %NOVELL_EXTEND_APPSERVER_HOME%\bin\SilverServer.exe SilverServiceUtil.exe -create -service exteNdLoagMgr51 \ -display "Novell exteNd Load Manager Server 5.1" \ -program %NOVELL_EXTEND_APPSERVER_HOME%\bin\SilverServer.exe SilverServiceUtil.exe -create -service exteNdDispatcher51 \ -display "Novell exteNd Dispatcher 5.1" \ -program %NOVELL_EXTEND_APPSERVER_HOME%\bin\SilverServer.exe
The services need to be started after they are created.
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.
The services are configured as manual start. To have the services restart automatically, select Administrative Tools in the Windows Control Panel.
Open Services and find the Novell exteNd Application Server 5.1 service.
Right-click the service and select Properties. Change the Startup type to Automatic.
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.
To specify command-line arguments:
Enter regedit and click OK. This starts the registry editor.
In the left panel, expand HKEY_LOCAL_MACHINE, SYSTEM, CurrentControlSet, Services.
Click the service you want to add command-line parameters for. The registry settings for the service displays in the right panel.
Enter the startup command-line options and click OK to save them.
The command-line arguments will be passed into the exteNd server process the next time it is started as a service.
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.
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.
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.
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.
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.
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.
An exteNd Application Server started by the system after a reboot will be running as the root user.
Start the SMC and connect to the server (see the overview chapter in the exteNd Application Server Administrator's Guide for details).
Select View>Configuration to display the configuration panels.
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.
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.
In NetWare, the autoexec.ncf file is used to automatically restart the 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 Novell, Inc. All rights reserved. Copyright © 1997, 1998, 1999, 2000, 2001, 2002, 2003 SilverStream Software, LLC. All rights reserved. more ...